Transitions.Tween Class
src/transitions/Tween.js:11
A method of interpolating between start and end values with an easing curve.
Constructor
Item Index
Methods
- deregister static
- get
- getCurves static
- getVelocity
- halt
- register static
- reset
- set
- update
Properties
- CURVES static
Methods
deregister
-
name
Remove curve from internal registry. Undoes work of register
.
Parameters:
-
name
StringName dictionary key
Returns:
False if key doesn't exist
halt
()
Halt transition at current state and erase all pending actions.
register
-
name
-
curve
A way of registering custom easing curves by name. Curves are functions that take a number between 0 and 1 and return a number (often between 0 and 1, but can over/under shoot).
Returns:
False if key is taken, else true
reset
-
value
-
[velocity]
Reset the value and velocity of the transition.
set
-
endValue
-
[transition]
Set new value to transition to.
update
()
Update the transition in time.
Properties
CURVES
Object
static
Default easing curves.
Sub-properties:
-
linear
FunctionLinear interpolation
-
easeIn
FunctionEaseIn interpolation. Deceleration from zero velocity.
-
easeInCubic
FunctionCubic interpolation. Acceleration from zero velocity.
-
easeOut
FunctionEaseOut interpolation. Acceleration from zero velocity.
-
easeOutCubic
FunctionCubic interpolation. Deceleration from zero velocity.
-
easeOutWall
ObjectInterpolation with wall boundary.
-
easeInOut
FunctionEaseInOut interpolation. Acceleration then deceleration.
-
easeInOutCubic
FunctionCubic interpolation. Acceleration then deceleration.