From aec647f9b76ada22b809c97bc7ee669fcb6e6d73 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 7 Apr 2024 01:32:47 +0200 Subject: Shady WebGL --- script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'script.js') 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)")), -- cgit v1.2.3