Class: Tween$1

Tween$1

Holds the information needed to perform a tweening operation. It is used internally by PUXI.tween.TweenManager.

new Tween$1 ()

Members

ease Ease

Easing function

endTime DOMHighResTimeStamp readonly

endValue T

End value of interpolation

erp Erp

Linear interpolator on tween property.

key string

Unique id for this tweening operation

manager PUXI.TweenManager

The tween-manager whose update loop handles this tween.

observedValue T

Object that is observed and the interpolated value to be stored in.

startTime DOMHighResTimeStamp readonly

startValue T

Start value of interpolation

PUXI.tween.Tween$1.pool Array.<TweenContext> static

Used for pooling.

Methods

chain (startValue, endValue, duration, erp, ease)

Chains a tween that will run after this one finishes.

Name Type Description
startValue W
endValue W
duration DOMHighResTimeStamp
erp PUXI.Erp.<W>
ease PUXI.Ease optional

destroy ()

Called when a tween is complete and no references to it are held. This will pool it (if auto-created).

Custom tweens should override this.

repeat (repeat, flip)Tween.<T>

Repeats this tween repeat no. of times again. If the tween is still running, then this is no. of times it will again (not added to the previous repeat count).

Each time the tween is repeated, a cycle event is fired.

By default, the repeat count of any tween is 1.

Name Type Default Description
repeat number

the repeat count

flip boolean true optional

whether to switch start/end values each cycle

Returns:
Type Description
Tween.<T>
  • this tween, useful for method chaining

reset ()

Clears the tween's extra properties.

target (target, observedProperty)

Configures this tween to update the observed-property on a tween target object each animation frame.

Name Type Description
target PUXI.TweenTarget.<T>

object on which property is being tweened

observedProperty string

name of property on target

update (t)

Updates the observed value.

Name Type Description
t DOMHighResTimeStamp

current time