Wind blows!
Thanks a lot Mugen87
I added these two variables:
let mixer, clock;
This line in the init function:
clock = new THREE.Clock();
These lines as you mentionned:
const model = gltf.scene;
const animations = gltf.animations;
mixer = new THREE.AnimationMixer(model);
mixer.clipAction(animations[0]).play();
And this one in animate function:
if ( mixer ) {mixer.update( clock.getDelta() );}