The texture does not show the whole object, some places only the color of the object changes,what could be the problem please tell me.
Full code url: Kitchen ThreeJs · GitHub
Code
// Load Kitchen
var textureLoader = new THREE.TextureLoader();
var texture = textureLoader.load('assets/textures/wood2.jpg');
texture.flipY = false;
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
loader = new GLTFLoader();
loader.load(
'assets/3d_models/kitch.glb',
(gltf) => {
kitchen = gltf.scene;
kitchen.traverse((node) => {
if (node.isMesh) {
node.material.map = texture;
console.log(node.material.map);
}
});
// console.log(gltf);
scene.add(kitchen);
},
undefined,
(err) => {
console.log(err);
}
);