From b4b5bd0ccbf5a7754c2a7e67ab8520867608523e Mon Sep 17 00:00:00 2001 From: awesomeuser Date: Fri, 4 Aug 2023 17:57:12 +0000 Subject: [PATCH] Update index.php --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index b7dd9de..efdae73 100644 --- a/index.php +++ b/index.php @@ -101,8 +101,8 @@ const ctx = canvas.getContext("2d"); const copy = ctx.createImageData(128, 64); - for (let i = 0; i < pen.data.length; i++) { - copy.data[(i*4)+3] = 255; + for (let i = 0; i < pen.data.length; i += 4) { + copy.data[i+3] = 255; } ctx.putImageData(copy, 0, 0);