Class PolygonMeshBuilder
Index
Constructors
constructor
-
new PolygonMeshBuilder(
name: string,
contours: any,
scene?: Scene,
earcutInjection?: any,
): PolygonMeshBuilderCreates a PolygonMeshBuilder
Parameters
- name: string
name of the builder
- contours: any
Path of the polygon
Optionalscene: Scenescene to add to when creating the mesh
- earcutInjection: any = earcut
can be used to inject your own earcut reference
Returns PolygonMeshBuilder
- name: string
Methods
add Hole
-
Adds a hole within the polygon
Parameters
- hole: Vector2[]
Array of points defining the hole
Returns PolygonMeshBuilder
this
- hole: Vector2[]
build
-
Creates the polygon
Parameters
- updatable: boolean = false
If the mesh should be updatable
- depth: number = 0
The depth of the mesh created
- smoothingThreshold: number = 2
Dot product threshold for smoothed normals
Returns Mesh
the created mesh
- updatable: boolean = false
build Vertex Data
-
Creates the polygon
Parameters
- depth: number = 0
The depth of the mesh created
- smoothingThreshold: number = 2
Dot product threshold for smoothed normals
Returns VertexData
the created VertexData
- depth: number = 0
Builds a polygon
See
https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/param/polyMeshBuilder