-
Notifications
You must be signed in to change notification settings - Fork 50
Add support for P5 v2.x.x for the upcoming wrapper 5.x.x release #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Coverage report for commit: 2078d84
Summary - Lines: 100.00% | Methods: 100.00% | Branches: 91.30%
π€ comment via lucassabreu/comment-coverage-clover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamesrweb I tested the changes locally, and everything works as expected π
Regarding adding extra notes to the README, I donβt think itβs necessary since the component name and interface remain the same except that React needs to be updated to version 19 and all breaking changes in p5 version 2 must be addressed before using this version 5 component.
I was wondering about the P5 2.0 support changes, as I only noticed updates in the import and configuration files. Am I missing anything?
P.S. Are you considering renaming the component in version 6 from ReactP5Wrapper
to P5Canvas
? This would make its purpose immediately clear, improve readability, and align with common naming conventions by emphasizing what it actually renders. WDYT?
Btw @jamesrweb should we add a new version such as |
Nice π
Makes sense ππ»
They did a whole load of changes to how plugins work, async / await support, new methods for shaders, changes to methods like
Could do but I would make a separate PR for this, can you do that? |
Done. π’ |
@jamesrweb Yeah, I saw the list of changes. As I understand it, types are a weak point of the package for those who use it with TypeScript, as you mentioned in your comment on the code |
@jamesrweb Tested |
Related Issue
N / A
PR Type
Description
This PR allows the usage of
p5
v2.x.x within the wrapper and is being done as part of the preparations for the upcoming v5.x.x release.Proposed Changes
p5
peer dependency to the v2.x.x rangep5
versionp5
version 2.x.x changesasync
/await
in the setup methodHow Has This Been Tested?
Tested the demo application locally and checked all sketches still run as expected. Also ran the test suite and all existing tests pass without changes.
Screenshots/Recordings
I can recommend checking out the live stream from Dan and Kit. It is not required to review this but might be of interest for you to see some of the
p5
v2.x.x changes. In saying that most of the topics covered are surface level BUT for a deeper dive they have some beta docs you can check if interested also.Breaking Changes
Since
p5
v2.x.x now have some methods converted for use withasync
/await
such asloadFont
, etc, this will inherintly be a breaking change for consumers of the wrapper but it is from the side ofp5
itself and makes sense since this is a major change on their side.Checklist
Additional Notes
Please test thoroughly @yevdyko, perhaps in one of your personal projects like you usually do and maybe we can use your experience in the
5.x.x
release notes to help people navigate some of the changes to thep5
methods, etc, WDYT?