Documentation
    Preparing search index...

    Interface DragManagerOptions

    Construction options for DragManager.

    interface DragManagerOptions {
        camera?: Camera;
        depthRange?: DepthRange;
        onDrag: DragListener;
        onDragEnd?: (node: Node) => void;
        onDragStart?: (node: Node, event: ScenePointerEvent) => void;
        pointerInput: PointerInput;
    }
    Index
    camera?: Camera

    Camera the drag maths run against. Defaults to the pointer input's camera, which is what resolved the pointer in the first place — pass one only to override that deliberately.

    depthRange?: DepthRange

    Clip-space depth convention of that camera's projection (plan D8). Defaults to "negative-one-to-one" via createPickRay. It cancels out of the delta (both unprojections use it), so it matters only for the perspective depth measurement.

    onDrag: DragListener

    Receives the world-space displacement since the previous move of this drag.

    The vector is reused between calls (plan D7) — read it or copy it, never keep it. The manager never writes a transform: see the module documentation.

    onDragEnd?: (node: Node) => void

    Called when a drag ends — on release, on DragManager.releaseDrag, and on disposal. Takes no event, because a programmatic release has none.

    onDragStart?: (node: Node, event: ScenePointerEvent) => void

    Called when a drag begins, before any DragManagerOptions.onDrag.

    pointerInput: PointerInput

    The pointer source whose events drive drags. Its setPointerCapture is what keeps a drag alive when the pointer leaves the node.