Creating a Trapezoid

Back

Method 1 - Polyhedra Buffer Geometry

new THREE.polyhedronBufferGeometry(verticesOfCube, indicesOfFaces, 1, 0)
  • Create a polyhedra buffer geometry and enter the vertices

Method 2 - Cylinder Geometry

new THREE.cylinderGeometry(0.4 / Math.SQRT2, 1 / Math.SQRT2, 4)
  • Create a cylinder and adjust the top radius and bottom radius
  • Reduce the radial segments in the geometry to required amount

Reference

  • https://discourse.threejs.org/t/create-mesh-geometry-from-array-of-8-corners-vertices/2116/12?u=prisoner849
  • https://stackoverflow.com/questions/49481332/how-to-create-3d-trapezoid-in-three-js