Home

Awesome

WebXR emulator extension

WebXR emulator extension is a browser extension which helps your WebXR content creation. It enables you to responsively run WebXR applications on your desktop browser without the need of any XR devices.

Blog post / YouTube / Slides (in Japanese)

Screenshot

Features

<!-- - [Virtual controller (WIP)](./screenshots/virtual-controller.gif) -->

Status

Browsers

This extension is built on top of WebExtensions API. It works on Firefox, Chrome, and other browsers supporting the API.

How to use

  1. Go to the addon stores to install (Firefox, Chrome)

  2. Go to WebXR application page (for example WebXR examples). You will notice that the application detects that you have a XR device (emulated) and it will let you enter the immersive (VR、AR) mode.

  3. Open "WebXR" tab in the browser developer tool (Firefox, Chrome) to controll the emulated devices. You can move the headset and controllers, and trigger the controller buttons. You will see their transforms reflected in the WebXR application.

WebXR tab

How to control the emulated devices

By clicking a device in the devtool panel, you can select gizmo mode of the device. By dragging a gizmo, you can rotate or translate the device.

Configuration

You can configure some settings from the top in the WebXR tab.

Device

You can switch emulated device. The difference between devices is just degrees of freedom and the number of controllers for now.

DeviceDescription
NoneNo device
Google Cardboard3dof headset and no controller
HTC Vive6dof headset and two 6dof controllers
Oculus Go3dof headset and 3dof controller
Oculus Quest6dof headset and two 6dof controllers
Samsung Gear VR3dof headset and 3dof controller

Stereo Effect

You can enable/disable Stereo Effect which renders two views.

AR mode

WebXR emulator extension also supports AR. You can test WebXR AR application on an emulated device in a virtual room, on your desktop browser.

Screenshot AR

How to use

  1. Download and manually install the newest extension from dev branch

  2. Select "Samsung Galaxy S8+ (AR)" device from the device list on the top of WebXR devtool panel

  3. Go to WebXR application page, for example Three.js WebXR AR examples

  4. You will notice that the application detects that you have a XR device (emulated) and it will let you enter the immersive (AR) mode

  5. AR application starts on the emulated device in a virtual room

How to control

You can control the camera (view) and tablet in the application window.

user actioncamera/tablet control
Left mouse button dragCamera rotation
Right mouse button dragCamera pan
Middle mouse button drag or wheelMove camera forward/backward
Mouse click on the tabletChange the tablet gizmo mode
Gizmo on the tabletTablet rotation/translation
Right mouse button click on the tablet screentouch input

How to control in the devtool panel

You can still control the camera and tablet in the devtool panel similar to VR.

Devtool panelAR virtual room
CameraView
Right controllerFinger (not shown in the application window)
Left controllerTablet

For development

How to install the newest version

If you want to develop or debug this extension or if you want to use the under development (not released yet) version, download this repositoy and install the extension into your browser as developer mode. (Firefox, Chrome)

How to build polyfill/webxr-polyfill.js

polyfill/webxr-polyfill.js is created with npm.

$ git clone https://github.com/MozillaReality/WebXR-emulator-extension.git
$ cd WebXR-emulator-extension
$ npm install
$ npm run build

Note

WebXR examples

Kudos

Thanks to WebVR-Extension project, it was a true inspiration for us when building this one.

License

Mozilla Public License Version 2.0