Skip to content

Shape updates #11

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
Mar 22, 2025
Merged

Shape updates #11

merged 3 commits into from
Mar 22, 2025

Conversation

davepagurek
Copy link
Collaborator

Some implementations previously missing, brought up again by @GregStanton here: #1 (comment)

  • Maps the old curve() to the new spline() (changed in Minor 2.0 shape changes p5.js#7656)
  • Puts back public beginGeometry/endGeometry methods (hidden in favor of buildGeometry for API clarity; they still exist internally in the renderer as part of the internal implementation, so we can just expose them again here)
  • Adds an approximate mapping of the old curveDetail and bezierDetail to the new curveDetail. It's not super feasible in an addon to fully restore the old behaviour fully, so this has the following compromises:
    • It sets the sampling density based on an assumed average curve length, since we can't easily access the actual length of each curve. I'm using a third of the diagonal of the canvas size.
    • There's still only one detail under the hood; code that tries to use two separate details (which at least seems uncommon in practice) will end up overwriting the same singular detail

@davepagurek davepagurek merged commit 220a1c3 into main Mar 22, 2025
@davepagurek davepagurek deleted the shape-updates branch March 22, 2025 18:48
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.

1 participant