From e842eb3d669ece6c9b126d1170a96317f2018dae Mon Sep 17 00:00:00 2001 From: Luca Conte Date: Mon, 28 Apr 2025 00:23:11 +0200 Subject: [PATCH] enable anti aliasing --- src/script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/script.js b/src/script.js index 2e328a2..d09f747 100644 --- a/src/script.js +++ b/src/script.js @@ -409,6 +409,11 @@ async function init() { gl.enable(gl.BLEND); gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); + gl.enable( gl.LINE_SMOOTH ); + gl.enable( gl.POLYGON_SMOOTH ); + gl.hint( gl.LINE_SMOOTH_HINT, gl.NICEST ); + gl.hint( gl.POLYGON_SMOOTH_HINT, gl.NICEST ) + // start drawing requestAnimationFrame(draw); }