RBBAnimation icon indicating copy to clipboard operation
RBBAnimation copied to clipboard

[WIP] Add RBBRubberbandAnimation

Open robb opened this issue 11 years ago • 1 comments

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 avatar Apr 06 '14 12:04 robb

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

RBB2DRubberbandAnimation + RBBScalarRubberbandAnimation ? :unamused:

robb avatar Apr 10 '14 17:04 robb