Skip to content

v3.22

Compare
Choose a tag to compare
@quinton-ashley quinton-ashley released this 10 May 03:46
· 30 commits to main since this release

v3.22.17

p5.js v1.10.0 finally has the fix I helped Dave make for deltaTime, 5 months after I suggested it. Better late than never I guess, but it took so long I forgot to remove the warning I made to p5play user's about p5's inaccurate delaTime, until now.

Reimplemented the Emoji Image function so that it simply uses a p5 or q5 graphics object to make the image. It's a bit faster than the previous implementation that used createTextImage.

Removed the text image cache system from p5play.js because it was admittedly a hacky solution to p5's slow text rendering and I don't want to maintain a separate version of this code I originally wrote for q5. I've improved the system in q5.js, so anyone that wants to use text image caching going forward needs to use q5.js instead of p5.js.

For q5's WebGPU renderer I'm working on a more robust system for displaying high quality text with much better performance compared to p5.js WebGL mode. Stay tuned!
https://github.com/q5js/q5.js/wiki/Developer-Log#research-on-realtime-text-rendering-in-webgpu--september-22-2024

v3.22.16

Fixed #332 a regression introduced in v3.22.15

v3.22.12

Optimized EmojiImage code.

Updated applyForce params and documentation. Thanks to @sifhg!

v3.22.11

Fixed regression in v3.22.8, use of new Canvas(200, 200, "pixelated") properly makes the canvas fullscreen.

v3.22.10

If no input params are given to fill, stroke, and background, p5play.js no longer throws an error, the error should be thrown from q5 or p5.

v3.22.9

Fixed major issue with v3.22.8 that caused p5play to crash when used with p5.js. I forgot to test with p5, not just with q5.

v3.22.6

sprite.move now works with negative direction angles.

v3.22.5

Fixed #323

v3.22.4

Setting group.image to an arrow function works now.

v3.22.3

sprite.image and group.image have to determine if the input string is a file path or emoji. My test to determine that was not so sophisticated, just checking if the length of the string were less than 4. But some emojis have a really long unicode char lengths:

"👋🏻".length; // => Expected 1, got 4.
"👨‍👩‍👧‍👧".length; // => Expected 1, got 11.
"🤽🏿‍♀️".length; // => Expected 1, got 7.
credits: https://github.com/jericirenej/emoji-string-length

Now p5play just checks if the string includes a ".", then it's an image file.

v3.22.2

group.image works now! What an oversight haha.

v3.22.1

No images? 🫥 No problem! 😄 You can use any emoji as the image for your sprite. The size of the emoji image will be based on the sprite's size. Great for quick prototyping! 🧪 https://p5play.org/learn/sprite.html?page=2

sprite.image = '🏀';

Also implemented #322. The setter of sprite.image no longer creates a single frame animation behind the scenes, it just stores the image. Some pretty common questions on the discord server were how to offset an image from the center of the sprite and how to scale it. I figured these features should be introduced sooner on Sprite page 2.

Deprecated sprite.addImage, group.addImage, and similar functions because it's unclear that p5play is making single frame animations inside these functions which are actually just aliased to sprite.addAni anyway.

Implemented #321 spirte.canvasPos requested by a user on discord (can't find them!)

Fixed #320

Also the memory leak fix from v3.21.7 has been confirmed to work!