title: Three.js what does "indices of faces" mean and how does it work?
body: <p>I am trying to create an irregular polyhedron with Three.js. I am using the 
  <code>PolyhedronGeometry</code> (<a href="https://threejs.org/docs/#api/geometries/PolyhedronGeometry" rel="nofollow noreferrer">documentation</a>) for that. The problem is I do not quite understand what </p>
  
  <blockquote>
    <p>indices — Array of indices that make up the faces of the form [0,1,2, 2,3,0, ... ] </p>
  </blockquote>
  
  <p>means. Therefore, the irregular tetrahedron, that I have created in this <a href="http://jsfiddle.net/g94wtj8e/3/" rel="nofollow noreferrer">JSfiddle</a>, has not all faces closed as it should have. </p>
  
  <p>How can this be achieved?</p>
  
  <p>This is the way I am currently trying to create the tetrahedron:</p>
  
  <pre><code>var verticesOfCube = [-1,-1,-1,    1,-2.5,1,    1, 1,-1,    -1, 1,-1];
  var indicesOfFaces = [2,1,0,    0,3,2,  3,2,1,    1,3,0];
  
  // geometry
  var geometry = new THREE.PolyhedronGeometry( verticesOfCube, indicesOfFaces, 10, 0 );
  
  // material
  var material1 = new THREE.MeshPhongMaterial( {
      color: 'sandybrown'
  } );
  
  // mesh
  mesh = new THREE.Mesh( geometry, material1 );
  mesh.position.set( 0, 0, 0 );
  scene.add( mesh );
  </code></pre>