Function: deriveCapabilities()
function deriveCapabilities(session:
| CapabilitySessionLike
| null
| undefined): AdapterCapabilities;
Defined in: capabilities.ts:82
Derive the capability flags from a live session.
| Flag | Derived from |
|---|---|
immersive | a session exists |
handTracking | "hand-tracking" in enabledFeatures, or any input source carrying a hand |
planeDetection | "plane-detection" in enabledFeatures |
passthrough | environmentBlendMode is present and is not "opaque" |
environmentBlendMode | environmentBlendMode 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
| Parameter | Type |
|---|---|
session | | CapabilitySessionLike | null | undefined |