Sorry if this question is duplicated but I’ve been searching online and can’t see to understand whats going on.
After Loading an GLB model I want to replace its original texture to a mesh, problem is that it loads as a solid color; Mesh geometry seems to have the UV values.
What am I doing wrong?
How is the texture being replaced:
loadingManager.onLoad = function () {
console.log(model);
let fabricTexture = new THREE.TextureLoader().load('/catalog/fabrics/524843.jpg');
model.children[2].children[0].material.map= fabricTexture;
}
loadingManager.onLoad = function () {
console.log(model);
let fabricTexture = new THREE.TextureLoader().load('/catalog/fabrics/524843.jpg');
model.children[2].children[0].material.map= fabricTexture;
model.children[2].children[0].material.map.needsUpdate=true;
}