v2.12
2.12.8
Fixed two issues with filter
caught by @Dukemz! In v1 of q5, in lingdong's code, an entirely new temporary copy of the canvas was created and the filter was applied to it, then that image was drawn onto the canvas. I realized this was unnecessary while working on v2.1, the filter can just be applied to the canvas and then the canvas can be redrawn using the filter. Yet I needed to ensure the ctx.globalCompositeOperator is "source-over" during this process, otherwise blend modes will affect the process, which is incorrect.
2.12.6
When multiple p5.js instances with separate canvases are running on-screen at once, they all receive mouse events from the window.
In this update I made it so that users have to start pressing the mouse inside a canvas for it to trigger mousePressed
or set mouseIsPressed
to true. Releasing the mouse can be done off the canvas.