API

Variable PolygonBuilderConst

PolygonBuilder: {
    CreatePolygon: (
        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,
    ) => Mesh;
    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,
    ) => Mesh;
} = ...

Class containing static functions to help procedurally build meshes

Type Declaration

  • CreatePolygon: (
        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,
    ) => Mesh
  • 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,
    ) => Mesh

use the functions directly from the module