A procedural sphere-shaped geometry.
The size and tesselation properties of the sphere can be controlled via constructor parameters. By default, the function will create a sphere centered on the object space origin with a radius of 0.5 and 16 segments in both longitude and latitude.
Note that the sphere is created with UVs in the range of 0 to 1.
new SphereGeometry(opts?: {
calculateTangents: boolean;
latitudeBands: number;
longitudeBands: number;
radius: number;
}): SphereGeometry
Create a new SphereGeometry instance.
An object that specifies optional inputs for the function as follows:
boolean
Generate tangent information (defaults to false).
number
The number of divisions along the latitudinal axis of the sphere (defaults to 16).
number
The number of divisions along the longitudinal axis of the sphere (defaults to 16).
number
The radius of the sphere (defaults to 0.5).
Geometry.constructor
blendIndices: undefined | number[];
Blend indices.
blendWeights: undefined | number[];
Blend weights.
colors: undefined | number[];
Colors.
calculateNormals(): void
Generates normal information from the positions and triangle indices.
void
calculateTangents(): void
Generates tangent information from the positions, normals, texture coordinates and triangle indices.
void