air_pointer library
Classes
- CalibrationResult
- Per-user detection thresholds for GestureInputSource.
- CanvasCancelEvent
- Emitted when a drag is interrupted by an unrecoverable event (e.g. the hand tracking hand exits the camera frame mid-drag).
- CanvasDoubleTapEvent
- Emitted when two CanvasTapEvents occur within the double-tap window (~300 ms by default). Always preceded by a CanvasTapEvent on the same frame so consumers that only handle single-tap still work correctly.
- CanvasDownEvent
- CanvasGestureEvent
- Emitted when the hand-tracking backend classifies a discrete gesture (e.g. thumbs-up, victory sign). Only fired by GestureInputSource when the RecognizedGesture value is not RecognizedGesture.none.
- CanvasHoverEvent
- CanvasInputController
- CanvasInputSource
- CanvasLongPressEvent
- Emitted when the cursor holds still beyond the long-press threshold.
- CanvasMoveEvent
- CanvasScaleEndEvent
- CanvasScaleEvent
- CanvasScrollEvent
- CanvasSwipeEvent
- Emitted when the cursor moves fast enough in a single direction to be classified as a swipe gesture.
- CanvasTapEvent
- CanvasUpEvent
- GestureCalibrator
- Accumulates raw pinch-distance samples from GestureDebugInfo and derives calibrated CalibrationResult thresholds for a specific user.
- GestureDebugInfo
-
Snapshot of
HandGestureRecognizerstate emitted each frame by GestureInputSource.debugInfo. Useful for building debug overlays. - GestureInputSource
- HandDetectionFrame
- A single frame of hand-detection data from a native ML inference backend.
- HandLandmarkPoint
-
A single MediaPipe hand landmark, normalised to
0, 1in each axis. - HandTrackingCameraReady
- Camera is live and the hand-detection model is ready; scanning for hands.
- HandTrackingError
- An unrecoverable error occurred (camera denied, model load failed, etc.).
- HandTrackingInitializing
- GestureInputSource.initialize was called; camera and model are loading.
- HandTrackingLost
- A previously tracked hand has left the frame.
- HandTrackingStatus
- Lifecycle states emitted by GestureInputSource.statusStream.
- HandTrackingTracking
- At least one hand has been confirmed in frame.
- LandmarkProvider
- Contract for a native hand-detection backend.
- MouseInputSource
- PointerInputEvent
Enums
- GesturePhase
- Lifecycle state of the gesture recogniser's hand-tracking session.
- Handedness
- Which hand MediaPipe classified, from the camera's perspective.
- HandLandmarkType
- The 21 landmarks returned by MediaPipe HandLandmarker, in index order.
- RecognizedGesture
- A discrete hand gesture classified by a native ML backend.
- SwipeDirection
- Cardinal direction of a CanvasSwipeEvent.
Extensions
-
HandLandmarkList
on List<
HandLandmarkPoint> - Typed access into a 21-point MediaPipe landmark list.
Functions
-
classifyGesture(
List< HandLandmarkPoint> ? landmarks) → RecognizedGesture -
Classifies the hand pose in
landmarksinto a RecognizedGesture.