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. |
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. |
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)? |
tweens | Array.<Phaser.Types.Tweens.TweenBuilderConfig> | <optional> |
The tweens to chain together. |
|
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 the 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 the 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? |