animation.js

Implements basic animation framework, as well as some pre-defined animation effects.


Ojbects

Methods

Functions

Constants


Animation(animationStructure, delay)

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.

Animation::start()

Starts the animation.

Animation::stop()

Stops the animation.

AnimationStructure.generate(element, type, paramsObj)

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