aboutsummaryrefslogtreecommitdiffhomepage
path: root/script.js
diff options
context:
space:
mode:
authorMarvin Borner2024-04-07 01:32:47 +0200
committerMarvin Borner2024-04-07 01:32:47 +0200
commitaec647f9b76ada22b809c97bc7ee669fcb6e6d73 (patch)
treef5f16fe8a522428bb869bfa8e47852f98a01edce /script.js
parent32eea268559a1360cc00fcd5b180e74104e0c395 (diff)
Shady WebGL
Diffstat (limited to 'script.js')
-rw-r--r--script.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/script.js b/script.js
index 36fef75..fcfd1ff 100644
--- a/script.js
+++ b/script.js
@@ -25,7 +25,11 @@ worker.postMessage({ canvas: offscreen }, [offscreen]);
const drawAt = (x, y, color) => {
worker.postMessage([
- color == WHITE ? "white" : color == BLACK ? "black" : "grey",
+ color == WHITE
+ ? [1, 1, 1, 1]
+ : color == BLACK
+ ? [0, 0, 0, 1]
+ : [0.1, 0.1, 0.1, 0.3],
x[0],
y[0],
x[1] - x[0],
@@ -525,6 +529,7 @@ window.examples.addEventListener("change", () => {
});
window.render.addEventListener("click", () => {
+ clearScreen();
clearErrors();
reduce(
app(parse(window.term.value))(parse("\\((((0 \\\\1) \\\\1) \\\\1) \\\\1)")),