Geometries

Three.js provides a number of built-in geometries. Here is a program to explore some of them.

Some geometries

Each of these is constructed procedurally by calling a function with arguments specific to the geometry. For example, the sphere is built with this call:

new THREE.SphereGeometry(10, 24, 24)

The first argument refers to radius, the second to the number of horizontal segments, and the third to the number of vertical segments. Every geometry constructor includes some parameters for setting mesh granularity, how fine the surface triangulation is. You can see the settings I chose by clicking the wireframe checkbox.