enable anti aliasing

This commit is contained in:
Luca Conte 2025-04-28 00:23:11 +02:00
parent 6f50150a6b
commit e842eb3d66
1 changed files with 5 additions and 0 deletions

View File

@ -409,6 +409,11 @@ async function init() {
gl.enable(gl.BLEND); gl.enable(gl.BLEND);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); 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 // start drawing
requestAnimationFrame(draw); requestAnimationFrame(draw);
} }