i saw this topic a few times but none of the suggestion worked for me i’ve 3 spinning fans (imported as 3 different gltf files cause i wn’t able to play all toghether). anyway now the animation it’s working but when i go near to them with the camera they suddently disappear. i’m also new in this forum so i’m not sure how to proced, i’m pasting here the focus part and upload the entire project… thanks everybody and sorry for my english
here is the code:
var loader = new THREE.GLTFLoader();
clock = new THREE.Clock();
loader.load(
'models/happyFan3.gltf',
function(gltf)
{
gltf.scene.scale.set(scale,scale,scale);
gltf.scene.position.y += offPos;
mixer3 = new THREE.AnimationMixer(gltf.scene);
var action3 = mixer3.clipAction(gltf.animations[0]);
action3.play();
gltf.scene.frustumCulled = false;
scene.add(gltf.scene);
}
);
var update = function()
{
var delta = clock.getDelta();
if ( mixer1 ) mixer1.update( delta );
if ( mixer2 ) mixer2.update( delta );
if ( mixer3 ) mixer3.update( delta );
};
happyBis.rar (1.1 MB)