p5.js
p5.js copied to clipboard
Fix: prevent unnecessary webgl canvas recreation in noSmooth()
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 lintpasses
@ksen0 @perminder-17 Please review.