Hello,
Is there a way to clear the catch images by MTL loader? As when I dynamically update the material (as well as obj) file having the same image names (in MTL), and after removing and re-adding the mesh, it’s texture map gets destroyed. Attached below:
But when I refresh the page everything comes to perfect position.
As with the texture we have needsUpdate
is there such alternative for the MTL Material?
thank you in advance.
so far I have done:
mtlLoader.load("file://" + mtl_file, function(materials) {
//materials.needsUpdate = true; //error
materials.preload();
var update_material = Object.keys(materials.materials);
for(var i=0; i < update_material.length; i++){
materials.materials[update_material[i]].needsUpdate = true;
}
materials.options.needsUpdate = true;
contd...