title: three.js change material for .obj file using a button
body: <p>I'm having trouble creating a button to change the .mtl file of my .obj to another .mtl using three.js. Any thoughts on how to do that would be awesome!</p>
  
  <p>Here is the original code, adapted from the objmtl loader example on threejs.org. So far, I've only been able to make the obj visible / invisible using a button, but I'd love to add more buttons to change the .mtl files to reflect .mtls with other colors and properties.</p>
  
  <pre><code>var mtlLoader = new THREE.MTLLoader();
                  mtlLoader.setBaseUrl( 'examples/obj/male02/' );
                  mtlLoader.setPath( 'examples/obj/male02/' );
                  mtlLoader.load( 'male02_dds.mtl', function( materials ) {
  
                      materials.preload();
  
                      var objLoader = new THREE.OBJLoader();
                      objLoader.setMaterials( materials );
                      objLoader.setPath( 'examples/obj/male02/' );
                      objLoader.load( 'male02.obj', function ( object ) {
  
  
                          object.position.y = - 95;
                          dude = object;
                          scene.add( dude );
  
      info.innerHTML += '&lt;br/&gt;&lt;br/&gt;&lt;input id=pants2 type="button" onclick="dude.visible = false" value="Dude: OFF"/&gt;';
      info.innerHTML += '&lt;input id=pants2 type="button" onclick="dude.visible = true" value="Dude: ON"/&gt;';
  </code></pre>