Function CreateLathe
-
CreateLathe(
name: string,
options: {
arc?: number;
backUVs?: Vector4;
cap?: number;
clip?: number;
closed?: boolean;
frontUVs?: Vector4;
invertUV?: boolean;
radius?: number;
shape: Vector3[];
sideOrientation?: number;
tessellation?: number;
updatable?: boolean;
},
scene?: Nullable<Scene>,
): MeshParameters
- name: string
defines the name of the mesh
- options: {
arc?: number;
backUVs?: Vector4;
cap?: number;
clip?: number;
closed?: boolean;
frontUVs?: Vector4;
invertUV?: boolean;
radius?: number;
shape: Vector3[];
sideOrientation?: number;
tessellation?: number;
updatable?: boolean;
}defines the options used to create the mesh
- scene: Nullable<Scene> = null
defines the hosting scene
Returns Mesh
the lathe mesh
- name: string
Creates lathe mesh. The lathe is a shape with a symmetry axis : a 2D model shape is rotated around this axis to design the lathe
shapeis a required array of successive Vector3. This array depicts the shape to be rotated in its local space : the shape must be designed in the xOy plane and will be rotated around the Y axis. It's usually a 2D shape, so the Vector3 z coordinates are often set to zeroradius(positive float, default 1) is the radius value of the lathetessellation(positive integer, default 64) is the side number of the latheclip(positive integer, default 0) is the number of sides to not create without effecting the general shape of the sidesarc(positive float, default 1) is the ratio of the lathe. 0.5 builds for instance half a lathe, so an opened shapeclosed(boolean, default true) opens/closes the lathe circumference. This should be set to false when used with the parameter "arc"capsets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALLfrontUVsandbackUVs(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientationinvertUV(boolean, default false) swaps in the geometry the U and V coordinates to apply a textureupdatable(default false) if its internal geometry is supposed to change once created