I am new to threejs and am having trouble figuring out how to add a 3d model’s animation to my code.
I am using Angular 6+ with npm installed threejs and have successfully added my gltf model to my test website and have also added OrbitControls, so I can move the object around.
This is the model:
How would I add the animation that comes with the model?
Ok great thanks, I have it animating at this point, however, it seems that the animation doesn’t seem to be working as intended. It’s a little hard to describe what the animation looks like,Is there a place where I can show my code or a video of what it looks like?
I’m not sure if I set the model size correctly based off what the animation looks like. Here’s a screenshot of what the model looks like during a part of its animation. It looks part of the world is stuck inside of the world.
I see the same animation when using the following three.js based gltf viewer and the Babylon.js sandbox. So it seems the asset is not exported correctly from Sketchfab.
The sketchfab glTF converter is a bit hit and miss. You could try downloading the original .osgb file and converting it with another tool - maybe this one?