Interface: InputSourceSnapshot
Defined in: source.ts:34
One live input source, engine-normalised and sampled once per update. Fields the provider cannot supply are simply absent - consumers gate on InputCapabilities, not on per-frame presence checks.
Ownership: a snapshot, and every tuple inside it, belongs to whoever
sample() handed it to. A provider builds fresh objects on each call and
never writes to a snapshot it has already returned, so a consumer may
keep one across frames - the interaction runtime's velocity tracker keeps
last frame's grip pose, a drag keeps its press-time ray - without copying.
A provider that pools objects must therefore copy on hand-over rather
than refill in place. The conformance suite checks this rule.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
angularVelocity? | Vec3Tuple | Grip angular velocity as a rotation axis scaled by radians per second. Present on the same terms as InputSourceSnapshot.linearVelocity. | source.ts:62 |
gripPose? | PoseTuple | Grip/palm pose. | source.ts:49 |
handedness | Handedness | - | source.ts:45 |
hapticsAvailable? | boolean | Haptics available on this source. | source.ts:70 |
id | string | Stable per session (e.g. "left-hand", "right-controller", "mouse"). Opaque to consumers. The format is NOT part of this contract, so never parse it - reading a side out of it with something like id.startsWith("left") breaks the moment a provider changes its naming. Read InputSourceSnapshot.handedness for the side instead. | source.ts:43 |
indexTip? | Vec3Tuple | Index fingertip world position (poke, hand-driven behaviours). | source.ts:51 |
kind | InputSourceKind | - | source.ts:44 |
linearVelocity? | Vec3Tuple | Grip linear velocity in metres per second, world space. Present when the provider supplies it natively or a consumer derived it from consecutive gripPose samples (see velocityBetween). | source.ts:57 |
nativeGrabbing? | boolean | True while the engine reports this source natively grabbing something. | source.ts:68 |
ray? | RayTuple | Pointing ray (targetRaySpace, hand ray, gaze ray or projected 2D pointer). | source.ts:47 |
select | number | Primary select action 0..1 (trigger, pinch strength, mouse button). | source.ts:64 |
squeeze | number | Secondary squeeze action 0..1 (grip button). | source.ts:66 |