Does there have some ways to load multiple GLB files in the same scene, and set their attributes like position, scale, cast/receive shadows etc. sperately?
So far, I only can write code like this:
loader.load( 'models/gltf/model.glb', function (gltf) {
gltf.scene.position.x = 0;
gltf.scene.position.y = 0;
gltf.scene.position.z = 0;
gltf.scene.rotation.y = Math.PI * 1.25;
gltf.scene.scale.set(0.5,0.5,0.5);
gltf.scene.traverse(function(node){
if(node instanceof THREE.Mesh){
node.castShadow = true;
node.receiveShadow = true;
}else{
node.layers.disableAll();
}
});
scene.add( gltf.scene );
But this is only one model in the scene.