Class: TweenManager

.tween~ TweenManager

Tween manager class, that handles updating child Tweens

new TweenManager()

Members

_tweensToRemoveArray.<PIXI.tween.Tween>

The array of tweens to remove at the end of the next update

tweensArray.<PIXI.tween.Tween>

The array of tweens being manager

Methods

addTween(tween)

Normally you want to use .createTween(target) to create a tween, but, you can also create a tween
with new PIXI.Tween(target) and add it in the manager with this method.

Name Type Description
tween PIXI.tween.Tween

Tween to add

createTween(target, config){PIXI.tween.Tween}

Returns a new tween instance that is managed by this tween manager.

Name Type Description
target any

The target object to add a tween to

config PIXI.tween.Tween#tweenConfig optional

object to configure the tween

Returns:
Type Description
PIXI.tween.Tween
  • New tween instance

getTweensForTarget(target){Array.<PIXI.tween.Tween>}

Returns an array with all the tweens for the given target.

Name Type Description
target any

The target object to check for tweens

Returns:
Type Description
Array.<PIXI.tween.Tween>
  • Tweens attached to the given target

removeTween(tween)

Removes a tween from being managed by this instance

Name Type Description
tween PIXI.tween.Tween

Tween to remove

update(deltaMS)

Updating of the tween manager, which will in turn update any active tweens

Name Type Description
deltaMS number optional

If not provided, an internal deltaMS will be calculated