Class: VelocityTracker
Defined in: packages/webxr-interactions/src/velocity-tracker.ts:46
Constructors
Constructor
new VelocityTracker(options?: VelocityTrackerOptions): VelocityTracker;
Defined in: packages/webxr-interactions/src/velocity-tracker.ts:50
Parameters
| Parameter | Type |
|---|---|
options | VelocityTrackerOptions |
Returns
VelocityTracker
Methods
reset()
reset(): void;
Defined in: packages/webxr-interactions/src/velocity-tracker.ts:116
Forget every tracked source (session end, teleport, scene change).
Returns
void
update()
update(sources: readonly InputSourceSnapshot[], dt: number): readonly InputSourceSnapshot[];
Defined in: packages/webxr-interactions/src/velocity-tracker.ts:60
Measure this frame's sources. Returns the same sources, with velocity added to those the provider left without it. Sources with no grip pose pass through untouched and hold no state.
Parameters
| Parameter | Type |
|---|---|
sources | readonly InputSourceSnapshot[] |
dt | number |
Returns
readonly InputSourceSnapshot[]