Skip to content

v3.18

Compare
Choose a tag to compare
@quinton-ashley quinton-ashley released this 08 Dec 04:44
· 86 commits to main since this release

v3.18.12

Upgraded p5play's license from the GPLv3 to the AGPLv3. See LICENSING.md for more info.

v3.18.9

The fullscreen and pixelated (no scalar) canvas presets are now programmed to decide to scale width or height to 100% by comparing the aspect ratio of the canvas to the aspect ratio of the window.

if (c.w / c.h > window.innerWidth / window.innerHeight) style += 'width: 100%!important; height: auto!important;';
else style += 'height: 100%!important; width: auto!important;';

v3.18.8

Fixed #281

v3.18.7

I added a new feature to make it easier to make tile based games. When using sprite.move with a sprite that has a tileSize (not equal to 1), and an input distance that's divisible by 0.5, and an input direction name or cardinal direction angle, then the distance the sprite moves will be rounded up to the nearest half tile.

Also improved the canvas "fullscreen" preset and wrote documentation for it.
https://p5play.org/learn/canvas.html?page=0

v3.18.6

Reverted some incorrect changes to move and moveTo. For better performance, I tried making it so that if a sprite is moved in a cardinal direction, the calculations for one axis of movement would be skipped, but these functions still need to override that axis of movement. In the docs it says inputting direction in these functions should be equivalent to changing the sprite.direction property, like this:

sprite.move(1, 'left');

// is equivalent to

sprite.direction = 'left';
sprite.move(1);

For non-imperative movement, applyForce can be used.

v3.18.5

Fixed sprite.moveTo function errors introduced in v3.17.

Changed the implementation of the sleep function, when run without arguments it now resolve it's promise after the next world step is complete, instead of using requestAnimationFrame. Pretty much the same result in normal use cases but it could allow users to run world.step separate from the canvas display rate and have functions like move and moveTo still work. Previously they were tied to the frame rate too.

v3.18.0

Upgraded p5play's rotated text caching system to work exclusively with p5.js v1.9.0 (latest) and any future releases.

This is because p5.js' devs made some breaking changes to p5.Graphics.get which makes the current implementation of text caching in p5play incompatible with older versions of p5.js.