生成图片

master
夜笙歌 6 months ago
parent ffa1bd0709
commit 4c748eb04d

@ -102,7 +102,6 @@
for (let i = 1; i <= 768; i++) { for (let i = 1; i <= 768; i++) {
colors.push(getColorByTemperature[e.rows[0]['site' + i]]) colors.push(getColorByTemperature[e.rows[0]['site' + i]])
} }
console.log(colors)
const canvas = document.getElementById('canvas'); const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d'); const ctx = canvas.getContext('2d');
@ -129,7 +128,7 @@
}) })
} }
getData() getData()
// setInterval(getData, 1000 * 2) setInterval(getData, 1000 * 2)
}) })
</script> </script>

Loading…
Cancel
Save