update
This commit is contained in:
parent
a59169aa7f
commit
fce603b392
@ -143,7 +143,9 @@
|
||||
function turnon(led) {
|
||||
const { x, y } = led.dataset
|
||||
const color = led.classList.toggle('on') ? [0, 0, 0] : [255, 255, 255]
|
||||
client.emit('operation', { action: 'setPixel', x, y, color })
|
||||
const action = { action: 'setPixel', x, y, color }
|
||||
console.log(action)
|
||||
client.emit('operation', action)
|
||||
}
|
||||
// client.on('leds', (array) => {
|
||||
// const leds = document.querySelectorAll('.led')
|
||||
|
Loading…
Reference in New Issue
Block a user