I have a GLTF model that needs its map texture updated, but when I do so, the new texture displays without preserving the UV mapping of the model.
Is there a method to maintain the UV mapping when loading a new texture? Below is the snippet of code I utilized to replace the map texture on my website:
model.traverse(child => {
if (child instanceof THREE.Mesh) {
child.material.map = newTexture;
}
})