Add support for p5.js WebGL mode
quinton-ashley opened this issue · 1 comments
quinton-ashley commented
Motivation
p5's WebGL mode can perform better than 2D mode with programs that use tons of sprites. But it does have tradeoffs like no default fonts and slower+worse quality text rendering.
Implementation
In WebGL mode, the canvas origin is in the center of the canvas, not the top left like in 2D mode. I was thinking of translating everything to the top left but I think p5play should embrace this difference to avoid confusing users that expect WebGL to have its origin in the center.
https://github.com/processing/p5.js/wiki/Getting-started-with-WebGL-in-p5#3d-coordinate-system
That means that I need to convert mouse and touch coordinates. Also probably make some adjustments to the camera.
quinton-ashley commented
implemented in v3.20.5