-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Fix endShape() to Properly Close Paths and Prevent Shape Merging #7583
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
Conversation
|
Thanks for taking this on @Forchapeatl! We're also a few weeks away from releasing p5 2.0, which lives on the I think this is still worth merging into the main branch, but we should also test if the same issue is needed in 2.0, and if we need to make a second PR into |
|
Thank you @davepagurek , it the issue replicates in the beta 2.0 . Should I create a PR for the |
|
That would be great, thanks! |
|
Please this is the new PR for dev2.0 branch. I have to close this one |
|
@Forchapeatl we can re-open this PR and merge it into |
|
Yes it works as expected now. It can be tested here https://editor.p5js.org/forchapearl1/sketches/96C3TOR8y |
|
Thanks @Forchapeatl! |
This PR resolves an issue where endShape() could unintentionally merge with subsequent shapes (e.g., ellipse()), causing unintended dragging effects.
Resolves #7532
Changes:
Ensures
this.drawingContext.closePath();happens onendClip()before any new shape starts.Screenshots of the change:
before
after
PR Checklist
npm run lintpasses