Class TiledBoxBuilder
Hierarchy
- TiledBoxBuilder
Index
Methods
Methods
Static Create Tiled BoxSearch playground for CreateTiledBox
-
Creates a box mesh faceTiles sets the pattern, tile size and number of tiles for a face * * You can set different colors and different images to each box side by using the parameters
faceColors
(an array of 6 Color3 elements) andfaceUV
(an array of 6 Vector4 elements)- Please read this tutorial : https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors
- 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: { alignHorizontal?: number; alignVertical?: number; depth?: number; faceColors?: Color4[]; faceUV?: Vector4[]; height?: number; pattern?: number; sideOrientation?: 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 depth?: number
-
Optional face
Colors?: Color4[] -
Optional faceUV?: Vector4[]
-
Optional height?: number
-
Optional pattern?: number
-
Optional side
Orientation?: 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
Class containing static functions to help procedurally build meshes