diff --git a/index.php b/index.php index f28087b..b7dd9de 100644 --- a/index.php +++ b/index.php @@ -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); }