API

Interface XrFeatureSpec

An opt-in XR feature. Implementations are free functions returning this spec (e.g. pointerSelection(options)), so importing one never drags in the others.

interface XrFeatureSpec {
    sessionFeatures?: readonly string[];
    create(ctx: XrSessionContext): XrFeatureHandle;
}
Index
sessionFeatures?: readonly string[]

Native WebXR session feature descriptors this feature requires, requested as optional features so a session still starts when the device lacks them.