Function CreateTiledBoxVertexData
-
CreateTiledBoxVertexData(
options: {
alignHorizontal?: number;
alignVertical?: number;
depth?: number;
faceColors?: Color4[];
faceUV?: Vector4[];
height?: number;
pattern?: number;
sideOrientation?: number;
size?: number;
tileHeight?: number;
tileSize?: number;
tileWidth?: number;
width?: number;
},
): VertexDataParameters
- options: {
alignHorizontal?: number;
alignVertical?: number;
depth?: number;
faceColors?: Color4[];
faceUV?: Vector4[];
height?: number;
pattern?: number;
sideOrientation?: number;
size?: number;
tileHeight?: number;
tileSize?: number;
tileWidth?: number;
width?: number;
}an object used to set the following optional parameters for the tiled box, required but can be empty
- pattern sets the rotation or reflection pattern for the tiles,
- size of the box
- width of the box, overwrites size
- height of the box, overwrites size
- depth of the box, overwrites size
- tileSize sets the size of a tile
- tileWidth sets the tile width and overwrites tileSize
- tileHeight sets the tile width and overwrites tileSize
- faceUV an array of 6 Vector4 elements used to set different images to each box side
- faceColors an array of 6 Color4 elements used to set different colors to each box side
- alignHorizontal places whole tiles aligned to the center, left or right of a row
- alignVertical places whole tiles aligned to the center, left or right of a column
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
Returns VertexData
the VertexData of the TiledBox
- options: {
Creates the VertexData for a tiled box