update
This commit is contained in:
parent
eb7272697f
commit
505b2b07e6
@ -147,9 +147,11 @@
|
|||||||
}
|
}
|
||||||
client.on('leds', (array) => {
|
client.on('leds', (array) => {
|
||||||
const leds = document.querySelectorAll('.led')
|
const leds = document.querySelectorAll('.led')
|
||||||
for (let i = 0; i < 64; i++) {
|
for (let y = 0; y < 8; y++) {
|
||||||
if (array[i] == 1) leds[i].classList.add('on')
|
for (let x = 0; x < 8; x++) {
|
||||||
else leds[i].classList.remove('on')
|
if (array[y][x] == 1) leds[i].classList.add('on')
|
||||||
|
else leds[i].classList.remove('on')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user