mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
* Docs: Fix hyperlinks * Update website link generation * Replace website links with actual file path
963 B
963 B
Cylinder
Creates a cylinder model. Inherits methods from Model.
Usage
Create a white Cylinder of radius 2 and height 3.
var whiteCylinder = new Cylinder(gl, {
radius: 2,
height: 3,
colors: [1, 1, 1, 1]
});
Method
constructor
The constructor for the Cylinder class. Use this to create a new Cylinder.
var model = new Cylinder(gl, options);
- nradial - (number, optional) The number of vertices for the disk. Default's 10.
- nvertical - (number, optional) The number of vertices for the height. Default's 10.
- verticalAxis - (string) The axis along which the height is measured. One of
x,y,z. Defaulty. - radius - (number) The radius of the cylinder.
- topCap - (boolean, optional) Whether to put the cap on the top of the cylinder. Default's false.
- bottomCap - (boolean, optional) Whether to put the cap on the bottom part of the cylinder. Default's false.