IFClite TypeScript API
    Preparing search index...

    Interface PresenceOverlayOptions

    interface PresenceOverlayOptions {
        agentPalette?: readonly string[];
        container: HTMLElement;
        cursorSize?: number;
        excludeClientId?: number;
        font?: string;
        now?: () => number;
        palette?: readonly string[];
        staleAfterMs?: number;
        viewport: string;
        worldToScreen?: (worldPos: Vec3) => { x: number; y: number } | null;
    }

    Hierarchy (View Summary)

    Index
    agentPalette?: readonly string[]

    Override the agent palette.

    container: HTMLElement

    Element to mount the overlay over. Must be position:relative.

    cursorSize?: number

    Optional override for the cursor arrow size in CSS pixels. Default 14.

    excludeClientId?: number

    Drop the local peer from the result. Default true.

    font?: string

    Optional override for label font in CSS. Default '12px sans-serif'.

    now?: () => number

    Override Date.now.

    palette?: readonly string[]

    Override the random color palette.

    staleAfterMs?: number

    Wall-clock ms after which a peer is considered stale. Default 10_000.

    viewport: string

    Viewport name to filter cursor2d to.

    worldToScreen?: (worldPos: Vec3) => { x: number; y: number } | null

    Host-supplied world→screen projector. When provided, peers' cursor3d values (published by mountPresenceInViewer with raycastToWorld) are projected through THIS viewer's camera, so every peer sees cursors anchored to the same world point regardless of their own perspective.

    Returning null (point is behind the camera, off-screen, etc.) hides the peer's cursor that frame. cursor2d continues to be used as a fallback when a peer hasn't published a 3D cursor.