Closed domhofmann closed 13 years ago
I've started work on this in the 0.2-dev branch.
Subclasses of PRTweenLerpPeriod
that implement <PRTweenLerpPeriod>
can be added to operations and used as normal. I've also added shorthand (see #3 for info.)
Shorthand can be used like this:
[PRTweenCGRectLerp lerp:testView property:@"frame" from:CGRectMake(0, 0, 100, 100) to:CGRectMake(100, 100, 250, 250) duration:3]
Currently CGRect
and CGPoint
lerps are supported, although it's easy to extend the system for your own uses.
Merged into master.
http://en.wikipedia.org/wiki/Linear_interpolation
We should add a lerping model to allow developers to tween a rectangle or point with less effort. While the math is pretty simple, I'm not positive about where we should put this yet. Modifying
PRTweenPeriod
to take arbitrary types instead ofCGFloat
sounds good on the surface until you realize it'll force us to wrapCGFloat
inNSValue
, which hurts simplicity.I need to do some more thinking here but I'd love to hear any thoughts.