Creates a handler that triggers when this Tweener
completes.
Note: This handler is disposed when a new handler is defined. A Tweener
with iterations = 0
does not finish.
function to call when Tweener
completes.
Pauses this Tweener
.
Plays this Tweener
.
Defines an easingFunction
for this Tweener
.
Easing functions allow you to control interpolation behavior during the duration of a tween.
You can pass pre-defined templates from Easing as easingFunction.
Example
//Applies the "easeInOutQuint" easing function to this Tweener
myTweener.setEase(Easing.easeInOutQuint)
function to use for interpolation of values.
Defines how many iterations
this Tweener
should perform.
Setting this value to 0
creates an infinite loop.
amount of tweening iterations.
Defines the loopType
of this Tweener
.
type to use.
Stops this Tweener
.
Tweener
starts from the beginning with next play
call.
Creates a custom Tweener
. For shorthand definitions, use BaseItem.transition.
Example
//Creates a tween between two Vector3 values over 3 seconds
let startPoint = Vector3.zero
let endPoint = new Vector3(0,0,3)
let duration = 3
Tweener.tweenTo(
val => { Debug.log(`Remaining distance is ${val.dist(endPoint)}`)},
startPoint,
endPoint,
duration
)
Function to call every frame during the tween. Contains interpolated value.
Start value of this Tweener
.
End value of this Tweener
.
Duration of this Tweener
.
created Tweener
.
Creates a custom Tweener
. For shorthand definitions, use BaseItem.transition.
Function to call every frame during the tween. Contains interpolated value.
Start value of this Tweener
.
End value of this Tweener
.
Duration of this Tweener
.
created Tweener
.
Creates a custom Tweener
. For shorthand definitions, use BaseItem.transition.
Function to call every frame during the tween. Contains interpolated value.
Start value of this Tweener
.
End value of this Tweener
.
Duration of this Tweener
.
created Tweener
.
Creates a custom Tweener
. For shorthand definitions, use BaseItem.transition.
Function to call every frame during the tween. Contains interpolated value.
Start value of this Tweener
.
End value of this Tweener
.
Duration of this Tweener
.
created Tweener
.
Creates a custom Tweener
. For shorthand definitions, use BaseItem.transition.
Function to call every frame during the tween. Contains interpolated value.
Start value of this Tweener
.
End value of this Tweener
.
Duration of this Tweener
.
created Tweener
.
Provides interpolation functionality for various values and easing types.