PolygonMeshBuilder

Hierarchy

  • PolygonMeshBuilder

Index

Constructors

Properties

Methods

Constructors

constructor

Find examples in Playground
  • Creates a PolygonMeshBuilder

    Parameters

    • name: string

      name of the builder

    • contours: Path2 | Vector2[] | any

      Path of the polygon

    • Optional scene: Scene

      scene to add to when creating the mesh

    • Optional earcutInjection: any

      can be used to inject your own earcut reference

    Returns PolygonMeshBuilder

Properties

bjsEarcut

Find examples in Playground
bjsEarcut: any

Babylon reference to the earcut plugin.

Methods

addHole

Find examples in Playground
  • Adds a whole within the polygon

    Parameters

    • hole: Vector2[]

      Array of points defining the hole

    Returns PolygonMeshBuilder

    this

build

Find examples in Playground
  • build(updatable?: boolean, depth?: number): Mesh
  • Creates the polygon

    Parameters

    • Optional updatable: boolean

      If the mesh should be updatable

    • Optional depth: number

      The depth of the mesh created

    Returns Mesh

    the created mesh

buildVertexData

Find examples in Playground
  • Creates the polygon

    Parameters

    • Optional depth: number

      The depth of the mesh created

    Returns VertexData

    the created VertexData

Generated using TypeDoc