How to load animation to the scene by coding

Not able to load the animation to character

Requirement:
I got a separate glb of animation with joint and all those stuff and I have to add this animation to the character on load,
Like I had the nodes of this character, I am not able to get how to load this animation to all those nodes

like i got reference code on three.js
in three.js, Here its doing with AnimationMixer

Three.js code:
mixer = new AnimationMixer(nodes.Armature); mixer.clipAction(idleSource.animations[0]).play(); mixer.update(0);

Animation glb:
https://dl.dropbox.com/s/w92633pyy3nv9gl/anime.glb

PG:

This would be easier if the animation file contained a skeleton, because in that case you could simply assign it to your avatar’s mesh.

Without it, you can link the transformation node of each bone in the avatar’s skeleton to the transformation nodes of the animation:

1 Like