There is a nice class embedded in the MooTools core package, the Fx.Transitions. It is used to spice up the default animations in many different way. I won't go into details, there is a cool breakdown about the capabilities of the class.
I'd like to show you how you can pick any transition function and use them outside the Fx classes.
This approach can be handy if you need to trigger other functions or to work with the Canvas element, maybe update some non standard CSS properties.
The one line below returns a function that contains the easing equation.
Fx.Transitions.Circ.easeOutTo access the power of the Transitions functions, you need to pass a value, computed by the following formula:
// x is the current frame var val = Fx.Transitions.Circ.easeOut( x / 50 ) * 100;
All rights reserved, ©2008-2013 - Built on CodeIgniter framework - Konami codes - Mostly Valid XHTML 1.1 - Valid CSS 2.1