Terrible pun, I know...
Line 8: I have added another source script, which contains the Ease functions
Line 15: Another way of calling the console
Lines 24 and 25: The third parameter in the to() function is the type of Ease you want to apply. This site is a good place to see the effect of different tweens: http://andysaia.com/blog/tweenjs/ and http://www.createjs.com/#!/TweenJS/demos/sparkTable
A diary about programming problems - to help me more easily learn from (and Google) past mistakes.
Showing posts with label call console. Show all posts
Showing posts with label call console. Show all posts
Thursday, 2 May 2013
TweenJS: Adding Ease, With Ease...
TweenJS: Overriding Tweens
If you create two tweens for a single object, they will both run together, and as long as you don't try to tween the same property at the same time, it should be fine.
If you want, you can override a tween, and two ways to do this are shown in lines 16 and 17 (on line 16, the fourth parameter of the get function is the override, the third is some kind of plugins object that I don't understand right now...).
On line 15, I have also shown a way to call the console, for the Flashers, this is like trace(). To see the calls to the console on Mozilla Firefox, go to Tools, Web Developer, Web Console.
Both of these tweens use the loop parameter, so that the animation keeps on going round and round.
Subscribe to:
Posts (Atom)
