TiledPlaneBuilder

Class containing static functions to help procedurally build meshes

Hierarchy

  • TiledPlaneBuilder

Index

Methods

Static CreateTiledPlane

Find examples in Playground
  • 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 and tileHeight (both by default have the same value of tileSize)
    • 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 and backUVs (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)
    see

    https://doc.babylonjs.com/how_to/set_shapes#box

    Parameters

    • name: string

      defines the name of the mesh

    • options: object

      defines the options used to create the mesh

      • Optional alignHorizontal?: number
      • Optional alignVertical?: number
      • Optional backUVs?: Vector4
      • Optional frontUVs?: Vector4
      • Optional height?: number
      • Optional pattern?: number
      • Optional sideOrientation?: number
      • Optional size?: number
      • Optional tileHeight?: number
      • Optional tileSize?: number
      • Optional tileWidth?: number
      • Optional updatable?: boolean
      • Optional width?: number
    • Optional scene: Nullable<Scene>

      defines the hosting scene

    Returns Mesh

    the box mesh

Generated using TypeDoc