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.

Hierarchy (View Summary)

Constructors

  • Create a new SphereGeometry instance.

    Parameters

    • Optionalopts: {
          calculateTangents?: boolean;
          latitudeBands?: number;
          longitudeBands?: number;
          radius?: number;
      } = {}

      An object that specifies optional inputs for the function as follows:

      • OptionalcalculateTangents?: boolean

        Generate tangent information (defaults to false).

      • OptionallatitudeBands?: number

        The number of divisions along the latitudinal axis of the sphere (defaults to 16).

      • OptionallongitudeBands?: number

        The number of divisions along the longitudinal axis of the sphere (defaults to 16).

      • Optionalradius?: number

        The radius of the sphere (defaults to 0.5).

    Returns SphereGeometry

Properties

blendIndices: number[]

Blend indices.

blendWeights: number[]

Blend weights.

colors: number[]

Colors.

Methods