Skip to content
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

#6 curve builder #8

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

richardTingle
Copy link
Contributor

Adds a builder for curves that can be used like

 Curve curve = Curve.builder()
         .anchorPoint(new Vector2f(0,0))
         .anchorPoint(new Vector2f(0.5f,0.5f))
         .controlPoint1(new Vector2f(0.6f,0.5f))
         .controlPoint2(new Vector2f(0.8f,2f))
         .anchorPoint(new Vector2f(1,2f))
         .build();

The builder statically prevents end being called when not at an anchor, or controlPoint1 or controlPoint2 or nextAnchor being called at the wrong time

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