v2.0
v2.0.15
Fixed oklch
color mode support.
sRGB vs oklch demo from @spctrm404
function setup() {
createCanvas(400, 400);
colorMode('rgb');
fill('#ff0c52');
rect(0, 0, width / 2, height);
colorMode('oklch');
fill(0.637, 0.28, 16.57, 1);
rect(width / 2, 0, width / 2, height);
}
v2.0.12
Made image color space the same as the canvas color space by default.
Other misc bug fixes
v2.0.6
Implemented #47 and added errors for if q5 can't parse a color string, since otherwise that'll be an FAQ.
v2.0.5
Fixed the async setup
implementation (q5 needed to return the async function's Promise in global mode)
Also fixed arc
not working when angleMode
is set to degrees.
v2.0.0
Many of the features planned for p5.js 2.0 have already been implemented in q5! 🎉
-
modular design with a functional core that additional modules can attach to
processing/p5.js#7014 -
a rewritten color module that has support for HDR colors and enables users to change color components via property editing which is idiomatic to JavaScript. functions like
fill
andstroke
support css color strings. For more info see: #24
processing/p5.js#7018 -
q5 has canvas context attribute support
processing/p5.js#6781 -
q5's bundle size is already 70x smaller than p5 unminified and q5.min is 20x smaller than p5.min
processing/p5.js#6776 -
async/await is supported in
setup
and can already be used withfetch
. I also like the idea of a simpleload
function which I'll implement soon. #45
processing/p5.js#6767 -
q5 has already pruned the suggested items, many of which made sense in Java Processing but were not idiomatic to JavaScript from the start. the http functions were pruned in q5 because users can now use
fetch
instead. Color functions likered
,green
, andblue
were made obsolete in q5 by color instance property editing, for examplecolorInst.r = 50
to change the amount of red.
processing/p5.js#7090 -
q5's
askAI()
provides improved debugging support compared to the FES
processing/p5.js#6888
Other p5 issues not planned for p5 2.0:
-
hit detection for 2D shapes
inFill
andinStroke
was much easier to implement than in the way this issue poster suggested but I'd never heard of those canvas2d methods before.
https://github.com/q5js/q5.js/blob/8692fa40eee1f3f4943e2b944128ef9d430ee28e/src/q5-2d-drawing.js#L508
processing/p5.js#7081 -
Added
noiseMode
and simplex noise. Also the existing p5 noise is not actually perlin noise, if you view it at one octave it looks nothing like perlin noise, the implementation is incorrect, I renamed in "blocky" noise. It's still nice to use for generating noise with only one or two iterative inputs. @Tezumie correctly implemented Q5.PerlinNoise which is the default noise algorithm in q5. He also made simplex noise.
https://github.com/q5js/q5.js/blob/main/src/q5-math.js
https://github.com/q5js/q5.js/blob/main/src/q5-noisier.js
processing/p5.js#6152 -
q5 supports cached rendering of rotated text and a user facing function
createTextImage
andtextImage
for displaying them. This is my own issue, which admittedly mainly affected p5play users making games where lot of rotated gamer tags are displayed. Although I've found some more widely appealing use cases for this in creating emoji images for p5play sprites. Students are loving it!
https://p5play.org/learn/sprite.html?page=2
processing/p5.js#6427 -
q5 has
opacity(globalAlpha)
processing/p5.js#6756