Skip to content

p5.js 2.0 Updates #26

Open
Open
@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.palette, I have tested the provided examples and there is one main incompatibility which is that for p5.js 2.0 we have removed the preload() mechanism for asynchronous operation and switched to using Javascript native async/await. This means that for asynchronous operation, it should now return a promise.

You may wish for you addon library to support both 1.x and 2.0 for the moment and for this kind of implementation I would suggest is to use the older implementation with preload if _incrementPreload and _decrementPreload methods are detected on the p5 object while returning a promise if these methods are not detected. I have a long form write up about the system here if you are interested.

If that is the approach you are happy with for p5.palette, I'm happy to help with the implementation or file a PR if you'd like, just let me know! 😄

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