Class: Tween

Tween

new GOWN.Tween(target, duration, easing, type)

A wrapper around PIXI.tween OR CreateJS/TweenJS to do animations/tweening, for example for a List or a Scroller.
Name Type Default Description
target Object The tween target
duration Number The tween duration
easing String 'linear' optional The easing function name
type String optional The tween library
See:

Members

static,readonlyGOWN.Tween.CREATEJS_TWEENString

The CreateJS tween type

static,readonlyGOWN.Tween.NONEString

No tween type

static,readonlyGOWN.Tween.PIXI_TWEENString

The PIXI tween type

durationNumber

The tween duration

easingString

The easing function name
Default Value:
  • 'linear'

typeString

The tween library

Methods

staticGOWN.Tween.CREATEJS_EASING(ease){function}

Get the specific CreateJS easing function (e.g. 'linear' or 'quadIn')
Name Type Description
ease String The name of the CreateJS easing function
Returns:
Type Description
function

staticGOWN.Tween.PIXI_EASING(ease){function}

Get the specific PIXI easing function
Name Type Description
ease String The name of the PIXI easing function
Returns:
Type Description
function

checkLibrary(){String}

A helper function to check if a tweening-library is present
Returns:
Type Description
String Name of the tweening-library

createTween(target, duration, easing)

Create a tween
Name Type Description
target Object The tween target
duration Number The tween duration
easing String The easing function name
Stop the tween
Start the tween
Name Type Description
data Object The tween data