1chandu f05c63a0aa
Doc links (#521)
* Docs: Fix hyperlinks
* Update website link generation
* Replace website links with actual file path
2018-05-24 11:08:10 -07:00

26 lines
608 B
Markdown

# Sphere
Creates a sphere model. Inherits methods from [`Model`](/docs/api-reference/core/model.md).
## 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.