
Mirror Engine API / ConeGeometry
Class: ConeGeometry
A procedural cone-shaped geometry.
The size, shape and tesselation properties of the cone can be controlled via constructor parameters. By default, the function will create a cone standing vertically centered on the XZ-plane with a base radius of 0.5, a height of 1.0, 5 height segments and 18 cap segments.
Note that the cone is created with UVs in the range of 0 to 1.
Extends
ConeBaseGeometry
Constructors
new ConeGeometry()
new ConeGeometry(opts?: {
baseRadius: number;
calculateTangents: boolean;
capSegments: number;
height: number;
heightSegments: number;
peakRadius: number;
}): ConeGeometry
Create a new ConeGeometry instance.
Parameters
opts?
An object that specifies optional inputs for the function as follows:
baseRadius?
number
The base radius of the cone (defaults to 0.5).
calculateTangents?
boolean
Generate tangent information (defaults to false).
capSegments?
number
The number of divisions around the tubular body of the cone (defaults to 18).
height?
number
The length of the body of the cone (defaults to 1.0).
heightSegments?
number
The number of divisions along the length of the cone (defaults to 5).
peakRadius?
number
The peak radius of the cone (defaults to 0.0).
Returns
Overrides
ConeBaseGeometry.constructor
Properties
blendIndices
blendIndices: undefined | number[];
Blend indices.
Inherited from
ConeBaseGeometry.blendIndices
blendWeights
blendWeights: undefined | number[];
Blend weights.
Inherited from
ConeBaseGeometry.blendWeights
colors
colors: undefined | number[];
Colors.
Inherited from
ConeBaseGeometry.colors
Methods
calculateNormals()
calculateNormals(): void
Generates normal information from the positions and triangle indices.
Returns
void
Inherited from
ConeBaseGeometry.calculateNormals
calculateTangents()
calculateTangents(): void
Generates tangent information from the positions, normals, texture coordinates and triangle indices.
Returns
void
Inherited from
ConeBaseGeometry.calculateTangents