Skip to main content

Spatial Rotate

Summary

Represents a completed two-handed "select, activate, and hold" action on a target in space that produces rotation, whether the interaction is performed through indirect "gaze + pinch" or direct touch.

Trigger Conditions

TargetTriggered when
Spatialized 2D HTML elementAfter the 3D spatial position occupied by its own content is pinched and held.
3D container elementAfter the 3D spatial position occupied by its own interactive content is pinched and held.

Mental Model

The line between the two hands, effectively like a real object, can rotate at arbitrary angles in 3D space.

Event Type Signature

StageDOM event
Rotatingspatialrotate
Rotate endspatialrotateend

React Usage

StageJSX prop
RotatingonSpatialRotate
Rotate endonSpatialRotateEnd

Native DOM Usage

Current limitation

At the current stage, the WebSpatial SDK does not allow listening to spatial events directly on DOM elements, including those obtained from refs.

Event Lifecycle

No event is triggered during the "selection" phase. After pinch-and-hold activates, spatialrotate is triggered continuously while the hold continues. Releasing ends the action and triggers spatialrotateend.

SpatialRotateEvent Payload

FieldValueMeaning
quaternionA quaternion.The amount of rotation relative to the initial state, including the rotation axis.

SpatialRotateEndEvent Payload

No extra payload

The SpatialRotateEndEvent object passed to the spatialrotateend callback has no extra properties.