[2.0] Stabilize `p5.Vector` (umbrella issue)
[2.0] Stabilize p5.Vector (umbrella issue)
Hi everyone!
As discussed in #8118, this umbrella issue is designed to organize the work needed to stabilize p5.Vector in p5.js 2.0. The work is organized into dedicated sub-issues. The discussion in this umbrella issue serves two purposes:
- If you're interested in helping but aren't sure what to help with, you can comment here for guidance.
- If you discover a problem that's not covered by the existing sub-issues, we can decide how to chunk it into sub-issues.
The list below covers tasks that have already been identified. The purpose of the sub-issues is to scope work into actionable tasks whenever possible, or to provide a forum for focused discussion if needed. In exceptional cases where an existing sub-issue is too broad to be actionable, sub-sub-issues could be created if necessary.
Work to create the existing sub-issues is ongoing. Once each sub-issue is created, the current issue will link to it.
Creation and inspection
-
[2.0] Stabilize the
toString()method ofp5.Vector -
[2.0] Deprecate
array()method ofp5.Vector - [2.0] Proposal: A clearer API for vector components (no breaking changes)
-
[2.0] Stabilize
x,y, andzfields ofp5.Vector -
[2.0] Stabilize
wfield ofp5.Vector -
[2.0] Stabilize the undocumented
dimensionsfield ofp5.Vector -
[2.0] Stabilize behavior of
createVector()with zero arguments -
[2.0] Add array, vector overloads to
createVector()for consistency?
Operations
-
[2.0] Complete extension of
p5.Vectorto $n$ dimensions -
[2.0] Proposal: A standard policy for vector dimension mismatches
-
[2.0] Stabilize
set()method ofp5.Vector -
[2.0] Simple policy clarification to prevent unintended side effects (e.g.
vec1D.mult(vec2D)) -
[2.0] Update the
equals()method ofp5.Vector - Update other methods...
-
[2.0] Stabilize
- [2.0] Return vector instance from general component setter (for chaining)
-
[2.0] Proposal: Resizing functions for vectors (e.g.
pad()andcrop()) -
[2.0] Resolve
NaNresults from vector operations (PLACEHOLDER—not a real sub-issue)- This is a reminder to check that all observed
NaNbugs have been resolved by previous sub-issues - If not, this can be replaced with more precise sub-issues relating to those specific bugs.
- This is a reminder to check that all observed
Additional documentation cleanup
-
[2.0] Update body of
p5.Vectorreference page (fields and method specs may change) -
[2.0] Document
clampToZero()(docs don't appear in beta reference) -
[2.0] Add explanatory visual examples to
random(),random2D(),random3D() -
[2.0] Fill gaps in
p5.Vector’sdist()documentation (some docs from 1.x have disappeared) -
[2.0] Audit all reference pages for
p5.Vector(PLACEHOLDER—not a real sub-issue)- Many improvements can be made as part of the preceding sub-issues.
- The "Documentation audit" placeholder is a reminder to do a full audit after that work has completed.
Hi @ksen0, @limzykenneth, @inaridarkfox4231, @sidwellr, @Ahmed-Armaan, @davepagurek, and @holomorfo! This is the umbrella issue for p5.Vector stabilization. It includes a range of dedicated sub-issues covering the tasks that arose from our conversations. I still need to make a few more sub-issues, but this should be a good start. The automated sub-issue list attached to the top post will always show the most up-to-date set of sub-issues.
Hi everyone 👋
I'm Shubham Kahar, a new contributor interested in helping with the p5.Vector stabilization effort.
I’ve subscribed to this umbrella issue and the sub-issues mentioned by @GregStanton.
I support the current proposals and am particularly interested in testing, documentation, and small feature tasks once the blocking issues are approved.
Please feel free to tag me if help is needed for testing or implementation later on.
Excited to learn and contribute! 🚀
Hi everyone,
I want to thank you all for the incredible energy and detailed work you’ve put into this important Vector stabilization effort.
Moving forward, the maintainer team will be guiding this effort directly, and I will be stepping back from my role as steward. Please look to @ksen0 and the maintainer team for guidance on approvals and next steps.
Thank you again to all the volunteers for the productive discussions, your insights, and your dedication!
cc: @adity1raut, @Anirudh-x, @Ayaan005-sudo, @atif09, @avinxshKD, @ayushman1210, @GlaDrancE, @harishbit, @harshgautam5678, @Homaid, @hxrshxz, @justAnotherAnotherUser, @kunal595, @lokesh-singhal, @MRKrinetic, @nickmcintyre, @RandomGamingDev, @reshma045, @Shubhamkahar196, @sidwellr, @vtushar06
Huge thanks to @GregStanton in laying the foundation! And thanks everyone for your input so far @adity1raut, @Anirudh-x, @Ayaan005-sudo, @atif09, @avinxshKD, @ayushman1210, @GlaDrancE, @harishbit, @harshgautam5678, @Homaid, @hxrshxz, @justAnotherAnotherUser, @kunal595, @lokesh-singhal, @MRKrinetic, @nickmcintyre, @RandomGamingDev, @reshma045, @Shubhamkahar196, @sidwellr, @vtushar06
We have set up a more direct discussion space for p5.js 2.x Vector implementation bugfixes, documentation, and improvements as a Discord channel: https://discord.gg/gH3VcRKhen
Please join the channel, and optionally the upcoming call to resolve some of the stickier issues: https://www.when2meet.com/?33551073-4Kcmb
(As we discuss/unblock each of the vector issues, I will also follow up on those issues as a comment. So if you prefer to participate only (or primarily) on GitHub, that still also works! If you can't make it to the meeting, also no worries, as long there are open topics, we can coordinate more direct calls.)
Thanks @GregStanton for all the guidance so far, and thank you @ksen0 and the maintainer team for taking over the coordination. 🙌
I’ve joined the Discord channel and I’ll continue following the discussions around the vector stabilization work. As mentioned earlier, I’m happy to help with testing, documentation, or smaller tasks once the pending decisions are finalized.
Please feel free to tag me wherever help is needed — I’m excited to continue contributing and learning from this process! 🚀