new CylinderGeometry
A description of a cylinder.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
options.length |
Number | The length of the cylinder. | ||
options.topRadius |
Number | The radius of the top of the cylinder. | ||
options.bottomRadius |
Number | The radius of the bottom of the cylinder. | ||
options.slices |
Number |
<optional> |
128 | The number of edges around perimeter of the cylinder. |
options.vertexFormat |
VertexFormat |
<optional> |
VertexFormat.DEFAULT | The vertex attributes to be computed. |
Throws:
-
DeveloperError : options.length must be greater than 0.
-
DeveloperError : options.topRadius must be greater than 0.
-
DeveloperError : options.bottomRadius must be greater than 0.
-
DeveloperError : bottomRadius and topRadius cannot both equal 0.
-
DeveloperError : options.slices must be greater that 3.
Example
// create cylinder geometry var cylinder = new CylinderGeometry({ length: 200000, topRadius: 80000, bottomRadius: 200000, }); var geometry = CylinderGeometry.createGeometry(cylinder);
- CylinderGeometry#createGeometry
See:
Source:
Methods
-
<static> createGeometry
-
Computes the geometric representation of a cylinder, including its vertices, indices, and a bounding sphere.
Parameters:
Name Type Description cylinderGeometry
CylinderGeometry A description of the cylinder. Returns:
Geometry The computed vertices and indices.