v2.1
v2.1.0
Proof of concept support for WebGPU rendering added!
Changes:
- For modular use, the
q5-canvas
module must be loaded before renderer modules #58 colorMode
updated to support the "float" color format for RGBA colors, which is the default for the webgpu renderer #57fill
andstroke
persist between draw loops with the q2d renderer #56- mouse position can be updated without a canvas element
color
can now parse three and four character rgb hex color codes (ex. "#fff")tint
doesn't change the opacity of an image, instead the tint's alpha value specifies how strong the tint should be. To dynamically change the opacity of anything drawn to the canvas, useopacity(globalAlpha)
.
Internal changes:
p
for the q5 instance proxy changed toq
- Renderer modules are now added to the
Q5.renderModules
object, instead ofQ5.modules
. This enables individual renderers to be loaded separately. - canvas creation and resizing moved to q5-canvas.js and significantly refactored, resulting in a smaller file size
Q5.ColorRGBA_8
,Q5.ColorRGBA_P3_8
classes store colors in the legacy 0-255 8-bit formatQ5.ColorRGBA
,Q5.ColorRGBA_P3
classes store colors in the modern 0-1 float formatfullscreen
function moved to the display modulefill
,noFill
,stroke
,strokeWeight
, andnoStroke
functions moved from q2d-canvas module because they can also apply to text, without needing to load the q2d-drawing module.