Use lighting steps to the GUI and when executing.
This commit is contained in:
parent
c1d5e52a10
commit
fc73859f8f
|
@ -124,8 +124,6 @@ light.set = function (rgb, callback) { //rgb = [0,0,0]
|
||||||
rgb : rgb,
|
rgb : rgb,
|
||||||
id : uuid.v4()
|
id : uuid.v4()
|
||||||
};
|
};
|
||||||
console.log(rgb)
|
|
||||||
console.log(obj)
|
|
||||||
ipcRenderer.sendSync('light', obj);
|
ipcRenderer.sendSync('light', obj);
|
||||||
|
|
||||||
if (typeof callback !== 'undefined') {
|
if (typeof callback !== 'undefined') {
|
||||||
|
|
|
@ -60,11 +60,16 @@ mse.mscript.toGUI = function () {
|
||||||
for (let i = 0; i < mse.mscript.data.arr.length; i++) {
|
for (let i = 0; i < mse.mscript.data.arr.length; i++) {
|
||||||
c = mse.mscript.data.arr[i];
|
c = mse.mscript.data.arr[i];
|
||||||
mcopy.state.sequence.arr[i] = c;
|
mcopy.state.sequence.arr[i] = c;
|
||||||
//if (c === 'CF' || c === 'CB') {
|
console.dir(mse.mscript.data);
|
||||||
mcopy.state.sequence.light[i] = light.color.join(',');
|
if (c === 'CF' || c === 'CB') {
|
||||||
//} else {
|
if (typeof mse.mscript.data.light[i] !== 'undefined' && mse.mscript.data.light[i] !== '') {
|
||||||
//mcopy.state.sequence.light[i] = '';
|
mcopy.state.sequence.light[i] = mse.mscript.data.light[i];
|
||||||
//}
|
} else {
|
||||||
|
mcopy.state.sequence.light[i] = light.color.join(',');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mcopy.state.sequence.light[i] = '';
|
||||||
|
}
|
||||||
gui.grid.state(i);
|
gui.grid.state(i);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -114,11 +119,11 @@ mse.mscript.prepare = function () {
|
||||||
obj = {
|
obj = {
|
||||||
cmd : mse.mscript.data.arr[i]
|
cmd : mse.mscript.data.arr[i]
|
||||||
};
|
};
|
||||||
/*if (mse.mscript.data.light[i] !== '') {
|
if (typeof mse.mscript.data.light[i] !== 'undefined' && mse.mscript.data.light[i] !== '') {
|
||||||
obj.light = mse.mscript.data.light[i];
|
obj.light = mse.mscript.data.light[i];
|
||||||
} else {
|
} else {
|
||||||
obj.light = light.color.join(',');
|
obj.light = light.color.join(',');
|
||||||
}*/
|
}
|
||||||
arr.push(obj);
|
arr.push(obj);
|
||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
|
|
Loading…
Reference in New Issue