In this chapter, we discussed all of the standard geometries that Three.js has to offer. As you saw, there are a whole lot of geometries you can use right out of the box. To best learn how to use the geometries, experiment with them. Use the examples in this chapter to get to know the properties you can use to customize the standard set of geometries available from Three.js.
For 2D shapes, it’s important to remember that they are placed on the x-y plane. If you want to have a 2D shape horizontally, you’ll have to rotate the mesh around the x-axis for
-0.5 * PI. And finally, take care that if you’re rotating a 2D shape, or a 3D shape that is open (for example, a cylinder or a tube), remember to set the material to
THREE.DoubleSide. If you don’t do this, the inside or the back of your geometry won’t be shown.
In this chapter, we focused on simple, straightforward meshes. Three.js also provides ways to create complex geometries, which we...