title: Three.js : Creating a right triangular prism
body: <p>I'm trying to create a right triangular prism.</p>
  
  <p>Here is my code so far :</p>
  
  <pre><code>var triangleGeometry = new THREE.Geometry(); 
  triangleGeometry.vertices.push(new THREE.Vector3(-1.0,  1.5, 0.95));  
  triangleGeometry.vertices.push(new THREE.Vector3(-1.0, -1.5, 0.95)); 
  triangleGeometry.vertices.push(new THREE.Vector3( 1.0, -1.5, 0.95));
  triangleGeometry.vertices.push(new THREE.Vector3(-1.0,  1.5, 1.2));  
  triangleGeometry.vertices.push(new THREE.Vector3(-1.0, -1.5, 1.2)); 
  triangleGeometry.vertices.push(new THREE.Vector3( 1.0, -1.5, 1.2));
  
  triangleGeometry.faces.push(new THREE.Face3(0, 1, 2));
  triangleGeometry.faces.push(new THREE.Face3(3, 4, 5));
  // Points 1,4,3 and 6 form a rectangle which I'm trying to construct using triangles 0,2,5 and 0,3,5
  triangleGeometry.faces.push(new THREE.Face3(0, 2, 5));
  triangleGeometry.faces.push(new THREE.Face3(0, 3, 5));
  
  var triangleMaterial = new THREE.MeshBasicMaterial({ 
  color:0xFFFFFF, 
  side:THREE.DoubleSide 
  });
  
  var triangleMesh = new THREE.Mesh(triangleGeometry, triangleMaterial); 
  triangleMesh.position.set(1, 0.0, 0.0); 
  
  scene.add(triangleMesh); 
  </code></pre>
  
  <p>I'm able to get what I want, but I want to know if there is any other good solution to get a right triangular prism.
  <img src="https://i.stack.imgur.com/bP5XZ.png" alt="enter image description here"></p>