Skip to content

p5.js 2.0 Updates #9

Closed
Closed
@limzykenneth

Description

@limzykenneth

Hi @remistura, you may have seen that for the past year we have been working on the next major release of p5.js as p5.js 2.0 and we are currently in the process of reviewing known community libraries to see what kind of compatibility there are currently.

However before I get into the potential updates that may be required, I want to highlight the timeline we are currently working with and that we are planning for a relatively long transition timeline. After the release of p5.js 2.0 currently planned for late March, p5.js 1.x will still be the default version of p5.js used in any new p5.js web editor sketch and the website will still be using reference and materials referencing p5.js 1.x. These will switch over in August 2026, giving more than a year for the larger community to transition and not disrupt mid-term plans of teachers. p5.js 1.x will continue to receive bug fixes throughout this period.


For p5.tween, the main incompatibility that I find is the use of p5.prototype.registerMethod for registering lifecycle hook functions (specifically one use of the pre hook), this has since been replaced in p5.js 2.0 with a more unified addon library syntax. I have a longer form write up about it here. You may wish to keep compatibility with both p5.js 1.x and 2.0, in that case I would suggest checking for existance of the p5.prototype.registerMethod function and if exist use the current implementation and if not exist use the newer implementation.

There will be a bit more boilerplate code but it should only be limited to the lifecycle hook functions and functions attaching the the p5.prototype should work as usual. I'm happy to help with the implementation if you'd like through advice or a PR, let me know if you need anything from me! 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions