Class TiledPlaneBuilder
Hierarchy
- TiledPlaneBuilder
Index
Methods
Methods
Static Create Tiled PlaneSearch playground for CreateTiledPlane
-
Creates a tiled plane mesh
- The parameter
pattern
will, depending on value, do nothing or - flip (reflect about central vertical) alternate tiles across and up
- flip every tile on alternate rows
- rotate (180 degs) alternate tiles across and up
- rotate every tile on alternate rows
- flip and rotate alternate tiles across and up
- flip and rotate every tile on alternate rows
- The parameter
tileSize
sets the size (float) of each tile side (default 1) - You can set some different tile dimensions by using the parameters
tileWidth
andtileHeight
(both by default have the same value oftileSize
) - 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 - sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Parameters
-
name: string
defines the name of the mesh
-
options: { alignHorizontal?: number; alignVertical?: number; backUVs?: Vector4; frontUVs?: Vector4; height?: number; pattern?: number; sideOrientation?: number; size?: number; tileHeight?: number; tileSize?: number; tileWidth?: number; updatable?: boolean; width?: number }
defines the options used to create the mesh
-
Optional align
Horizontal?: number -
Optional align
Vertical?: number -
Optional backUVs?: Vector4
-
Optional frontUVs?: Vector4
-
Optional height?: number
-
Optional pattern?: number
-
Optional side
Orientation?: number -
Optional size?: number
-
Optional tile
Height?: number -
Optional tile
Size?: number -
Optional tile
Width?: number -
Optional updatable?: boolean
-
Optional width?: number
-
-
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the box mesh
- The parameter
Class containing static functions to help procedurally build meshes