Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlaneBuilder

Class containing static functions to help procedurally build meshes

Hierarchy

  • PlaneBuilder

Index

Methods

Methods

Static CreatePlaneSearch playground for CreatePlane

  • CreatePlane(name: string, options: { backUVs?: Vector4; frontUVs?: Vector4; height?: number; sideOrientation?: number; size?: number; sourcePlane?: Plane; updatable?: boolean; width?: number }, scene?: Nullable<Scene>): Mesh
  • Creates a plane mesh

    • The parameter size sets the size (float) of both sides of the plane at once (default 1)
    • You can set some different plane dimensions by using the parameters width and height (both by default have the same value of size)
    • The parameter sourcePlane is a Plane instance. It builds a mesh plane from a Math plane
    • 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 and backUVs (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
    see

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

    Parameters

    • name: string

      defines the name of the mesh

    • options: { backUVs?: Vector4; frontUVs?: Vector4; height?: number; sideOrientation?: number; size?: number; sourcePlane?: Plane; updatable?: boolean; width?: number }

      defines the options used to create the mesh

      • Optional backUVs?: Vector4
      • Optional frontUVs?: Vector4
      • Optional height?: number
      • Optional sideOrientation?: number
      • Optional size?: number
      • Optional sourcePlane?: Plane
      • Optional updatable?: boolean
      • Optional width?: number
    • Optional scene: Nullable<Scene>

      defines the hosting scene

    Returns Mesh

    the plane mesh

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method