BufferGeometryCylinderGeometry

ConeGeometry

A class for generating cone geometries.

Code Example

const geometry = new v3d.ConeGeometry(5, 20, 32); const material = new v3d.MeshBasicMaterial({color: 0xffff00}); const cone = new v3d.Mesh(geometry, material); scene.add(cone);

Constructor

ConeGeometry(radius : Float, height : Float, radialSegments : Integer, heightSegments : Integer, openEnded : Boolean, thetaStart : Float, thetaLength : Float)

radius — radius of the cone base. Default is 1.
height — height of the cone. Default is 1.
radialSegments — number of segmented faces around the circumference of the cone. Default is 32.
heightSegments — number of rows of faces along the height of the cone. Default is 1.
openEnded — a boolean indicating whether the base of the cone is open or capped. Default is false, meaning capped.
thetaStart — start angle for first segment, default is 0 (three o'clock position).
thetaLength — the central angle, often called theta, of the circular sector. The default is 2π (2*Math.PI), which makes for a complete cone.

Procedural geometry is fun. However, in real life applications this feature is rarely needed. It would be more efficient do design cones in the preferred modelling suite and export/load to Verge3D via glTF.

Properties

See the base CylinderGeometry class for common properties.

.parameters : Object

An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.

Methods

See the base CylinderGeometry class for common methods.

Source

For more info on how to obtain the source code of this module see this page.