I’m trying to execute the animation of a model found on internet.
The expected animation is to have all the fans running. But when I tried to play the animation, it’s just the computer rotating on the X abscissa. I thought maybe its animations are somewhere else, so I logged the animation, and there is an array of tracks with all the fans in it. Being new in threejs I was wondering I'm not really sure how I should manage that, if it's an error from me or from the model itself.
However, when I tried to run the model through gltf-viewer
, the model works fine.
I didn't touch anything on the model in my code, I just created a canva, loaded the model and play its animation by using the following lines.
const group = useRef()
const { nodes, materials, animations } = useGLTF('/scene.gltf')
const { actions, names } = useAnimations(animations, group)
useEffect(() => {
actions[names].play()
})
Here is the link of the model if somebody would like to try on its own