aboutsummaryrefslogtreecommitdiffhomepage
path: root/canvasWorker.js
diff options
context:
space:
mode:
Diffstat (limited to 'canvasWorker.js')
-rw-r--r--canvasWorker.js8
1 files changed, 6 insertions, 2 deletions
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);
}