Three ways to make geometry shapes in three.js

Three ways to make geometry shapes in three.js

In this overview of making geometry shapes in three.js we’re going to give you a feel for what your options are and point you in the direction of learning different geometry methods.

In three.js objects that you will see in the 3d viewer are (generally) meshes, and a mesh is made of the combination of a geometry and material. In other words a blue box would be a box geometry shape with a blue surface material. There are lots of terms that are used somewhat interchangeably, but in three.js the terms that matter when programming are “geometry” and “material” combined, equals “mesh”.

Here are the 3 main ways to make geometry in three.js:

  1. Fully custom geometry where we manually define vertices and faces to form geometric 3d shapes.
  2. Using the Shape and Extrude classes to define custom shapes and then extrude these shapes to form 3d geometry.
  3. Using predefined geometric shapes provided by three.js such as Cube, Cylinder.

Leave a Reply

Your email address will not be published. Required fields are marked *

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

admin

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

admin