Skip to main content

Class: VelocityTracker

Defined in: velocity-tracker.ts:46

Constructors​

Constructor​

new VelocityTracker(options?: VelocityTrackerOptions): VelocityTracker;

Defined in: velocity-tracker.ts:50

Parameters​

ParameterType
optionsVelocityTrackerOptions

Returns​

VelocityTracker

Methods​

reset()​

reset(): void;

Defined in: 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: 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​

ParameterType
sourcesreadonly InputSourceSnapshot[]
dtnumber

Returns​

readonly InputSourceSnapshot[]