animation.js

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


Objects

Methods

Functions

Constants


OAT.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.

OAT.Animation::start()

Starts the animation.

OAT.Animation::stop()

Stops the animation.

OAT.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 = OAT.AnimationStructure.generate(div, OAT.AnimationData.FADEOUT, {min:0.5, step: 0.02});
var a = new OAT.Animation(as, 50);
a.start(); // will slowly make <div> element 50% transparent