|
@@ -157,6 +157,7 @@ export class MeshBuilder {
|
|
|
* * The parameter `subdivisions` sets the number of rings along the cylinder height (positive integer, default 1).
|
|
|
* * The parameter `hasRings` (boolean, default false) makes the subdivisions independent from each other, so they become different faces.
|
|
|
* * The parameter `enclose` (boolean, default false) adds two extra faces per subdivision to a sliced cylinder to close it around its height axis.
|
|
|
+ * * The parameter `cap` sets the way the cylinder is capped. Possible values : BABYLON.Mesh.NO_CAP, BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL (default).
|
|
|
* * The parameter `arc` (float, default 1) is the ratio (max 1) to apply to the circumference to slice the cylinder.
|
|
|
* * You can set different colors and different images to each box side by using the parameters `faceColors` (an array of n Color3 elements) and `faceUV` (an array of n Vector4 elements).
|
|
|
* * The value of n is the number of cylinder faces. If the cylinder has only 1 subdivisions, n equals : top face + cylinder surface + bottom face = 3
|
|
@@ -175,7 +176,7 @@ export class MeshBuilder {
|
|
|
* @returns the cylinder mesh
|
|
|
* @see https://doc.babylonjs.com/how_to/set_shapes#cylinder-or-cone
|
|
|
*/
|
|
|
- public static CreateCylinder(name: string, options: { height?: number, diameterTop?: number, diameterBottom?: number, diameter?: number, tessellation?: number, subdivisions?: number, arc?: number, faceColors?: Color4[], faceUV?: Vector4[], updatable?: boolean, hasRings?: boolean, enclose?: boolean, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: Nullable<Scene> = null): Mesh {
|
|
|
+ public static CreateCylinder(name: string, options: { height?: number, diameterTop?: number, diameterBottom?: number, diameter?: number, tessellation?: number, subdivisions?: number, arc?: number, faceColors?: Color4[], faceUV?: Vector4[], updatable?: boolean, hasRings?: boolean, enclose?: boolean, cap?: number, sideOrientation?: number, frontUVs?: Vector4, backUVs?: Vector4 }, scene: Nullable<Scene> = null): Mesh {
|
|
|
return CylinderBuilder.CreateCylinder(name, options, scene);
|
|
|
}
|
|
|
|