remove

fun remove(runtimeAnimation: ModelAnimation): Boolean(source)

Removes an animation from the collection.

This raises the ModelAnimationCollection.animationRemoved event so, for example, a UI can stay in sync.

An animation can also be implicitly removed from the collection by setting ModelAnimationCollection.removeOnStop to true. The ModelAnimationCollection.animationRemoved event is still fired when the animation is removed.

const a = model.activeAnimations.add({
name : 'animation name'
});
model.activeAnimations.remove(a); // Returns true

Return

true if the animation was removed; false if the animation was not found in the collection.

Parameters

runtimeAnimation

The runtime animation to remove.

See also