
Mirror Engine API / PlaneGeometry
Class: PlaneGeometry
A procedural plane-shaped geometry.
The size and tesselation properties of the plane can be controlled via constructor parameters. By default, the function will create a plane centered on the object space origin with a width and length of 1.0 and 5 segments in either axis (50 triangles). The normal vector of the plane is aligned along the positive Y axis.
Note that the plane is created with UVs in the range of 0 to 1.
Extends
Constructors
new PlaneGeometry()
new PlaneGeometry(opts?: {
calculateTangents: boolean;
halfExtents: Vec2;
lengthSegments: number;
widthSegments: number;
}): PlaneGeometry
Create a new PlaneGeometry instance.
Parameters
opts?
An object that specifies optional inputs for the function as follows:
calculateTangents?
boolean
Generate tangent information (defaults to false).
halfExtents?
The half dimensions of the plane in the X and Z axes (defaults to [0.5, 0.5]).
lengthSegments?
number
The number of divisions along the Z axis of the plane (defaults to 5).
widthSegments?
number
The number of divisions along the X axis of the plane (defaults to 5).
Returns
Overrides
Geometry.constructor
Properties
blendIndices
blendIndices: undefined | number[];
Blend indices.
Inherited from
blendWeights
blendWeights: undefined | number[];
Blend weights.
Inherited from
colors
colors: undefined | number[];
Colors.
Inherited from
Methods
calculateNormals()
calculateNormals(): void
Generates normal information from the positions and triangle indices.
Returns
void
Inherited from
calculateTangents()
calculateTangents(): void
Generates tangent information from the positions, normals, texture coordinates and triangle indices.
Returns
void