Skip to content

Remove p5.js 1.x examples - #308

Merged
shiffman merged 4 commits into
mainfrom
remove-p5-1
Aug 3, 2026
Merged

Remove p5.js 1.x examples#308
shiffman merged 4 commits into
mainfrom
remove-p5-1

Conversation

@gohai

@gohai gohai commented Jun 26, 2026

Copy link
Copy Markdown
Member

This moves the p5.js 2.x examples to the spot of their p5.js 1.x counterparts. (Uploading the examples to the web editor after the next release should automatically update those to the p5.js 2.x syntax while retaining the URL.)

This has some simplifications to the scripts that haven't been tested yet.

Also some tweaks to the FeatureExtractor (which is currently also not yet on the Web Editor).

gohai added 4 commits June 26, 2026 18:29
This also (manually) updates the README.md file. The scripts will still need to be adapted in an upcoming commit.
Examples appear to still work afterwards. CC @JunhaoZhu0220
Only MobileNet is supported at the moment - this silences a (helpful) warning. CC @JunhaoZhu0220
This simplifies things by removing support for p5.js 1.x. This is currently untested.
@gohai
gohai requested a review from pearmini June 26, 2026 22:53
@gohai gohai mentioned this pull request Jun 26, 2026
@ksen0

ksen0 commented Jun 27, 2026

Copy link
Copy Markdown

Hi @gohai , thanks for the very quick response! Do I understand correctly, that this would update all ml5 examples on the web editor? The reason I ask is that after the website switch the v1 website will still be up at v1.p5js.org. The tutorial would still be there, but if it links to version 2 live examples, that might be good to add a note or something.

Alternatively you could embed the examples in their entirety on the tutorial page. (Some recent updates to parameterizing the code embed blocks more; it is also possible to load additional scripts into editable sketches.) So if the code is different for v1, it is possible to create a self-contained archived tutorial variant, if that's preferred.

@gohai

gohai commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

@ksen0 Indeed, as this stands now, this would switch over all the examples once we run the script (typically after releasing a version). I had a closer look at the tutorial you linked: turns out that this is still making use of the pre-1.0 version of ml5, with the web-editor links pointing to the tutorial authors' personal sketches. Ideally, this would get updated to ml5 1.x as well (the API changed, so this might entail some textual changes too). I'll make a note about this in the issue as well.

@gohai

gohai commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

@shiffman Please consider merging this either before or after the patch release you mentioned! (I think this should be done alongside updating our documentation to assume p5.js 2.0. Announcing the feature detector could happen at the same time as well. I still need to review the user-facing examples a bit more for that, though...)

@shiffman

Copy link
Copy Markdown
Member

Thank you for the reminder @gohai! I've opened ml5js/ml5-website-v02-docsify#236 to track the move to p5.js 2.

@shiffman

shiffman commented Aug 3, 2026

Copy link
Copy Markdown
Member

Now that the docs are updated for p5.js 2.0 I'm merging this branch!

@shiffman
shiffman merged commit 0cb8753 into main Aug 3, 2026
@gohai
gohai deleted the remove-p5-1 branch August 7, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants