IFClite TypeScript API
    Preparing search index...

    Interface BCFOverlayProjection

    Viewer-agnostic projection interface. Each renderer (WebGPU, Three.js, Babylon.js, etc.) provides an implementation of this interface to enable BCF 3D overlays.

    interface BCFOverlayProjection {
        getCameraPosition?(): OverlayPoint3D;
        getCanvasSize(): { height: number; width: number };
        getEntityBounds(expressId: number): OverlayBBox | null;
        onCameraChange(callback: () => void): () => void;
        projectToScreen(worldPos: OverlayPoint3D): { x: number; y: number } | null;
    }
    Index
    • Get the current camera position in world space (Y-up). Used for depth-based scaling. Optional — markers render at uniform size if not provided.

      Returns OverlayPoint3D

    • Get the canvas/viewport dimensions in pixels

      Returns { height: number; width: number }

    • Get the axis-aligned bounding box for an entity by its expressId. Returns null if the entity is not found.

      Parameters

      • expressId: number

      Returns OverlayBBox | null

    • Subscribe to camera/render changes. The callback is invoked synchronously inside the polling RAF so the overlay can re-project in the same animation frame for zero-lag tracking during orbit/pan/zoom. Returns an unsubscribe function.

      Parameters

      • callback: () => void

      Returns () => void

    • Project a world-space position to screen coordinates (pixels). Returns null if the point is behind the camera.

      Parameters

      Returns { x: number; y: number } | null