Skip to content

Rename conflicting sphere() functions to avoid shadowing p5.js built-in #896

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

Merged
merged 3 commits into from
Jul 11, 2025

Conversation

reshma045
Copy link

@reshma045 reshma045 commented Jul 7, 2025

Description:
This PR resolves a naming conflict in the intro-to-p5-strands tutorial page. A custom helper function named sphere() was shadowing the built-in p5.js sphere() function, causing confusion. This renames two user-defined functions named sphere() to randomPositionOnSphere() and getAnimatedSpherePosition()

Verification:

  • Verified that renaming sphere() to randomPositionOnSphere() and getAnimatedSpherePosition() does not affect functionality.
  • Confirmed no naming conflicts or runtime errors related to the original sphere() function name.

Issue: Closes #868

Copy link
Contributor

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@perminder-17 perminder-17 merged commit 41a82f6 into processing:2.0 Jul 11, 2025
4 checks passed
@reshma045
Copy link
Author

@perminder-17 Thank you so much for reviewing and merging this PR!

@perminder-17
Copy link
Contributor

@perminder-17 Thank you so much for reviewing and merging this PR!

Thanks to you for working on this one.

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 participants