TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/danielitoCode/Spatial/llms.txt
Use this file to discover all available pages before exploring further.
Gestures object provides factory functions that return SceneGestures values — the configuration struct passed to Scene(gestures = ...) to control which touch gestures are recognised and how sensitive they are. Three modes are available: no input, one-finger orbit, and one-finger orbit combined with two-finger pinch zoom. Sensitivity can be left on the default Adaptive policy, which scales the angular delta with camera zoom and viewport size, or locked to a Fixed rate for predictable, manual-feeling control.
Import
Gestures Factory Functions
Gestures.none
SceneGestures has mode SceneGestures.Mode.None, with both orbitEnabled and zoomEnabled set to false. Use this when you want to drive the camera exclusively from code (e.g. CameraState.animateTo()).
Gestures.orbit
SceneGestures has mode SceneGestures.Mode.Orbit.
Controls how many degrees the orbit angle changes per pixel of input. Defaults to
GestureSensitivity.Adaptive, which scales sensitivity with the current zoom level and viewport dimensions. Pass GestureSensitivity.Fixed(degreesPerPixel) for a constant angular rate.Gestures.orbitAndZoom
SceneGestures has mode SceneGestures.Mode.OrbitAndZoom, with both orbitEnabled and zoomEnabled set to true.
Orbit sensitivity policy, applied to the one-finger drag component. The pinch-zoom scale delta is computed geometrically from the finger spread and is not affected by this parameter.
GestureSensitivity
GestureSensitivity is a @Immutable sealed interface with two variants. Choose one when constructing a SceneGestures via the Gestures factory.
GestureSensitivity.Adaptive
GestureSensitivity.Fixed
Angular delta in degrees applied per pixel of input movement. A value of
0.3f means dragging 100 pixels rotates the camera 30 degrees.SceneGestures
SceneGestures is a @ConsistentCopyVisibility @Immutable data class with an internal constructor. It is the value type consumed by Scene. You obtain instances exclusively through the Gestures factory; direct construction is internal.
| Property | Type | Description |
|---|---|---|
mode | SceneGestures.Mode | Enum of None, Orbit, or OrbitAndZoom. |
orbitEnabled | Boolean | true when mode is Orbit or OrbitAndZoom. |
zoomEnabled | Boolean | true only when mode is OrbitAndZoom. |
orbitSensitivity | GestureSensitivity | The sensitivity policy applied to one-finger orbit. |
SceneGestures.Mode
Example
Gesture events are consumed before reaching child composables. If you need to layer your own touch handling over the scene (e.g. a tap-to-select interaction), you should add pointer-input modifiers to composables outside the
Scene, not inside the content block.