Package-level declarations
Types
Class that holds data for a spatial drag gesture.
A spatial event data generated from an input.
Class that holds the value of a rotate gesture.
Class that holds data for a spatial scale gesture.
Class that holds the value of a tap gesture.
Value class for spatial transform gesture.
Indicates how a gesture is bound to entities.
Functions
Gesture detector that waits for pointer down and touch slop in any direction and then calls onDrag for each drag event. It follows the touch slop detection of awaitTouchSlopOrCancellation but will consume the position change automatically once the touch slop has been crossed.
Gesture detector that waits for pointer down and long press, after which it calls onDrag for each drag event.
Gesture detector that waits for pointer down and touch slop in the horizontal direction and then calls onHorizontalDrag for each horizontal drag event. It follows the touch slop detection of awaitHorizontalTouchSlopOrCancellation, but will consume the position change automatically once the touch slop has been crossed.
Gesture detector that detects a spatial drag and calls onDrag for each event with a 3D drag amount, see SpatialDragValue. Usually, you can apply this gesture detector to a composable view, and apply the 3D drag value to a 2D view, through Modifier.offset and Modifier.zOffset, or to a 3D model Entity through TransformComponent. Entity is not interactable by default. To make an Entity interactable, you should both add an InteractableComponent and a CollisionComponent to this entity. The targetedToEntity parameter determines whether the gesture is bound to entities. Null means that this gesture can detect drag events that happen on a 2D view or 3D model within this view. See TargetEntity for more details.
Gesture detector that detects spatial pointer interaction events. onEvent will be invoked when pointers down, moving and up. You can use this detector to implement custom gestures, such as spatial rotation or zoom.
Gesture detector that detects a spatial rotate and calls onRotate for each event with a 3D rotate value, see SpatialRotateValue. Usually, you can apply this gesture detector to a composable view, and apply the 3D rotate value to a 2D view, through Modifier.rotate3d or Modifier.graphicsLayer, or to a 3D model Entity through TransformComponent. Entity is not interactable by default. To make an Entity interactable, you should both add an InteractableComponent and a CollisionComponent to this entity. The targetedToEntity parameter determines whether the gesture is bound to entities. Null means that this gesture can detect rotate events that happen on a 2D view or 3D model within this view. See TargetEntity for more details.
Gesture detector that detects a spatial scale and calls onScale for each event with a 3D scale value, see SpatialScaleValue. Usually, you can apply this gesture detector to a composable view, and apply the 3D scale value to a 2D view, through Modifier.scale or Modifier.graphicsLayer, or to a 3D model Entity through TransformComponent. Entity is not interactable by default. To make an Entity interactable, you should both add an InteractableComponent and a CollisionComponent to this entity. The targetedToEntity parameter determines whether the gesture is bound to entities. Null means that this gesture can detect scale events that happen on a 2D view or 3D model within this view. See TargetEntity for more details.
Gesture detector that detects spatial tap gesture. onTap will be invoked when a spatial tap gesture happens with a SpatialTapValue that holds data for the tap gesture, such as the position3D and entity. Compared to compose tap gesture detector, spatial tap gesture is useful for 3D interaction. Such as detect a gesture on a 3D model or 3D rotation view.
Detects spatial transform gestures, including translation, rotation, and scaling.
Detects tap, double-tap, and long press gestures and calls onTap, onDoubleTap, and onLongPress, respectively, when detected. onPress is called when the press is detected and the PressGestureScope.tryAwaitRelease and PressGestureScope.awaitRelease can be used to detect when pointers have released or the gesture was canceled. The first pointer down and final pointer up are consumed, and in the case of long press, all changes after the long press is detected are consumed.
Gesture detector that waits for pointer down and touch slop in the vertical direction and then calls onVerticalDrag for each vertical drag event. It follows the touch slop detection of awaitVerticalTouchSlopOrCancellation, but will consume the position change automatically once the touch slop has been crossed.