Hacker News new | past | comments | ask | show | jobs | submit login
Pop: An extensible animation engine for iOS and OS X (github.com/facebook)
129 points by jpdlla on April 28, 2014 | hide | past | favorite | 24 comments



Pop doesn't have any example code yet so I created a video tutorial to help folks get started (with source code): http://tapity.com/tutorial-getting-started-with-pop/


The video tutorial is nice but I fail to see how it's any easier to do with pop than just with CA. (I've been a Obj-C/Cocoa dev for 8 years)


It isn't much better for simple animations like this but I find it much easier for complex, gesture-based, dynamic animations that can change at any time based on user input.


Also a designer can tell a dev exactly what he/she wants in terms of animation values (assuming they're using origami)


> Also a designer can tell a dev exactly what he/she wants in terms of animation values (assuming they're using origami)

Thank you for introducing me to Origami! My time on HN today was not wasted.

(It's at https://facebook.github.io/origami/ if somebody else reading this also did not know about it.)


Given that much of the Paper prototyping was done in Origami, this was my first thought when I saw this library. I haven't actually used Paper yet (it's still US-only) but I'm in love with these kinds of tactile, fun interfaces.


Makes sense.


I think the main difference is they are easy to interrupt and continue from the current real position, where doing that with CA is more difficult. That would let you do some nifty stuff with gestures, I guess.


Awesome. Thanks for doing this.

I started a little example project too. So far, I have some sliders that let you play with the decay animation.

https://github.com/callmeed/pop-playground

If anyone wants to help, drop me an email.


I dig. I'd be curious to see your other implementation that you show at the end.

That said, I still have a hard time seeing how Pop is much different than iOS 7's animate with springs API.


I haven't done a tut for that yet but the source is here: https://github.com/jerols/PopTut


One thing I see right off is that it's iOS 6 compatible. I still have apps supporting that, so this is way more useful to me.


Also there's a blog post with more details of the library at https://code.facebook.com/posts/234067533455773/introducing-...


I'm missing the benefit of this over iOS 7's Core animation. I guess support for earlier os versions is the big advantage but for me all my new work is on iOS 7+ only apps and I'm not sure this helps a ton for that.


The key difference as highlighted in the video introduction is that Pop animates arbitrary properties on the model layer, allowing for easily cancelable and continuous animation. This approach is contrary to the Core Animation's transactional model, animating only the presentation layer.

If you are referring to the UIKit keyframe animation API that was added in iOS 7, that API has existed for some time at the Core Animation level. Keyframes are difficult to get right, and don't model physical systems like springs very well.


The author Kimon Tsinteris goes into details at the Facebook Paper[1] event.

[1] - https://www.youtube.com/watch?v=OiY1cheLpmI#t=1527


It appears to let you add your own animation primitives, instead of being restricted to composing changes to the animatable CALayer properties.

Could be useful for some things.


https://github.com/seivan/TransitionControllerWithPop

So I tried with a custom transitionController and it doesn't play along nicely without using CADisplayLink.

It's the same concept as CAAnimation, you need to manually step through the animation.

It's not bad per say, if you need to morph some layers or animate stuff like shadows or anything that doesn't work out of the box with [UIView animate:....]


This is the core animations and interactions library used in Paper app for iOS. I am looking forward to see some examples and tutorials on this, because for someone like me with no experience on UIAnimation, I guess it is something fairly easy to use when there are samples out there.


Agreed. I'm going to play around and see what I can learn from it, but a small tutorial would help me get jump started as well. Whether it be the coding aspect, or just ideas on how to implement different animations.


What are the chances that there will be something similar for Android?


We open sourced Rebound for Android a few months ago. It provides simple spring dynamics similar to Pop and is used to drive animations in Facebook apps like Chat Heads and FB Home.

http://facebook.github.io/rebound

http://github.com/facebook/rebound

twitter: @rebound_lib


I've been waiting for this ever since reading http://tapity.com/thank-you-facebook/ Hooray!


Awesome! I've been waiting for them to put this up.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: