Viewer - Interaction
    Preparing search index...

    Interface IInteractionEngine

    interface IInteractionEngine {
        closed: boolean;
        intersectionOpacity: number;
        managers: { [key: string]: IInteractionManager };
        paused: boolean;
        pauseWhileBusy: boolean;
        addInteractionManager(manager: IInteractionManager): string;
        close(): void;
        continue(): void;
        onKeyDown(event: KeyboardEvent, pointerInCanvas: boolean): void;
        onKeyUp(event: KeyboardEvent, pointerInCanvas: boolean): void;
        onMouseWheel(event: WheelEvent): void;
        onPointerDown(event: PointerEvent): void;
        onPointerEnd(event: PointerEvent): void;
        onPointerMove(event: PointerEvent): void;
        onPointerOut(event: PointerEvent): void;
        onPointerUp(event: PointerEvent): void;
        pause(): void;
        removeInteractionManager(token: string): boolean;
    }

    Hierarchy

    • IDomEventListener
      • IInteractionEngine

    Implemented by

    Index

    Properties

    closed: boolean

    The current state of the interaction engine.

    intersectionOpacity: number

    Opacity at or below which scene geometry does not occlude interactions when occludeBySceneGeometry is enabled. (Default: 0.01)

    managers: { [key: string]: IInteractionManager }

    All currently registered interaction managers with their token as a key.

    paused: boolean

    Whether the interactions are paused: by pause, or while the viewport is busy if pauseWhileBusy is set.

    pauseWhileBusy: boolean

    Pause the interactions while the viewport is busy (busy mode, e.g. a session computes), like pause; they continue when the busy mode ends (unless paused by pause). (Default: false)

    Methods

    • Add a new interaction manager to the selection of interaction managers. This manager will be fed with all onDown, onMove and onEnd events by the InteractionEngine. The token that is return can be used to remove this interaction manager.

      Parameters

      Returns string

    • Closes the interaction engine and removes all managers that where registered.

      Returns void

    • Resume the interactions after pause (they stay paused while the viewport is busy if pauseWhileBusy is set).

      Returns void

    • Parameters

      • event: KeyboardEvent
      • pointerInCanvas: boolean

      Returns void

    • Parameters

      • event: KeyboardEvent
      • pointerInCanvas: boolean

      Returns void

    • Parameters

      • event: WheelEvent

      Returns void

    • Parameters

      • event: PointerEvent

      Returns void

    • Parameters

      • event: PointerEvent

      Returns void

    • Parameters

      • event: PointerEvent

      Returns void

    • Parameters

      • event: PointerEvent

      Returns void

    • Parameters

      • event: PointerEvent

      Returns void

    • Pause all interactions of the registered managers (selection, hovering, dragging), e.g. while a computation runs: pointer events are ignored until continue is called. An interaction in progress is cancelled (see IInteractionManager.cancelInteraction: a drag returns its nodes to their placement before the drag, hovered nodes are unhovered, a box selection ends without selecting). The selection is kept. The camera is not affected. See also pauseWhileBusy.

      Returns void

    • Remove an interaction manager with the token returned when adding it.

      Parameters

      • token: string

      Returns boolean