ModelAnimationCollection

Access a model's animations [Model.activeAnimations]. Do not call the constructor directly

A collection of active model animations.

See also

Types

Link copied to clipboard
interface AddAllOptions
Link copied to clipboard
interface AddOptions

Properties

Link copied to clipboard

When true, the animation will play even when the scene time is paused. However, whether animation takes place will depend on the animationTime functions assigned to the model's animations. By default, this is based on scene time, so models using the default will not animate regardless of this setting.

Link copied to clipboard

The event fired when an animation is added to the collection. This can be used, for example, to keep a UI in sync.

Link copied to clipboard

The event fired when an animation is removed from the collection. This can be used, for example, to keep a UI in sync.

Link copied to clipboard
val length: Int

The number of animations in the collection.

Link copied to clipboard

The model that owns this animation collection.

Functions

Link copied to clipboard

Creates and adds an animation with the specified initial properties to the collection.

Link copied to clipboard

Creates and adds animations with the specified initial properties to the collection for all animations in the model.

Link copied to clipboard
fun contains(runtimeAnimation: ModelAnimation): Boolean

Determines whether this collection contains a given animation.

Link copied to clipboard
operator fun get(index: Int): ModelAnimation

Returns the animation in the collection at the specified index. Indices are zero-based and increase as animations are added. Removing an animation shifts all animations after it to the left, changing their indices. This function is commonly used to iterate over all the animations in the collection.

Link copied to clipboard
fun remove(runtimeAnimation: ModelAnimation): Boolean

Removes an animation from the collection.

Link copied to clipboard
fun removeAll()

Removes all animations from the collection.