Skip to main content

Class: IWSDKInputProvider

Defined in: packages/iwsdk-interactions/src/provider.ts:94

Implements​

  • InputProvider

Constructors​

Constructor​

new IWSDKInputProvider(world: World, options?: IWSDKProviderOptions): IWSDKInputProvider;

Defined in: packages/iwsdk-interactions/src/provider.ts:120

Parameters​

ParameterType
worldWorld
optionsIWSDKProviderOptions

Returns​

IWSDKInputProvider

Methods​

dispose()​

dispose(): void;

Defined in: packages/iwsdk-interactions/src/provider.ts:386

Returns​

void


getCapabilities()​

getCapabilities(): InputCapabilities;

Defined in: packages/iwsdk-interactions/src/provider.ts:185

Current negotiated capabilities (derived from the LIVE session).

Returns​

InputCapabilities

Implementation of​

InputProvider.getCapabilities

getHeadPose()​

getHeadPose(): HeadPose;

Defined in: packages/iwsdk-interactions/src/provider.ts:358

Head pose, when capabilities.headPose is true.

Returns​

HeadPose

Implementation of​

InputProvider.getHeadPose

onCapabilitiesChanged()​

onCapabilitiesChanged(listener: (c: InputCapabilities) => void): Unsubscribe;

Defined in: packages/iwsdk-interactions/src/provider.ts:189

Capability changes: session start/end, hands⇄controllers swap.

Parameters​

ParameterType
listener(c: InputCapabilities) => void

Returns​

Unsubscribe

Implementation of​

InputProvider.onCapabilitiesChanged

onSourcesChanged()​

onSourcesChanged(listener: () => void): Unsubscribe;

Defined in: packages/iwsdk-interactions/src/provider.ts:194

Source connect/disconnect.

Parameters​

ParameterType
listener() => void

Returns​

Unsubscribe

Implementation of​

InputProvider.onSourcesChanged

pulse()​

pulse(
sourceId: string,
intensity: number,
durationMs: number
): boolean;

Defined in: packages/iwsdk-interactions/src/provider.ts:369

Fire a haptic pulse on a source, when capabilities.haptics is true and the source reports hapticsAvailable. Returns false when the pulse could not be delivered. Intensity 0..1, duration in ms.

Parameters​

ParameterType
sourceIdstring
intensitynumber
durationMsnumber

Returns​

boolean

Implementation of​

InputProvider.pulse

sample()​

sample(): readonly InputSourceSnapshot[];

Defined in: packages/iwsdk-interactions/src/provider.ts:213

Snapshot every live source. Called once per update tick.

The snapshots returned are the caller's to keep: the provider does not write to them after returning them (see InputSourceSnapshot).

Returns​

readonly InputSourceSnapshot[]

Implementation of​

InputProvider.sample

sampleHints()​

sampleHints(): readonly InputHitHint[];

Defined in: packages/iwsdk-interactions/src/provider.ts:204

Pre-resolved targeting hints for this frame (optional - providers with their own targeting pipelines only). Consumed alongside sample.

Returns​

readonly InputHitHint[]

Implementation of​

InputProvider.sampleHints

setHints()​

setHints(hints: InputHitHint[]): void;

Defined in: packages/iwsdk-interactions/src/provider.ts:200

Bridge-system input: this frame's pre-resolved tag hints.

Parameters​

ParameterType
hintsInputHitHint[]

Returns​

void


setNativeGrabbing()​

setNativeGrabbing(side: Side, grabbing: boolean): void;

Defined in: packages/iwsdk-interactions/src/provider.ts:209

Bridge-system input: a side is currently native-grabbing.

Parameters​

ParameterType
sideSide
grabbingboolean

Returns​

void


setPresenceModality()​

setPresenceModality(mode: PresenceModality): boolean;

Defined in: packages/iwsdk-interactions/src/provider.ts:307

Choose which family of visuals is shown. "hands" and "controllers" force one family and hide the other; "auto" follows the engine's own modality (hand visuals while hand tracking is live). A repeat of the current modality writes nothing.

Parameters​

ParameterType
modePresenceModality

Returns​

boolean

Implementation of​

InputProvider.setPresenceModality

setPresenceVisible()​

setPresenceVisible(target: Handedness | "all", visible: boolean): boolean;

Defined in: packages/iwsdk-interactions/src/provider.ts:293

Show or hide this session's controller/hand visuals. Returns false when IWSDK has published no visual adapters, which is the case outside a session. The request is remembered and re-applied on every sample, so a call made before the adapters exist still lands.

"none" targets no side - the handedness value that has no visual here - so the call reports availability without changing anything.

A call that asks for what is already applied writes nothing, so an app that pushes presence from a state subscription costs nothing on the state changes that did not touch presence.

Parameters​

ParameterType
targetHandedness | "all"
visibleboolean

Returns​

boolean

Implementation of​

InputProvider.setPresenceVisible