title: Make three.js object invisible
body: <p>I have used the following code to create a mesh object</p>
  
  <pre><code>var defaultPartGeometry = new THREE.BoxGeometry(0.5, 0.5, 0.5);
  var defaultPartMaterial = new THREE.MeshBasicMaterial({color: 0xff0000, wireframe: false});
  default = new THREE.Mesh(defaultPartGeometry, defaultPartMaterial); 
  default.position.set(0,0.25,0); 
  scene.add(default)
  </code></pre>
  
  <p>How can I make this invisible? Setting the <code>opacity</code> for this object to <code>null</code> did not work.</p>
  
  <p>I address the object by its <code>ID</code> and then try to set the <code>opacity</code> (I also have tried to address the material: <code>object.material</code>).</p>
  
  <pre><code>object = SceneService.scene.getObjectByName(ID);
  tweens.push(tl.to(object, 2, { opacity: 0 }, e.time));
  </code></pre>
  
  <p>Tween the position is working:</p>
  
  <pre><code>tweens.push(tl.to(object.position, 2, { x: target.X, z: target.Y }, e.time));
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>object = SceneService.scene.getObjectByName(e.id);
  object.transparent = true;
  tweens.push(tl.to(object.position, 2, { x: target.X, z: target.Y }), e.time);
  tweens.push(tl.to(object, 2, { opacity: 0 }), e.time);
  </code></pre>