Hi team. I am a bit new to ThreeJS and I am unsure about why some of my models load with blank areas.
For example, this model is from cgtrader: Cabin | 3D model and it does not completely load (shown in the screenshots).
However, the soldier model loads fine (taken from the Discover ThreeJS book examples).
Please disregard the s-shaped line of balls and the floating cubes (I am just learning/practicing how to position things). The cabin and the surrounding yard are the problems.
Here is how I am loading the soldier and the cabin:
const loaderGLTF1 = new GLTFLoader();
loaderGLTF1.loadAsync('../assets/Soldier.glb').then((gltf) => {
this.newScene.add(gltf.scene); // use .scene for gltf loader
gltf.scene.position.y = 0.0;
gltf.scene.position.z = 1.0;
gltf.scene.rotateOnAxis(new Vector3(0, 1, 0), Math.PI);
});
const loaderGLTF2 = new GLTFLoader();
loaderGLTF2.loadAsync('../assets/cabin.glb').then((gltf) => {
this.newScene.add(gltf.scene); // use .scene for gltf loader
gltf.scene.position.y = 0.0;
});
Any advice would be appreciated… thanks!