API Documentation for: 0.4.0
Show:

TweenJS Module

Defined in: TweenJS:3

The TweenJS Javascript library provides a simple but powerful tweening interface. It supports tweening of both numeric object properties & CSS style properties, and allows you to chain tweens and actions together to create complex sequences.

Simple Tween

This tween will tween the target's alpha property from 0 to 1 for 1s then call the onComplete function.

    target.alpha = 0;
    Tween.get(target).to({alpha:1}, 1000).call(onComplete);
    function onComplete() {
        //Tween complete
    }

Chainable Tween

This tween will wait 0.5s, tween the target's alpha property to 0 over 1s, set it's visible to false, then call the onComplete function.

    target.alpha = 1;
    Tween.get(target).wait(500).to({alpha:0, visible:false}, 1000).call(onComplete);
    function onComplete() {
        //Tween complete
    }