All Oculus Quest developers MUST PASS the concept review prior to gaining publishing access to the Quest Store and additional resources. Submit a concept document for review as early in your Quest application development cycle as possible. For additional information and context, please see Submitting Your App to the Oculus Quest Store.
Oculus Browser 7.0 and later support WebXR by default, as this API has now stabilized. WebXR replaces the WebVR API, which although not a standard, was adopted by many browsers. As Oculus Browser and other browsers release with WebXR enabled, apps built against WebVR may stop working because they have code that supported earlier versions of WebXR, which is not compatible with the current WebXR specification. This document describes some compatibility issues that have been identified, and the steps you can take to help ensure your web apps continue to work with WebXR.
Some older versions of popular VR web development libraries have compatibility issues. Browser experiences that may not function as expected with WebXR include:
There may be other experiences that have compatibility issues that have not been identified.
To see if your VR web experiences have compatibility issues, you can test your web experiences with both WebXR and WebVR enabled.
For Oculus Browser or Google Chrome, go to chrome://flags and enable WebVR and WebXR (in Oculus Browser 7.0 this is the default setting). Other modern browsers should have similar settings.
Next, load your experience and try to enter VR. If your experience behaves as you expect, then you likely do not need to make any changes. You should try your experience in several browsers.
If it fails, the results may differ depending on the browser you are using. A failure you may see if you are using an older version of three.js is:
For the test described, WebXR support is detected by the framework and an Enter XR button may appear, but when you click it, you receive an exception as described by issue #2.
In general to fix compatibility issues, you can check for a newer version of any frameworks or tools that you are using in your web app, and whether the newer versions are compatible with WebXR. If so, migrate to the newer version.
If there is no newer version, or the newer version does not fully support WebXR, you may be able to modify open-source code to work in the latest browsers.
For the three.js compatibility problem described in the previous section, you can do one of three things:
WebXRManager.js and WebVR.js files. This is a more complex work-around that requires knowledge about WebXR and three.js internal logic and is not described in this document.The following is an example of how you could remove the WebXR detection logic from three.js for a custom version (you have already cloned and modified), or how to create a custom version and modify.
The following steps apply if you are building a customized version of three.js yourself or you are using pre-built three.js. If you are using npm/yarn and the three.js module is downloaded from the original repo for you at build time, the following steps won’t work. In this case see “Customize three.js and remove WebXR dectection logic” section that follows.
To disable the obsolete WebXRManager in older three.js versions:
src/renders/WebGLRenderer.jsfunction WebGLRenderer( in the file.Then:
Search for WebXRManager, and you should find a line like this:
var vr = ( 'xr' in navigator ) ? new WebXRManager( _this ) : new WebVRManager( _this );
Or in newer versions, find a line like the following:
var vr = ( typeof navigator !== 'undefined' && 'xr' in navigator && 'sessionSupported' in navigator.xr ) ? new WebXRManager( _this, _gl ) : new WebVRManager( _this );
Replace these lines with:
var vr = new WebVRManager( _this );
WebVR.js file in the examples/js/vr directory; alternatively, if not a part of the prebuilt three.js module, this file (or parts of it) could be copied into your project’s directory.if ( 'xr' in navigator.if (‘xr’... statement up to the line ‘else if ( 'getVRDisplays' in navigator ) {‘. else if ( 'getVRDisplays' in navigator ) {
to:
if ( 'getVRDisplays' in navigator){
If your app is built using npm or yarn and if the three.js was not customized by you, meaning npm/yarn will download the three.js module from the original repository, you will need to create a custom version that you can modify. The high-level steps for this are:
$ npm install $ npm run build-closure
or for yarn:
$ yarn install $ yarn run build-closure
build/three.* files).1234d3a7a6d7f7399bafe7df681453d17d4c2c3c.package.json / yarn.lock files and modify them to refer to the version of three.js with the hash from the previous step.node_modules directory and repeat step 3, building and running three.js Note, sometimes it may require to delete the cache for npm/yarn, usually located in .npm or .yarn sub-directories of your home directory.node_modules/three contains the proper version of three.js with the modified logic.