2.28.5
Stopped using canvas.toDataUrl
as recommended by the MDN doc page.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL
Implemented canvas.convertToBlob
polyfill on q5 canvases, works with either c2d or webgpu.
https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas/convertToBlob
Fixed q5-webgpu color parsing regression from v2.28.0.
2.28.1
Preventing scrolling on the canvas should be the default when q5 is used in global mode. This improves the experience of viewing fullscreen interactive art on mobile devices especially.
2.28.0
Nearly complete with #119 Major Refactoring for q5 WebGPU.
The q5 WebGPU renderer is now contained within a single file because using local variables within a single scope is faster than sharing data between scopes via properties on an object. This is a tradeoff made with intent to favor performance over modularity and best practices for code organization.
The goal with q5 WebGPU is to push JavaScript to its limits and achieve the best performance possible.
Up to 30% performance improvement to shape drawing!
Up to 800% performance improvement to push
and pop
! Previously this was done by copying style props from the q5 instance object to an object that stored the styles and back. Now its done by storing the style settings (most of which are local variables) in an array when styles are pushed and then destructuring the array to assign to the local variables when styles are popped.
Also fixed a regression from 2.27 that kinda broke ESM support.