How to rotate the nodes of glTF file using three.js

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

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

Crossposting:

You can traverse through the scene graph via Object3D.traverse. It looks like this:

gltf.scene.traverse( function( object ) {

   // do something with your current object

} );

In this way, you can process each node and apply for example a transformation.

1 Like

@Mugen87 its work thank you