Sphere

Sphere

A 3D object with all points equi-distance from a center point.

Constructor

new Sphere(zSamplesopt, radialSamplesopt, radiusopt, textureModeopt)

Parameters:
Name Type Attributes Default Description
zSamples number <optional>
8

Number of segments.

radialSamples number <optional>
8

Number of slices.

radius number <optional>
0.5

Radius.

textureMode Enum <optional>
Sphere.TextureModes.Polar

Texture wrapping mode.

Members

(static) TextureModes :Object

Possible texture wrapping modes: Linear, Projected, Polar, Chromeball

radialSamples :number

Number of slices.

Default Value:
  • 8

radius :number

Default Value:
  • 0.5

textureMode :Enum

Texture wrapping mode.

Default Value:
  • Sphere.TextureModes.Polar

viewInside :boolean

Inward-facing normals, for skydomes.

Default Value:
  • false

zSamples :number

Number of segments.

Default Value:
  • 8

Methods

clone() → {Sphere}

Returns a clone of this sphere

rebuild() → {Sphere}

Builds or rebuilds the mesh data.