Skip to content

[2.0] Stabilize p5.Vector (umbrella issue) #8149

@GregStanton

Description

@GregStanton

[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:

  1. If you're interested in helping but aren't sure what to help with, you can comment here for guidance.
  2. 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 of p5.Vector
  • [2.0] Deprecate array() method of p5.Vector
  • [2.0] Proposal: A clearer API for vector components (no breaking changes)
  • [2.0] Stabilize x, y, and z fields of p5.Vector
  • [2.0] Stabilize w field of p5.Vector
  • [2.0] Stabilize the undocumented dimensions field of p5.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.Vector to $n$ dimensions
  • [2.0] Proposal: A standard policy for vector dimension mismatches
    • [2.0] Update the equals() method of p5.Vector (sub-sub-issue)
  • [2.0] Resolve NaN results from vector operations (PLACEHOLDER—not a real sub-issue)
    • This is a reminder to check that all observed NaN bugs have been resolved by previous sub-issues
    • If not, this can be replaced with more precise sub-issues relating to those specific bugs.

Additional documentation cleanup

  • [2.0] Update body of p5.Vector reference 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’s dist() 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.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions