Skip to main content

Function: deriveCapabilities()

function deriveCapabilities(session:
| CapabilitySessionLike
| null
| undefined): AdapterCapabilities;

Defined in: capabilities.ts:82

Derive the capability flags from a live session.

FlagDerived from
immersivea session exists
handTracking"hand-tracking" in enabledFeatures, or any input source carrying a hand
planeDetection"plane-detection" in enabledFeatures
passthroughenvironmentBlendMode is present and is not "opaque"
environmentBlendModeenvironmentBlendMode where WebXR defines it, otherwise null

With no session the result is DEFAULT_CAPABILITIES: every flag false and the blend mode null, so a gating service behaves conservatively before the player enters XR.

Parameters

ParameterType
session| CapabilitySessionLike | null | undefined

Returns

AdapterCapabilities