Implements basic animation framework, as well as some pre-defined animation effects.
Creates animation. Animation effect is specified via animationStructure, executed with delay of delay.
User may specify a callback to be executed when animation ends, via endFunction
property.
Starts the animation.
Stops the animation.
Creates an animationStructure
, which describes current animation effect. This animation will be applied to
DOM node element, its type is specified as a constant, and further arguments can be set in paramsObj,
depending on current type:
var div = Dom.create("div");
var as = AnimationStructure.generate(div, AnimationData.FADEOUT, {min:0.5, step: 0.02});
var a = new Animation(as, 50);
a.start(); // will slowly make <div> element 50% transparent