BIM.works SDKs - v3.0.0-b.115
    Preparing search index...

    Interface FigureLayerHandle

    interface FigureLayerHandle {
        destroy(): void;
        getBounds(id?: string): AxisAlignedBoundingBox3D | null;
        getEntry(id: string): FigureEntry | undefined;
        off(event: string, handler: (...args: any[]) => void): void;
        on(event: "click", handler: (id: string) => void): void;
        on(event: "hover", handler: (id: string | null) => void): void;
        on(event: "cleared", handler: () => void): void;
        select(id: string | null): void;
        setStateVisible(state: FigureState, visible: boolean): void;
        update(id: string, patch: Partial<FigureEntry>): boolean;
        viewDirectionOf(id: string): number[] | null;
        viewFit(id?: string): boolean;
    }
    Index

    Methods

    • Returns void

    • Render-space bounds of one entry or of every figure, null while nothing is placed

      Parameters

      • Optionalid: string

      Returns AxisAlignedBoundingBox3D | null

    • Parameters

      • id: string

      Returns FigureEntry | undefined

    • Parameters

      • event: string
      • handler: (...args: any[]) => void

      Returns void

    • A click on a figure; on merged area figures resolved from the picked point

      Parameters

      • event: "click"
      • handler: (id: string) => void

      Returns void

    • Hovering names line, dimension and box figures only: area figures are merged into one mesh per state

      Parameters

      • event: "hover"
      • handler: (id: string | null) => void

      Returns void

    • The figures are gone: destroy(), another layer added under the same key, or a viewer reset

      Parameters

      • event: "cleared"
      • handler: () => void

      Returns void

    • One entry drawn as selected, the previous one no longer; null clears

      Parameters

      • id: string | null

      Returns void

    • Parameters

      Returns void

    • Changes an entry; a new state moves it to that state's colour

      Parameters

      Returns boolean

    • The direction viewFit(id) looks at an entry's area from, as ViewFitOptions.viewDirection takes it: out of its face, tilted up; null for an entry without an area or not placed yet

      Parameters

      • id: string

      Returns number[] | null

    • Fits the camera to one entry or every figure; false while nothing is placed

      Parameters

      • Optionalid: string

      Returns boolean