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

[WIP] Add RBBRubberbandAnimation #10

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

[WIP] Add RBBRubberbandAnimation #10

wants to merge 14 commits into from

Conversation

robb
Copy link
Owner

@robb robb commented Apr 6, 2014

This adds RBBRubberbandAnimation, which is an alternative to RBBSpringAnimation and CASpringAnimation that is optimized for CGPoint animations and correctly handles the velocity paramter, even if ∆x or ∆y are 0.

RBBRubberbandAnimation *rubberband = [RBBRubberbandAnimation animationWithKeyPath:@"position"];

rubberband.from = CGPointMake(0, 0);
rubberband.to = CGPointMake(0, 0);
rubberband.mass = 1;
rubberband.damping = 10;
rubberband.stiffness = 100;
rubberband.velocity = CGPointMake(400, 0);

RBBSpringAnimation will remain as an alternative to CASpringAnimation.

@robb
Copy link
Owner Author

robb commented Apr 10, 2014

I realize a scalar rubberband animation would still desirable for animating scale or rotation

RBB2DRubberbandAnimation + RBBScalarRubberbandAnimation ? 😒

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.

2 participants