Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    interface InitPickingPorts {
        sceneManager: SceneManager;
        pickingEvents: EventGroup;
        previous: InitPickingResult;
        getOverlayManager: () => OverlayManager | undefined;
        onSelection?: (
            sel:
                | { nodeName: string; elementIndex: number; hitNodeName: string }
                | null,
        ) => void;
        hasSelectionConsumer?: () => boolean;
        hasElementActionConsumer?: () => boolean;
        allowLinks?: boolean;
        onElementClick?: (payload: ElementPointerPayload) => void;
        onElementContextMenu?: (payload: ElementPointerPayload) => void;
    }
    Index
    sceneManager: SceneManager
    pickingEvents: EventGroup
    getOverlayManager: () => OverlayManager | undefined
    onSelection?: (
        sel:
            | { nodeName: string; elementIndex: number; hitNodeName: string }
            | null,
    ) => void

    Optional sink for the public selection embedder event.

    hasSelectionConsumer?: () => boolean

    Whether an embedder selection listener currently exists. Read at init time to provision the picking pipeline even for datasets with no per-element string/image channel, and read LIVE inside the shouldPick gate so pick renders only run while someone consumes them.

    hasElementActionConsumer?: () => boolean

    Whether an embedder element-click / element-contextmenu listener currently exists (issue #1917).

    Separate from hasSelectionConsumer because the two answer different questions and are read at different times, but they are OR'd for both provisioning and gating: a host that subscribes ONLY to element-click, on a scene with no per-element string channels and no interaction templates, would otherwise get a viewer that never picks and therefore an event that never fires — with nothing to indicate why.

    allowLinks?: boolean

    Whether a picked element's link may be opened (issue #1917). False suppresses navigation, the two link menu items and the pointer cursor, while leaving Copy working — an embedder showing scenes it did not author needs the guarantee that no navigation can originate in data. Defaults to true.

    onElementClick?: (payload: ElementPointerPayload) => void

    Sinks for the public element-click / element-contextmenu events.

    onElementContextMenu?: (payload: ElementPointerPayload) => void