Phaser API Documentation

  Version: 
TimelineBuilderConfig
Properties:
name type arguments Default description
tweens Array.<object> | function | Array.<Phaser.Types.Tweens.TweenBuilderConfig> <optional>

An array of tween configuration objects to create and add into the new Timeline. If this doesn't exist or is empty, the Timeline will start off paused and none of the other configuration settings will be read. If it's a function, it will be called and its return value will be used as the array.

targets any <optional>

An array (or function which returns one) of default targets to which to apply the Timeline. Each individual Tween configuration can override this value.

totalDuration number <optional> 0

If specified, each Tween in the Timeline will get an equal portion of this duration, usually in milliseconds, by default. Each individual Tween configuration can override the Tween's duration.

duration number <optional> 1000

If totalDuration is not specified, the default duration, usually in milliseconds, of each Tween which will be created. Each individual Tween configuration can override the Tween's duration.

delay number <optional> 0

The number of milliseconds to delay before the tween will start. Each individual Tween configuration can override this value.

easeParams array <optional>

Optional easing parameters. Each individual Tween configuration can override this value.

ease string | function <optional> 'Power0'

The easing equation to use for each tween. Each individual Tween configuration can override this value.

hold number <optional> 0

The number of milliseconds to hold each tween before yoyo'ing. Each individual Tween configuration can override this value.

repeat number <optional> 0

The number of times to repeat each tween. Each individual Tween configuration can override this value.

repeatDelay number <optional> 0

The number of milliseconds to pause before each tween will repeat. Each individual Tween configuration can override this value.

yoyo boolean <optional> false

Should each tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take duration milliseconds to complete. Each individual Tween configuration can override this value.

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 flipX property. Each individual Tween configuration can override this value.

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 flipY property. Each individual Tween configuration can override this value.

completeDelay number | function | object | array <optional> 0

If specified, the time to wait, usually in milliseconds, before the Timeline completes.

loop number | function | object | array <optional> 0

How many times the Timeline should loop, or -1 to loop indefinitely.

loopDelay number | function | object | array <optional> 0

The time, usually in milliseconds, between each loop.

paused boolean <optional> false

If true, the Timeline will start paused.

useFrames boolean <optional> false

If true, all duration in the Timeline will be in frames instead of milliseconds.

callbackScope any <optional>

The default scope (this value) to use for each callback registered by the Timeline Builder. If not specified, the Timeline itself will be used.

onStart Phaser.Types.Tweens.TimelineOnStartCallback <optional>

If specified, the onStart callback for the Timeline, called every time it starts playing.

onStartScope any <optional>

The scope (this value) to use for the onStart callback. If not specified, the callbackScope will be used.

onStartParams array <optional>

Additional arguments to pass to the onStart callback. The Timeline will always be the first argument.

onUpdate Phaser.Types.Tweens.TimelineOnUpdateCallback <optional>

If specified, the onUpdate callback for the Timeline, called every frame it's active, regardless of its Tweens.

onUpdateScope any <optional>

The scope (this value) to use for the onUpdate callback. If not specified, the callbackScope will be used.

onUpdateParams array <optional>

Additional arguments to pass to the onUpdate callback. The Timeline will always be the first argument.

onLoop Phaser.Types.Tweens.TimelineOnLoopCallback <optional>

If specified, the onLoop callback for the Timeline, called every time it loops.

onLoopScope any <optional>

The scope (this value) to use for the onLoop callback. If not specified, the callbackScope will be used.

onLoopParams array <optional>

Additional arguments to pass to the onLoop callback. The Timeline will always be the first argument.

onYoyo Phaser.Types.Tweens.TimelineOnYoyoCallback <optional>

If specified, the onYoyo callback for the Timeline, called every time it yoyos.

onYoyoScope any <optional>

The scope (this value) to use for the onYoyo callback. If not specified, the callbackScope will be used.

onYoyoParams array <optional>

Additional arguments to pass to the onYoyo callback. The first argument will always be null, while the Timeline will always be the second argument.

onComplete Phaser.Types.Tweens.TimelineOnCompleteCallback <optional>

If specified, the onComplete callback for the Timeline, called after it completes.

onCompleteScope any <optional>

The scope (this value) to use for the onComplete callback. If not specified, the callbackScope will be used.

onCompleteParams array <optional>

Additional arguments to pass to the onComplete callback. The Timeline will always be the first argument.

Type:
object
Since: 3.18.0