Skip to content

docs: remove deprecated beginGeometry() and endGeometry() references#8642

Open
codervinitjangir wants to merge 4 commits intoprocessing:dev-2.0from
codervinitjangir:fix/buildGeometry-docs
Open

docs: remove deprecated beginGeometry() and endGeometry() references#8642
codervinitjangir wants to merge 4 commits intoprocessing:dev-2.0from
codervinitjangir:fix/buildGeometry-docs

Conversation

@codervinitjangir
Copy link

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

@ksen0 ksen0 changed the base branch from main to dev-2.0 March 16, 2026 13:46
Copy link
Member

@ksen0 ksen0 left a comment

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Author

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!

@codervinitjangir codervinitjangir requested a review from ksen0 March 17, 2026 19:07
@ksen0
Copy link
Member

ksen0 commented Mar 18, 2026

Hi @codervinitjangir thanks for your work! Please include screenshots. To generate screenshots for doc changes, please use this guide to clone the website locally: https://github.com/processing/p5.js/blob/dev-2.0/contributor_docs/contributing_to_the_p5js_reference.md If you have any problems with the guide please let us know. But it should be possible. Thank you!

@codervinitjangir
Copy link
Author

Hi @ksen0, thanks for your patience! I had some local environment issues with the Astro dev server on Windows, but I managed to get a successful static build running. >
I have attached the screenshots for buildGeometry, freeGeometry, and model below. The descriptions, syntax, parameters, and interactive examples are all rendering correctly. Let me know if everything looks good to go.

model buildGeometry freeGeometry

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.

[2.0 docs] buildGeometry reference should not link to begin/endGeometry

2 participants