title: THREE.js LineSegments with multimaterial support
body: <p>In my project I am creating  <code>LineSegments</code> (LineMesh) with modified geometry (changing the vertex positions) from another mesh and with <code>MeshBasicMaterial</code>with black color.Adding the <code>LineMesh</code> to the already existing Mesh.
  Everything works fine.
  But now I want to hide particular part of the mesh by setting <code>visible</code> property to false by taking the <code>materialIndex</code> from the faces of geometry.But in this, the previously created mesh is hiding but <code>LineMesh</code> added to it is not hiding.
  Is it possible to hide particular part of <code>LineMesh</code> and also wanted to know whether <code>LineMesh</code> will support <code>MultiMaterial</code>.So that it will be easy for me to apply <code>visibility</code>, <code>transparent</code> property to particular part of <code>Mesh</code>.</p>
  
  <pre><code>var mesh, renderer, scene, camera, materials;
  
  init();
  animate();
  
  function init() {
  
  // renderer
  renderer = new THREE.WebGLRenderer();
  renderer.setSize( window.innerWidth, window.innerHeight );
  document.body.appendChild( renderer.domElement );
  
  // scene
  scene = new THREE.Scene();
  
  // camera
  camera = new THREE.PerspectiveCamera( 40, window.innerWidth / window.innerHeight, 1, 10000 );
  camera.position.z = 300;
  camera.lookAt( scene.position );
  
  // directional
  var light = new THREE.DirectionalLight( 0xffffff );
  light.position.set( 1, 1, 1 );
  scene.add( light );
  
  // ambient
  var ambient = new THREE.AmbientLight( 0x222222 );
  scene.add( ambient );
  
  // geometry
  var geometry = new THREE.BoxGeometry( 100, 100, 100, 4, 4, 4 );
  
  // materials
  materials = [
      new THREE.MeshLambertMaterial( { color: 0xffff00, side: THREE.DoubleSide } ),
      new THREE.MeshBasicMaterial( { color: 0x00ffff, side: THREE.DoubleSide } )
  ];
  
  // assign material to each face
  for( var i = 0; i &lt; geometry.faces.length; i++ ) {
      geometry.faces[ i ].materialIndex = THREE.Math.randInt( 0, 1 );
  }
  geometry.sortFacesByMaterialIndex(); // optional, to reduce draw calls
  
  // mesh
  mesh = new THREE.Mesh( geometry, materials );
  scene.add( mesh );
  
  mat = new THREE.LineBasicMaterial({color: 0x000000});
  mesh2= new THREE.LineSegments(geometry, mat);
  mesh.add(mesh2);
  
  }
  
  function animate() {
  
  requestAnimationFrame( animate );
  
  mesh.rotation.x += 0.01;
  mesh.rotation.y += 0.02;
  mesh.rotation.z += 0.03;
  
  renderer.render( scene, camera );
  
  }
  </code></pre>
  
  <p>This below code is not to be working for LineSegments</p>
  
  <pre><code>mesh2= new THREE.LineSegments(geometry, new THREE.MultiMaterial(materials));  
  </code></pre>