facebookarchive / pop

An extensible iOS and OS X animation library, useful for physics-based interactions.
Other
19.66k stars 2.88k forks source link

How to implement the function like CAReplicatorLayer class? #345

Closed sunjmmeishao closed 7 years ago

sunjmmeishao commented 7 years ago

does pop support the function?

grp commented 7 years ago

I'm not sure what function you mean — CAReplicatorLayer is meant for display, but Pop controls animation. Using custom properties, you could animate the properties of a CAReplicatorLayer, but I don't believe there are any built in properties designed for it.

sunjmmeishao commented 7 years ago

@grp hi, my meaning is the performance of POP. look like that the performance is just in relation to UIView or CALayer or iOS. I wonder if POP's performance is just better a little than coreAnimation. I have another question. How does POP support a path. POP is not expose the time parameter。I can not calculate the position of a view for my own use. thanks the source code, I can study very much!

grp commented 7 years ago

Pop can't compare to CAReplicatorLayer; it performs a different function. Compared to CAAnimation, Pop is generally slower: it has to update the property each frame. However, Pop is more flexible, for example for changing animations dynamically based on user interaction.

Pop doesn't support animating paths. If you just need the progress of an animation, you can use a custom POPAnimatableProperty with a property representing animation progress.