Class TorusKnotBuilder
Hierarchy
- TorusKnotBuilder
Index
Methods
Methods
Static Create Torus KnotSearch playground for CreateTorusKnot
-
Creates a torus knot mesh
- The parameter
radius
sets the global radius size (float) of the torus knot (default 2) - The parameter
radialSegments
sets the number of sides on each tube segments (positive integer, default 32) - The parameter
tubularSegments
sets the number of tubes to decompose the knot into (positive integer, default 32) - The parameters
p
andq
are the number of windings on each axis (positive integers, default 2 and 3) - 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: { backUVs?: Vector4; frontUVs?: Vector4; p?: number; q?: number; radialSegments?: number; radius?: number; sideOrientation?: number; tube?: number; tubularSegments?: number; updatable?: boolean }
defines the options used to create the mesh
-
scene: any
defines the hosting scene
Returns Mesh
the torus knot mesh
- The parameter
Class containing static functions to help procedurally build meshes