Function draggable

    • Wire handle for pointer-drag. Each pointermove while pressed calls onDrag(local) with the pointer in handle's local frame; pointer-captured so drags survive leaving the handle. The optional onState(active) callback fires true on pointerdown and false on pointerup/cancel — Handle uses it to drive .dragging.

      Parameters

      • handle: AnyShape
      • onDrag: (local: V) => void
      • OptionalonState: (active: boolean) => void

      Returns () => void