Skip to content

v3.8

Compare
Choose a tag to compare
@quinton-ashley quinton-ashley released this 09 Apr 00:08
· 196 commits to main since this release

3.8.46

p5play's new Canvas no longer applies styles to all canvases, just in the .p5Canvas class. Also pixelated preset styling is now only applied to a canvas using its individual id.

3.8.45

Fix for a regression introduced by v3.8.37 two weeks ago. The algorithm in the Sprite constructor can now accurately search for animations if a sprite inherits from multiple groups that have animations with the same names. I forgot how important the order of the sprite.groups array is because the function that finds animations needs to start with the lowest subgroup that the sprite is part of and then end with searching for the animation in the allSprites group.

3.8.44

Quick fix for #249 but I will implement a better fix that'll be available in v3.9

3.8.43

I realized the spriteArt page didn't have a color table or any kind of illustration of the default color palette. Whoops!

I decided to update the default color palette in p5play so it now has a color for each letter of the alphabet! (even the letters that don't really have a color commonly associated with them) Then I improved the Learn reference page for the spriteArt function by adding a sketch that illustrates what color each letter represents.

The custom color palette section is now last and I give a brief intro level explanation of what a JavaScript Object is.

https://p5play.org/learn/sprite.html?page=3

3.8.39

Actually fixed joint.springiness lol

3.8.38

The contro.released function now properly detects when game controller buttons are released. Thanks to Discord user @Tezumie for reporting that issue.

3.8.37

When sprites are added to a group using group.push or its alias group.add, the sprite will now inherit the group's collision and overlap relationships with other sprites and groups. New group sprites will also inherit any previously set relations as well. Thanks to Discord user @day for reporting that issue.

Several issues with q5.js compatibility were also fixed recently.

3.8.36

Sensors are now sorted to be in the back of the sprite's fixture list when added. This ensures that physics attribute getters only get values from the sprite's most recently added collider, unless it had its colliders removed.

3.8.35

Fixed a pretty major oversight in regards to the contact system, which was demonstrated to me by Discord user @day. In previous versions, for example colliding checks would not return a truthy frame value on the first frame of collision, when collides returns true. Also when sprites collide and stop colliding on the same exact frame, usually due to colliding with other sprites on that frame, collides wouldn't return true like it should. Now it all works just like the input system (ex. presses, pressing, pressed), as described in the docs!

3.8.33

Fixed a bug with group collisions not calling their callbacks if it also had contacts with another group, such as allSprites.

3.8.32

Bug fixes and fixes for my previous bug fixes... whoops! v3.9 is coming soon.

3.8.25

RevoluteJoint was renamed to HingeJoint. Added SliderJoint (wrapper for PrismaticJoint). Renamed maxTorque and torque to maxPower and power.

3.8.23

GlueJoint, DistanceJoint, WheelJoint, and RevoluteJoint classes have been added to p5play! The implementation of these joints and an additional joint will be finalized in v3.9.

3.8.21

Implemented proper mouse dragging detection. Also if a sprite is above multiple sprites that are overlapping, the mouse is only considered to be hovering over the sprite on the highest layer.

3.8.18

Fixed sprite.moveTowards not reseting velocity to zero if the sprite is so close to the target position that it shouldn't move.

3.8.13

Move and rotate functions no longer throw an error if given null arguments, the sprite simply won't move. Enabling this usage will give users more flexibility. I think it'll be especially beneficial for testing multiplayer games in the future.

I've added a new global variable, netcode, which is an instance of the p5play Netcode class. It contains utility functions like spriteToBinary and binaryToSprite that will enable online multiplayer. I am not finished with it yet, but I'm publishing the code in case anyone has feedback or wants to collaborate with me on it!

3.8.9

Fixed move and moveTo not working properly if tileSize was not 1.

3.8.8

The move, moveTo, rotate, and rotateTo sprite functions all return a Promise that resolves to true when the movement is finished.

But, if the sprite's movement is interrupted by a new movement or a collision that significantly changes the sprite's trajectory, the promise will resolve to false.

I also fixed a bug that caused sprite.offset to not be maintained when changing the sprite's collider type.

3.8.5

Added cavas.w/canvas.width and canvas.h/canvas.height which you should use instead of the p5.js instance width and height variables, which are not specific enough and can lead to confusion. I changed all the p5play docs to use canvas.w and canvas.h.

3.8.3

Replaced sprite.offsetCenter with a sprite.offset object that has x and y properties. It can be changed for a whole group of sprites using group.offset. Added support for other group object props like mirror and scale.

3.8.0

I added a offsetCenter function that enables users to offset the center of a sprite. Also the rotateTo and rotateTowards functions can now use angles, as suggested by @ busch! I updated the examples:
https://p5play.org/learn/sprite.html?page=7

These functions can still accept position objects with x and y coordinates. However, if you want to provide position coordinates as numbers, then speed must be specified in the function as well.