get
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.
// Output the names of all the animations in the collection.
const animations = model.activeAnimations;
const length = animations.length;
for (let i = 0; i < length; ++i) {
console.log(animations.get(i).name);
}
Content copied to clipboard
Return
The runtime animation at the specified index.
Parameters
index
The zero-based index of the animation.