kovacsv / JSModeler

A JavaScript framework to create and visualize 3D models.
MIT License
654 stars 123 forks source link

Change Material after model is loaded. #45

Open gminor7 opened 5 years ago

gminor7 commented 5 years ago

I'm trying to load a new material for the loaded model dynamically and unable to do so. Would I have to remove and readd the meshes?

kovacsv commented 5 years ago

You can modify the material of the generated three.js mesh like in this example: https://github.com/kovacsv/JSModeler/blob/development/sandbox/changematerial.html