Class: Tweens

rune.tween.Tweens()

The Tweens class represents a Tween-based animation handler. With Tweens, it is possible to create and remove Tween objects that handle interpolation of one or more properties of an object.

Constructor

new Tweens()

Creates a new instance of Tweens.
Source:

Members

(readonly) length :number

The number of Tween objects handled by this instance. When a Tween is completed, it is automatically removed.
Type:
  • number
Source:

paused :boolean

If set to True, all Tween objects handled by this Tweens instance are paused.
Type:
  • boolean
Default Value:
  • false
Source:

Methods

clear() → {undefined}

Removes all Tween objects from this handler. Ongoing interpolations are interrupted and thus will not be completed.
Source:
Returns:
Type
undefined

create(options) → {rune.tween.Tween}

Creates a new Tween object based on the specified option object.
Parameters:
Name Type Description
options Object Tween options.
Source:
Returns:
Type
rune.tween.Tween

remove(tween) → {undefined}

Removes a specific tween object based on the object reference.
Parameters:
Name Type Description
tween rune.tween.Tween Tween object to remove.
Source:
Returns:
Type
undefined

removeFrom(target) → {undefined}

Removes all Tween objects registered to the specified target object.
Parameters:
Name Type Description
target Object Removes all Tween objects from this object.
Source:
Returns:
Type
undefined