p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

Fix: prevent unnecessary webgl canvas recreation in noSmooth()

Open yaxit24 opened this issue 1 month ago • 1 comments

Fixes: #7548

Changes: I fixed a bug where calling noSmooth() in WebGL mode would unnecessarily recreate the canvas, causing it to lose its CSS positioning. The fix involves checking the actual WebGL context attributes to see if antialiasing is already disabled before attempting to disable it again.

  • [☑️] npm run lint passes

yaxit24 avatar Nov 27 '25 18:11 yaxit24

@ksen0 @perminder-17 Please review.

yaxit24 avatar Nov 28 '25 03:11 yaxit24