Skip to content

v2.1

Compare
Choose a tag to compare
@quinton-ashley quinton-ashley released this 25 Jul 20:00
· 134 commits to main since this release

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 #57
  • fill and stroke 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, use opacity(globalAlpha).

Internal changes:

  • p for the q5 instance proxy changed to q
  • Renderer modules are now added to the Q5.renderModules object, instead of Q5.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 format
  • Q5.ColorRGBA, Q5.ColorRGBA_P3 classes store colors in the modern 0-1 float format
  • fullscreen function moved to the display module
  • fill, noFill, stroke, strokeWeight, and noStroke functions moved from q2d-canvas module because they can also apply to text, without needing to load the q2d-drawing module.