Skip to content

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.

3 participants