Ease Class
The Ease class provides a collection of easing functions for use with TweenJS. It does not use the standard 4 param easing signature. Instead it uses a single param which indicates the current linear ratio (0 to 1) of the tween.
Most methods on Ease can be passed directly as easing functions:
createjs.Tween.get(target).to({x:100}, 500, createjs.Ease.linear);
However, methods beginning with "get" will return an easing function based on parameter values:
createjs.Tween.get(target).to({y:200}, 500, createjs.Ease.getPowIn(2.2));
Please see the spark table demo for an overview of the different ease types on TweenJS.com.
Equations derived from work by Robert Penner.
Item Index
Methods
- backIn static
- backInOut static
- backOut static
- bounceIn static
- bounceInOut static
- bounceOut static
- circIn static
- circInOut static
- circOut static
- cubicIn static
- cubicInOut static
- cubicOut static
- elasticIn static
- elasticInOut static
- elasticOut static
- get static
- getBackIn static
- getBackInOut static
- getBackOut static
- getElasticIn static
- getElasticInOut static
- getElasticOut static
- getPowIn static
- getPowInOut static
- getPowOut static
- linear static
- none static
- quadIn static
- quadInOut static
- quadOut static
- quartIn static
- quartInOut static
- quartOut static
- quintIn static
- quintInOut static
- quintOut static
- sineIn static
- sineInOut static
- sineOut static
Methods
get
-
amount
Mimics the simple -100 to 100 easing in Adobe Flash/Animate.
Parameters:
-
amount
NumberA value from -1 (ease in) to 1 (ease out) indicating the strength and direction of the ease.
Returns:
getBackIn
-
amount
Configurable "back in" ease.
Parameters:
-
amount
NumberThe strength of the ease.
Returns:
getBackInOut
-
amount
Configurable "back in out" ease.
Parameters:
-
amount
NumberThe strength of the ease.
Returns:
getBackOut
-
amount
Configurable "back out" ease.
Parameters:
-
amount
NumberThe strength of the ease.
Returns:
getPowIn
-
pow
Configurable exponential ease.
Parameters:
-
pow
NumberThe exponent to use (ex. 3 would return a cubic ease).
Returns:
getPowInOut
-
pow
Configurable exponential ease.
Parameters:
-
pow
NumberThe exponent to use (ex. 3 would return a cubic ease).