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