for ActionScript there are quite a few "tweening" frameworks to facilitate animating objects. for example TweenLite: http://www.greensock.com/tweenlite/
it allows to animate an arbitrary object with a single line of code:
Pseudocode: tween(myObject, 3.0f, {xpos:300});
what this line of code does is instanciating a new tweening object, which will step by step, during 3 seconds, animate the "xpos" property of 'myObject' from whatever value it currently has to 300. additionally it allows to use a variaty of different interpolation functions.
So in order to animate an object to a new point, i can write a single line of code and forget about it (the tweening object will destroy itself once it finished animating the value).
My Question is, whether there is anything comparable for c++?
I know that those languages are completely different. Anyway - i think it should be possible and would be highly convenient so if anyone knows a framework that does the trick, would be welcome :)
thanks!
I have stumbled upon libClaw's tweeners, and it looks promising - well documented, pretty mature and more or less alive.
I'm not sure I like the fact that it operates on double
s only whereas I would need it primarily for float
s and sometimes int
s, but I don't think the double calculation and casting performance penalty should be too big...
How about cpptweener. Of course which is ported from the awesome as3 tweener library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With