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:
Tween.get(target).to({x:100}, 500, Ease.linear);
However, methods beginning with "get" will return an easing function based on parameter values:
Tween.get(target).to({y:200}, 500, 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
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
-
amount
Mimics the simple -100 to 100 easing in Flash Pro.
Parameters:
-
amount
ObjectA value from -1 (ease in) to 1 (ease out) indicating the strength and direction of the ease.
getBackIn
-
amount
Configurable "back in" ease.
Parameters:
-
amount
ObjectThe strength of the ease.
getBackInOut
-
amount
Configurable "back in out" ease.
Parameters:
-
amount
ObjectThe strength of the ease.
getBackOut
-
amount
Configurable "back out" ease.
Parameters:
-
amount
ObjectThe strength of the ease.
getElasticIn
-
amplitude
-
period
Configurable elastic ease.
getElasticInOut
-
amplitude
-
period
Configurable elastic ease.
getElasticOut
-
amplitude
-
period
Configurable elastic ease.
getPowIn
-
pow
Configurable exponential ease.
Parameters:
-
pow
ObjectThe exponent to use (ex. 3 would return a cubic ease).
getPowInOut
-
pow
Configurable exponential ease.
Parameters:
-
pow
ObjectThe exponent to use (ex. 3 would return a cubic ease).
getPowOut
-
pow
Configurable exponential ease.
Parameters:
-
pow
ObjectThe exponent to use (ex. 3 would return a cubic ease).
linear
()
static
none
()
static
Identical to linear.