From e128423aea9c75e34797bdb4c12d1f02d36c6897 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 23 Dec 2024 16:15:42 +0100 Subject: Some general improvements --- canvasWorker.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'canvasWorker.js') diff --git a/canvasWorker.js b/canvasWorker.js index ab97236..42f4b84 100644 --- a/canvasWorker.js +++ b/canvasWorker.js @@ -105,10 +105,14 @@ self.onmessage = (msg) => { console.log("using WebGL"); // i hate this try { - gl = canvas.getContext("webgl", { preserveDrawingBuffer: true }); + gl = canvas.getContext("webgl", { + preserveDrawingBuffer: true, + antialias: false, + }); if (!gl) gl = canvas.getContext("experimental-webgl", { preserveDrawingBuffer: true, + antialias: false, }); } catch (e) { } finally { @@ -137,7 +141,7 @@ self.onmessage = (msg) => { draw([x, y + height, x + width, y + height, x + width, y, x, y], colorArr); } else { const [color, x, y, width, height] = msg.data; - if (width < 4 || height < 4) return; + if (width < 3 || height < 3) return; gl.fillStyle = color; gl.fillRect(x, y, width, height); } -- cgit v1.2.3