Shaojing Li 6a9c2e2445 Update links for the docs (#284)
* Update links for the docs
2017-07-26 19:58:23 -07:00

26 lines
611 B
Markdown

# Sphere
Creates a sphere model. Inherits methods from [`Model`](/#/documentation/api-reference/model).
## Usage
Create a white Sphere of radius 2
```js
var whiteSphere = new Sphere(gl, {
radius: 2,
colors: [1, 1, 1, 1]
});
```
## Method
### constructor
The constructor for the Sphere class. Use this to create a new Sphere.
`var model = new Sphere(gl, options);`
* nlat - (*number*, optional) The number of vertices for latitude. Default's 10.
* nlong - (*number*, optional) The number of vertices for longitude. Default's 10.
* radius - (*number*, optional) The radius of the sphere. Default's 1.