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 ++++++--
index.html | 12 ++++++++----
main.js | 22 ++++++++++------------
style.css | 14 ++++++++++++++
4 files changed, 38 insertions(+), 18 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);
}
diff --git a/index.html b/index.html
index 60bf3ef..8587e99 100644
--- a/index.html
+++ b/index.html
@@ -279,7 +279,7 @@ map = \\(0 \\\\\(0 (6 4) (6 3) (6 2) (6 1)))
1000
Warning: Larger resolutions will often need exponentially more
- memory/computation!)
+ memory/computation!
Debug information:
@@ -307,16 +307,21 @@ map = \\(0 \\\\\(0 (6 4) (6 3) (6 2) (6 1)))