/** * Wraps a React component class/function in a higher-order component which enables support * for WebXR. The wrapper handles querying the browser for supported XR session types, * initiating a supported XR session, and upgrading any descendant `Canvas3D` components * with support for rendering XR stereo views and handling XR input controllers. * * * * @param {class|function} ReactClass * @param {object} options * @param {React.Component} options.xrLauncherRenderer - The React component to use for * rendering the launcher button. Defaults to a basic launcher button implementation. * @param {string[]} options.sessionModes - The XRSessionMode(s) supported by this particular scene. * Assumes an 'immersive-vr' experience only by default. Authors can add 'inline' as a * fallback, or force 'inline' only. * TODO: allow secondary mode to be chosen by the user, rather than just as a fallback? * @param {string[]} options.referenceSpaces - The XRReferenceSpaceType(s) supported by this particular scene. * By default a floor-relative space is required, preferring 'bounded-floor', falling * back to 'local-floor', and failing session initialization if neither is available or * permitted by the user. Authors can change this list to support other reference space * types as fallbacks. All but the final will be used as `optionalFeatures`, and the final * will be used for `requiredFeatures`. * TODO: allow secondary spaces to be chosen by the user, rather than just as a fallback? * TODO: allow different spaces to be specified for immersive-vr vs. local modes? * @param {number|string} options.framebufferScaleFactor - Scaling factor for the XR framebuffer. * A number is used directly as the WebGLLayer's `framebufferScaleFactor` parameter. The * string "native" uses the device's native resolution. A string containing "native" and * a number, e.g. "0.5 native", uses the device's native resolution multiplied by that * number. Defaults to `1` per the WebXR spec. * TODO: allow 'auto' adaptive scaling to maintain frame rate * TODO: allow changing this value on the fly * @return {class} */ export function ReactXRAware(ReactClass: class | Function, options: { xrLauncherRenderer: React.Component; sessionModes: string[]; referenceSpaces: string[]; framebufferScaleFactor: number | string; }): class; export namespace XRAwarePropTypes { let xrSupported: any; let xrSupportedSessionModes: any; let xrSession: any; let xrSessionMode: any; let xrReferenceSpace: any; let xrReferenceSpaceType: any; let xrLauncher: any; } //# sourceMappingURL=XRAware.d.ts.map