Fix endShape() to Properly Close Paths and Prevent Shape Merging#7583
Fix endShape() to Properly Close Paths and Prevent Shape Merging#7583davepagurek merged 3 commits intoprocessing:mainfrom
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