aduros / flambe

Rapidly cook up games for HTML5, Flash, Android, and iOS.
https://github.com/aduros/flambe/wiki
MIT License
745 stars 118 forks source link

Added animation scripts #295

Closed Jorjon closed 4 years ago

Jorjon commented 9 years ago

AnimateFromTo, which animates starting from a certain value. AnimateFromToThen, which is a ternary animation, basically doing two AnimateTo animations. ScaleTo, much like MoveTo but with scale.

markknol commented 9 years ago

Nice! I think the AnimateFromToThen is a bit overkill, since this can easily solved by just using 2 AnimateTo's, right? Btw, maybe "Animate" would be a better name than "AnimateFromTo", since AnimatedFloat also has a .animate(), which also does a from-to.

To complete, maybe you could also add the RotateTo? :)

Jorjon commented 9 years ago

@markknol Thanks. I agree that the AnimateFromToThen seems a bit too much, I think I used it once when I had to make multiple ternary animations, to save time. But I don't think it hurt either.

Regarding the name, as a heavy TweenMax user, I followed the same convention. You have TweenMax.to(), and TweenMax.fromTo(), that's why if we have AnimateTo in Flambe, I thought the other animation should be called AnimateFromTo. In my humble opinion it is a little more easy to recognize what the animation do, which we would not have if we call it simply Animate.

Thanks for your comments!

Jorjon commented 9 years ago

Is Bruno still making merges?