weasel API - v0.8.0
    Preparing search index...

    Function usePinchGesture

    • Detects two-finger pinch on a canvas element.

      Parameters

      • canvasRef: RefObject<HTMLCanvasElement | null>
      • onPinch: (anchor: { x: number; y: number }, scaleFactor: number) => void

        Called with the gesture midpoint in client coordinates and a per-frame scale factor (ratio of current distance to previous frame's distance, not cumulative from gesture start). With 3+ fingers, the first two by insertion order are tracked.

      • enabled: boolean = true

      Returns void