Function ExtrudePolygon
-
ExtrudePolygon(
name: string,
options: {
backUVs?: Vector4;
depth?: number;
faceColors?: Color4[];
faceUV?: Vector4[];
frontUVs?: Vector4;
holes?: Vector3[][];
shape: Vector3[];
sideOrientation?: number;
smoothingThreshold?: number;
updatable?: boolean;
wrap?: boolean;
},
scene?: Nullable<Scene>,
earcutInjection?: any,
): MeshParameters
- name: string
defines the name of the mesh
- options: {
backUVs?: Vector4;
depth?: number;
faceColors?: Color4[];
faceUV?: Vector4[];
frontUVs?: Vector4;
holes?: Vector3[][];
shape: Vector3[];
sideOrientation?: number;
smoothingThreshold?: number;
updatable?: boolean;
wrap?: boolean;
}defines the options used to create the mesh
- scene: Nullable<Scene> = null
defines the hosting scene
- earcutInjection: any = earcut
can be used to inject your own earcut reference
Returns Mesh
the polygon mesh
- name: string
Creates an extruded polygon mesh, with depth in the Y direction.
faceColors(an array of 3 Color3 elements) andfaceUV(an array of 3 Vector4 elements)smoothingThresholdoption defines the dot product threshold for smoothing the normals of adjacent side faces. The default value of 2 disables smoothing