Update index.php

This commit is contained in:
awesomeuser 2023-08-04 17:56:29 +00:00
parent 6c47d7384f
commit dca193a823

View file

@ -100,13 +100,12 @@
const canvas = document.getElementById(canvasId);
const ctx = canvas.getContext("2d");
// const pen = ctx.createImageData(2, 2);
// for (let i = 0; i < pen.data.length; i += 4) {
// pen.data[i] = 0;
// pen.data[i+1] = 0;
// pen.data[i+2] = 0;
// pen.data[i+3] = 255;
// }
const copy = ctx.createImageData(128, 64);
for (let i = 0; i < pen.data.length; i++) {
copy.data[(i*4)+3] = 255;
}
ctx.putImageData(copy, 0, 0);
}
</script>
</head>