Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / XrCapabilities

Type Alias: XrCapabilities ​

ts
type XrCapabilities = {
  mode: "immersive-vr" | "immersive-ar" | "inline";
  handTracking: boolean;
  planeDetection: boolean;
  meshDetection: boolean;
  depthSensing: boolean;
  anchors: boolean;
  hitTest: boolean;
  enabledFeatures: string[];
};

Defined in: xr/types.ts:86

What the ACTIVE session actually granted us.

Always derived from XRSession.enabledFeatures — never from the device name. A feature being requested is not a promise it was granted, and support varies sharply per platform (e.g. Vision Pro grants no immersive-ar at all today).

Properties ​

PropertyTypeDescriptionDefined in
mode"immersive-vr" | "immersive-ar" | "inline"The session's mode. immersive-ar implies passthrough / mixed reality.xr/types.ts:88
handTrackingbooleanTracked-hand joint data is available.xr/types.ts:90
planeDetectionbooleanReal-world plane detection (incubating; effectively Quest-only today).xr/types.ts:92
meshDetectionbooleanReal-world mesh detection (draft spec; Quest-only today).xr/types.ts:94
depthSensingbooleanPer-frame depth buffer (Android XR stereo, Quest experimental).xr/types.ts:96
anchorsbooleanSpatial anchors.xr/types.ts:98
hitTestbooleanRay-against-real-world hit testing.xr/types.ts:100
enabledFeaturesstring[]Everything the UA reported, verbatim, for diagnostics.xr/types.ts:102