Skip to content

v2.0-beta

Compare
Choose a tag to compare
@quinton-ashley quinton-ashley released this 11 Jun 22:36
· 164 commits to main since this release

2.0-beta22

Added inFill and inStroke wrappers for CanvasRenderingContext2D's isPointInPath and isPointInStroke.

function setup() {
  createCanvas(100, 100);
}

function draw() {
  cursor('default');
  fill('blue');
  rect(25, 25, 50);
  
  if (inFill(mouseX, mouseY)) {
    cursor('pointer');
    fill('red');
    rect(25, 25, 50);
  }
}

I can't believe p5 doesn't have these yet! Will def need to feature on the home page.

2.0-beta19

_OffscreenCanvas needed to be a instance level variable.

Image filter constants like THRESHOLD and BLUR shouldn't have been in q5-2d-drawing, not sure why I did that lol.

Also I'd like to clean up Q5.Image instances, which have a lot of props and functions added to them that aren't needed. For starters I made the image filter constants defined on Q5 which are only added to non-image instances.

I also created q5-2d-soft-filters (5kb) to separate software implemented image filters from q5-2d-image. This is in anticipation of when it can be excluded from the default bundle since every browser besides Safari implements them as hardware accelerated CSS filters. Safari Technology Preview supports testing ctx.filter but there's an issue with it which I reported.

WebKit/WebKit#3793 (comment)
https://bugs.webkit.org/show_bug.cgi?id=275436

Updated the src folder readme file. It'll contain documentation of each q5 module, mainly the differences from p5.
https://github.com/q5js/q5.js/tree/main/src

2.0-beta18

Fixed p (the proxy used to change global and instance mode props at the same time) not be defined in some files.

When the canvas is removed its parent's size changes, triggering _adjustDisplay which should be exited since the canvas no longer has a parent element.

2.0-beta17

canvasResize will now draw the existing canvas image onto the resized canvas.

2.0-beta16

Initial release for public beta testing!

https://q5js.org/q5.js