Chevron Down
Table of Contents
Chevron DownGetting Started
Chevron DownAPI Reference


A scenegraph model node with an SphereGeometry.


Create a white Sphere of radius 2

import {Sphere} from '';
const sphere = new Sphere(gl, {
  radius: 2


Sphere extends ModelNode extends ScenegraphNode


constructor(gl : WebGLRenderingContext, props : Object)

The constructor for the Sphere class. Use this to create a new Sphere.

  • props.nlat=10 - (number, optional) The number of vertices for latitude.
  • props.nlong=10 - (number, optional) The number of vertices for longitude.
  • props.radius=1 - (number, optional) The radius of the sphere.