Class DiscBuilder
Hierarchy
- DiscBuilder
Index
Methods
Methods
Static Create DiscSearch playground for CreateDisc
-
Creates a plane polygonal mesh. By default, this is a disc
- The parameter
radius
sets the radius size (float) of the polygon (default 0.5) - The parameter
tessellation
sets the number of polygon sides (positive integer, default 64). So a tessellation valued to 3 will build a triangle, to 4 a square, etc - You can create an unclosed polygon with the parameter
arc
(positive float, default 1), valued between 0 and 1, what is the ratio of the circumference : 2 x PI x ratio - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/babylon101/discover_basic_elements#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
-
name: string
defines the name of the mesh
-
options: { arc?: number; backUVs?: Vector4; frontUVs?: Vector4; radius?: number; sideOrientation?: number; tessellation?: number; updatable?: boolean }
defines the options used to create the mesh
-
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the plane polygonal mesh
- The parameter
Class containing static functions to help procedurally build meshes