Phaser API Documentation

  Version: 
Filter
Namespace: Tweens
Phaser.Tweens
Source: src/tweens/index.js (Line 10)

Classes

Namespace

Members

<static> ACTIVE: number
Focus
Focus

Description:

Tween state.

Type:
number
Since: 3.0.0
Focus
Focus
<static> COMPLETE: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 90)
Focus
Focus
<static> COMPLETE_DELAY: number
Focus
Focus

Description:

Tween state.

Type:
number
Since: 3.0.0
Focus
Focus
<static> CREATED: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 9)
Focus
Focus
<static> DELAY: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 27)
Focus
Focus
<static> HOLD_DELAY: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 72)
Focus
Focus
<static> INIT: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 18)
Focus
Focus
<static> LOOP_DELAY: number
Focus
Focus

Description:

Tween state.

Type:
number
Since: 3.0.0
Focus
Focus
<static> OFFSET_DELAY: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 36)
Focus
Focus
<static> PAUSED: number
Focus
Focus

Description:

Tween state.

Type:
number
Since: 3.0.0
Focus
Focus
<static> PENDING_ADD: number
Focus
Focus

Description:

Tween state.

Type:
number
Since: 3.0.0
Focus
Focus
<static> PENDING_REMOVE: number
Focus
Focus

Description:

Tween state.

Type:
number
Since: 3.0.0
Focus
Focus
<static> PENDING_RENDER: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 45)
Focus
Focus
<static> PLAYING_BACKWARD: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 63)
Focus
Focus
<static> PLAYING_FORWARD: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 54)
Focus
Focus
<static> REMOVED: number
Focus
Focus

Description:

Tween state.

Type:
number
Since: 3.0.0
Focus
Focus
<static> REPEAT_DELAY: number
Focus
Focus

Description:

TweenData state.

Type:
number
Since: 3.0.0
Source: src/tweens/tween/const.js (Line 81)
Focus
Focus

Methods

<static> TweenData(target, index, key, getEnd, getStart, getActive, ease, delay, duration, yoyo, hold, repeat, repeatDelay, flipX, flipY)
Focus
Focus

Description:

Returns a TweenDataConfig object that describes the tween data for a unique property of a unique target. A single Tween consists of multiple TweenDatas, depending on how many properties are being changed by the Tween.

This is an internal function used by the TweenBuilder and should not be accessed directly, instead, Tweens should be created using the GameObjectFactory or GameObjectCreator.

Parameters:

name type description
target any

The target to tween.

index number

The target index within the Tween targets array.

key string

The property of the target to tween.

getEnd function

What the property will be at the END of the Tween.

getStart function

What the property will be at the START of the Tween.

getActive function

If not null, is invoked immediately as soon as the TweenData is running, and is set on the target property.

ease function

The ease function this tween uses.

delay number

Time in ms/frames before tween will start.

duration number

Duration of the tween in ms/frames.

yoyo boolean

Determines whether the tween should return back to its start value after hold has expired.

hold number

Time in ms/frames the tween will pause before repeating or returning to its starting value if yoyo is set to true.

repeat number

Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.

repeatDelay number

Time in ms/frames before the repeat will start.

flipX boolean

Should toggleFlipX be called when yoyo or repeat happens?

flipY boolean

Should toggleFlipY be called when yoyo or repeat happens?

Returns:
Description:

The config object describing this TweenData.

Since: 3.0.0
Focus
Focus