mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
23 lines
502 B
Markdown
23 lines
502 B
Markdown
# Cube
|
|
|
|
Create a white cube model. Inherits methods from [`Model`](/#/documentation/api-reference/model)
|
|
|
|
## Usage
|
|
|
|
```js
|
|
var whiteCube = new Cube(gl, {
|
|
colors: [1, 1, 1, 1]
|
|
});
|
|
```
|
|
|
|
## Method
|
|
|
|
### constructor
|
|
|
|
Creates a Cube model. Inherits methods from [`Model`](/#/documentation/api-reference/model).
|
|
|
|
|
|
Use this to create a new Cube. Accepts the same properties and options as Model constructor but has preset for `vertices`, `normals` and `indices`.
|
|
|
|
`var model = new Cube(gl, options);`
|