API

Function CreateTiledBox

  • Creates a tiled box mesh

    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;
      }

      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 Color3 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
    • scene: Nullable<Scene> = null

      defines the hosting scene

    Returns Mesh

    the box mesh