Skip to content

Updated custom-shapes-and-smooth-curves.mdx #856

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

Closed
wants to merge 44 commits into from

Conversation

jishnunambiarr
Copy link

Update Custom Shapes and Smooth Curves tutorial for p5.js 2.x

Changes

  • Updated the curvedSparkle() function to use the p5.js 2.x bezierVertex() API format.
  • Updated the bezierVertex usage throughout the document to the p5.js 2.x API.
  • Removed external fork at the end and added the complete updated sketch for better clarity and self-containment.

Before

// Original anchor at top.
bezierVertex(0, -100);

// Top-right curve.
bezierVertex(0, -50, 50, 0, 100, 0);

After

// Original anchor at top.
vertex(0, -100);     // First point needs to be vertex()

// Top-right curve.
bezierVertex(0, -50);  // Control point 1
bezierVertex(50, 0);   // Control point 2
bezierVertex(100, 0);  // Anchor point

Related Issue

Closes #839 - Update “Custom Shapes and Smooth Curves” tutorial for p5.js 2.x

Testing

  • Verified the updated code works with p5.js 2.x
  • Confirmed the curved sparkle shape renders correctly with the new API format

notthewave and others added 30 commits February 20, 2025 11:15
Fully unmount sketches that go out of frame
Add libraries, fix bug with old featured ones not getting cycled
Updated description and `sourceURL`.
Resolves processing#831: Reduces calls to Open Processing API to prevent hitting rate limit errors
@ksen0 ksen0 changed the base branch from main to 2.0 June 3, 2025 15:09
@ksen0 ksen0 changed the base branch from 2.0 to main June 3, 2025 15:09
@ksen0
Copy link
Member

ksen0 commented Jun 3, 2025

Hi @jishnunambiarr ! Thanks for working on this. I've checked the example code and the updates and that looks great - however the PR is made against the main branch (which has the 1.x reference) rather than the 2.0 branch (which has the 2.x reference and deploys to beta.p5js.org).

Because the branches have diverged, it's not straightforward to automatically rebase here. Could you please close this PR and make a new one targeted at the 2.0 branch? We'd be happy to merge it then!

@jishnunambiarr jishnunambiarr changed the base branch from main to 2.0 June 3, 2025 17:56
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.