addAnimations
Adds animations to the engine.
Heads Up!
This method do not play animations to the player, it only adds it to the engine. To play animations to the player, use player.playAnimation
.
Format
Syntax
engine.animations.addAnimations(url);
Parameters
Name | Type | Description |
---|---|---|
url | string | The URL of the animation file to add. |
Returns
Promise<AnimationInfo[]>
- A promise that resolves to an array ofAnimationInfo
containing information about the animations that were added.
Example
const anims = await engine.animations.addAnimations(
'https://example.com/animation.glb',
);
console.log('Animations added:', anims);
Available on: Client