API Docs for: 1.4.0
Show:

Kiwi.Animations.Tweens.TweenManager Class

Module: Tweens
Parent Module: Animations

The TweenManager is automatically created on every game. This class is responsible for the creation and management of tweens for the game.

Based on tween.js by sole. Converted to TypeScript and integrated into Kiwi. https://github.com/sole/tween.js

Constructor

Kiwi.Animations.Tweens.TweenManager

(
  • game
  • [clock]
)
Kiwi.Animations.TweenManager

Parameters:

Returns:

Kiwi.Animations.TweenManager:

Methods

add

(
  • tween
)
Kiwi.Animations.Tween public

Adds a tween to the manager.

Parameters:

create

(
  • object
)
Kiwi.Animations.Tween public

Creates a new Tween.

Parameters:

  • object Any

    The object that this tween is to apply.

Returns:

Kiwi.Animations.Tween:

The tween that was created.

getAll

() public

Returns all of tweens that are on the manager.

Returns:

Kiwi.Animations.Tween[]

objType

() String public

The type of object that this is.

Returns:

String:

"TweenManager"

remove

(
  • tween
)
Kiwi.Animations.Tween public

Removes a tween from this manager.

Parameters:

Returns:

Kiwi.Animations.Tween:

The tween passed in.

removeAll

() public

Removes all of the tweens on the manager.

update

() Boolean public

The update loop.

Returns:

Boolean:

Whether anything was updated

validateClock

() public

Defined in src\animations\tweens\TweenManager.ts:179

Available since 1.2.0

Validate clock; if no valid clock is found, set one from game

Properties

_game

Kiwi.Game private

The game that this manager belongs to.

_tweens

Kiwi.Animations.Tween[] private

An array of all of the tweens on the manager.

clock

Kiwi.Time.Clock public

Defined in src\animations\tweens\TweenManager.ts:72

Available since 1.2.0

Clock used by tweens