Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PolygonMeshBuilder

Hierarchy

  • PolygonMeshBuilder

Index

Constructors

Properties

Methods

Constructors

constructor

  • 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

bjsEarcutSearch playground for bjsEarcut

bjsEarcut: any

Babylon reference to the earcut plugin.

Methods

addHoleSearch playground for addHole

  • Adds a hole within the polygon

    Parameters

    • hole: Vector2[]

      Array of points defining the hole

    Returns PolygonMeshBuilder

    this

buildSearch playground for build

  • build(updatable?: boolean, depth?: number, smoothingThreshold?: number): Mesh
  • Creates the polygon

    Parameters

    • Optional updatable: boolean

      If the mesh should be updatable

    • Optional depth: number

      The depth of the mesh created

    • Optional smoothingThreshold: number

      Dot product threshold for smoothed normals

    Returns Mesh

    the created mesh

buildVertexDataSearch playground for buildVertexData

  • buildVertexData(depth?: number, smoothingThreshold?: number): VertexData
  • Creates the polygon

    Parameters

    • Optional depth: number

      The depth of the mesh created

    • Optional smoothingThreshold: number

      Dot product threshold for smoothed normals

    Returns VertexData

    the created VertexData

Legend

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