name | type | arguments | Default | description |
---|---|---|---|---|
targets | any |
The object, or an array of objects, to run the tween on. |
||
delay | number | function | <optional> | 0 |
The number of milliseconds to delay before the tween will start. |
duration | number | <optional> | 1000 |
The duration of the tween in milliseconds. |
ease | string | function | <optional> | 'Power0' |
The easing equation to use for the tween. |
easeParams | array | <optional> |
Optional easing parameters. |
|
hold | number | <optional> | 0 |
The number of milliseconds to hold the tween for before yoyo'ing. |
repeat | number | <optional> | 0 |
The number of times each property tween repeats. |
repeatDelay | number | <optional> | 0 |
The number of milliseconds to pause before a repeat. |
yoyo | boolean | <optional> | false |
Should the tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take |
flipX | boolean | <optional> | false |
Horizontally flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the |
flipY | boolean | <optional> | false |
Vertically flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the |
completeDelay | string | number | function | object | array | <optional> | 0 |
The time the tween will wait before the onComplete event is dispatched once it has completed, in ms. |
loop | string | number | function | object | array | <optional> | 0 |
The number of times the tween will repeat. (A value of 1 means the tween will play twice, as it repeated once.) The first loop starts after every property in the tween has completed once. |
loopDelay | string | number | function | object | array | <optional> | 0 |
The time the tween will pause before starting either a yoyo or returning to the start for a repeat. |
paused | boolean | <optional> | false |
Does the tween start in a paused state (true) or playing (false)? |
props | Object.<string, (number|string|Phaser.Types.Tweens.GetEndCallback|Phaser.Types.Tweens.TweenPropConfig)> | <optional> |
The properties to tween. |
|
callbackScope | any | <optional> |
The scope (or context) for all of the callbacks. The default scope is the tween. |
|
onComplete | Phaser.Types.Tweens.TweenOnCompleteCallback | <optional> |
A function to call when the tween completes. |
|
onCompleteParams | array | <optional> |
Additional parameters to pass to |
|
onLoop | Phaser.Types.Tweens.TweenOnLoopCallback | <optional> |
A function to call each time the tween loops. |
|
onLoopParams | array | <optional> |
Additional parameters to pass to |
|
onRepeat | Phaser.Types.Tweens.TweenOnRepeatCallback | <optional> |
A function to call each time a property tween repeats. Called once per property per target. |
|
onRepeatParams | array | <optional> |
Additional parameters to pass to |
|
onStart | Phaser.Types.Tweens.TweenOnStartCallback | <optional> |
A function to call when the tween starts playback, after any delays have expired. |
|
onStartParams | array | <optional> |
Additional parameters to pass to |
|
onStop | Phaser.Types.Tweens.TweenOnStopCallback | <optional> |
A function to call when the tween is stopped. |
|
onStopParams | array | <optional> |
Additional parameters to pass to |
|
onUpdate | Phaser.Types.Tweens.TweenOnUpdateCallback | <optional> |
A function to call each time the tween steps. Called once per property per target. |
|
onUpdateParams | array | <optional> |
Additional parameters to pass to |
|
onYoyo | Phaser.Types.Tweens.TweenOnYoyoCallback | <optional> |
A function to call each time a property tween yoyos. Called once per property per target. |
|
onYoyoParams | array | <optional> |
Additional parameters to pass to |
|
onActive | Phaser.Types.Tweens.TweenOnActiveCallback | <optional> |
A function to call when the tween becomes active within the Tween Manager. |
|
onActiveParams | array | <optional> |
Additional parameters to pass to |
|
onPause | Phaser.Types.Tweens.TweenOnPauseCallback | <optional> |
A function to call when the tween is paused. |
|
onPauseParams | array | <optional> |
Additional parameters to pass to |
|
onResume | Phaser.Types.Tweens.TweenOnResumeCallback | <optional> |
A function to call when the tween is resumed after being paused. |
|
onResumeParams | array | <optional> |
Additional parameters to pass to |
|
persist | boolean | <optional> |
Will the Tween be automatically destroyed on completion, or retained for future playback? |
|
interpolation | string | function | <optional> |
The interpolation function to use if the |