TweenMath

TweenMath

Used for getting various tweens from point a to point b.


Constructor

new TweenMath()

Members

(static) IN

(static) IN_BACK

(static) IN_BOUNCE

(static) IN_CIRC

(static) IN_ELASTIC

(static) IN_LINEAR

(static) IN_OUT

(static) IN_QUAD

(static) IN_SINE

(static) LINEAR

(static) OUT

(static) OUT_BACK

(static) OUT_BOUNCE

(static) OUT_CIRC

(static) OUT_ELASTIC

(static) OUT_LINEAR

(static) OUT_QUAD

(static) OUT_SINE

Methods

(static) tweenArray(start, end, interval, howopt, loopOptionsopt, theArrayopt) → {Array}

The TweenMath.tweenArray method returns an Array that contains the numbers that make up a tween between two numbers.

Parameters:
Name Type Attributes Default Description
start Number

The beginning number to start from.

end Number

The number to end on.

interval Number

The amount of time in seconds that the tween should take.

how String <optional>
'Linear'

The type of tween to use. Default is "Linear".

loopOptions Object <optional>

.millisecondRate, default is 1000; .frameRate, default is 60; .useSeconds, default is 0;

theArray Array <optional>

You can optionally pass in a pre made Array to use, otherwise a new Array is made.

Returns:

The Array of numbers that make up the tween. Use a loop to cycle through the numbers and apply them to whatever you want to tween.

Type
Array