0

Am using THREE.glTF loader to load the glTF files in web and file is loaded and animations are working.

CODE :

/*gltf loader*/
var loader = new THREE.GLTFLoader(manager);
loader.load(  file_path , function ( data ) { }, function ( error ) { } );

/*play animations*/
var mixer = new THREE.AnimationMixer(gltf.scene);
mixers.push(mixer);

gltf.animations.forEach((clip) => {
    for (i = 0; i < mixers.length; i++) {
          mixers[i].clipAction(clip).reset().play();
     }
});

how to rotate the nodes using three.js?

thanks in advance

1 Answers1

0

There is a method object3D.rotation(x,y,z).

If You want to orbit around The object check out Orbit Controls

MateuszW
  • 21
  • 3