I have a simple Shirt model and just export from Sketchfab and using it but when I’m using the model it shows but with Black color.
My Directory Structure
Code
gltfLoader = new GLTFLoader();
dracoLoader = new DRACOLoader();
dracoLoader.setDecoderPath(
"https://raw.githubusercontent.com/mrdoob/three.js/dev/examples/js/libs/draco/"
);
gltfLoader.setDRACOLoader(dracoLoader);
gltfLoader.load(
"assets/models/tshirt-01/scene.gltf",
(gltf) => {
scene.add(gltf.scene);
gltf.scene.scale.set(0.6, 0.6, 0.6);
console.log(gltf);
},
(xhr) => {},
(error) => {
console.log(error);
}
);