class Tween
package nb
A tween class.
0.1.0
.Static variables
Static methods
staticstart(from:Float, to:Float, duration:Float = 1, type:TweenType = LINEAR, ?onStep:(Float, Float, Float, TweenVar) ‑> Void):TweenVar
Starts a tweening process.
Parameters:
from | The value to tween from. |
---|---|
to | The value to tween to. |
duration | The duration of the process, in seconds. |
type | The |
onStep | A function that gets called at the end of each step.
The first argument is the current value, the second argument the time elapsed, the
the third argument the current t value, and the last argument the associated |
Returns:
An nb.Tween.TweenVar
instance.
staticstartMultiple(from:Array<Float>, to:Array<Float>, duration:Float = 1, type:TweenType = LINEAR, ?onStep:(Array<Float>, Float, Float) ‑> Void):TweenVar
Starts a single process tweening multiple values.
Example: startMultiple([10,50],[0,100,25])
will tween 10 to 0 and 50 to 100.
The 25 in the second array has no matching value in the first array so it is discarded.
Parameters:
from | The values to tween from. |
---|---|
to | The values to tween to. |
duration | The duration of the process, in seconds. |
type | The |
onStep | A function that gets called at the end of each step.
The first argument is the current values, the second argument the time elapsed, and
the third argument the current t value, and the last argument the associated |
Returns:
An nb.Tween.TweenVar
instance.