docs: remove deprecated beginGeometry() and endGeometry() references by codervinitjangir · Pull Request #8642 · processing/p5.js

@codervinitjangir

Resolves #8631

Changes:
In p5.js 2.0, beginGeometry() and endGeometry() have been removed from the public API and replaced by buildGeometry(). However, several JSDoc comments still contained broken links to these removed functions.

This PR removes those outdated references to fix the 404 errors on the reference website.

Specific updates include:

  • src/webgl/3d_primitives.js: Removed "See beginGeometry()..." from the buildGeometry() description, removed references in the freeGeometry() description, and removed the @example block demonstrating the old functions.
  • src/webgl/loading.js: Removed old functions from the list of ways to build p5.Geometry in the model() description.
  • src/webgl/p5.Renderer3D.js: Updated private documentation to remove cross-references to the deprecated functions.

Screenshots of the change:
N/A - Changes are strictly limited to JSDoc comments and documentation cleanup.

PR Checklist

@codervinitjangir

@ksen0 ksen0 changed the base branch from main to dev-2.0

March 16, 2026 13:46

ksen0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for your work. I left some comments - there are many problems.

Please include screenshots. To generate screenshots for doc changes, please run locally the website: https://github.com/processing/p5.js/blob/dev-2.0/contributor_docs/contributing_to_the_p5js_reference.md

To test this PR, I ran inside my local p5.js-website checked out to 2.0 branch: (base) kuksenok@Ks-MacBook-Air p5.js-website % npm run custom:dev https://github.com/codervinitjangir/p5.js.git#fix/buildGeometry-docs but you can use the documentation I linked to be able to build from your local p5.js


/**
* Finishes creating a new <a href="#/p5.Geometry">p5.Geometry</a> that was
* started using <a href="#/p5/beginGeometry">beginGeometry()</a>. One can also

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does not make sense. This is a private method.

* draws shapes.
*
* If you need to draw complex shapes every frame which don't change over time,
* combining them upfront with `beginGeometry()` and `endGeometry()` and then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the one below - this does not make sense, it's a private method. It has not been fully removed but it is not in the reference.

* will run faster than repeatedly drawing the individual pieces.
*
* The parameter, `callback`, is a function with the drawing instructions for
* the new <a href="#/p5.Geometry">p5.Geometry</a> object. It will be called

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change results in incomplete text:

Image

…y-docs

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

@codervinitjangir

@codervinitjangir

Hi @ksen0, thank you for the review! I have addressed all the feedback points:

  1. Reverted p5.Renderer3D.js: I have reverted the changes to the private methods as they should retain their internal documentation.

  2. Fixed 3d_primitives.js: I completed the sentence in the buildGeometry() JSDoc and ensured the markdown formatting with backticks is correct.

  3. ** Synced** Branch: I also merged the latest changes from upstream/dev-2.0.

I tried to run the dev server locally to provide the requested screenshots, but I ran into a known environment issue on my Windows setup (the sharp dependency failing during npm install).

Since my changes are purely JSDoc text updates, could you please verify the build visually on your end? The code formatting should be perfect now. Let me know if anything else is needed!

@ksen0

@codervinitjangir

@codervinitjangir