Three.js provides a couple of ways we can extrude a 2D shape to a 3D shape. With extruding we mean stretching out a 2D shape along its z-axis to convert it to 3D. For instance, if we extrude the
THREE.CircleGeometry object, we get a shape that looks like a cylinder and if we extrude a
THREE.PlaneGeometry object, we get a cube-like shape.
The most versatile way of extruding a shape is by using the
ExtrudeGeometry you can create a 3D object from a 2D shape. Before we dive into the details of this geometry, let's first look at an example,
03-extrude-geometry.html, shown in the following screenshot:
In this example we've taken the 2D shape that we created earlier in ...