They use a very minimal libary to show how one can make use of the WebXR Device API directly.
These are samples from the WebXR Samples from the Immersive Web Working Group For standalone VR Headsets:Įnable VR by rendering the scene using the platforms VR capabilities.Ī demo of VR and AR with the WebXR Device API, embedded with an iframe, for iframes allow='xr-spatial-tracking' is required. For Desktops:ĭesktop computers can make use of tethered VR hardware such as the Oculus Rift or HTC Vive to display the VR scene For standalone AR Headsets:Įnable AR by using the platforms AR capabilities to render the WebGL scene immersively onto the users environment. You can read more about the goals of this standardisation effort by reading the WebXR Explainer.Įnable VR by providing pose information and allowing the WebGL scene to be rendered side by side to be placed in a headset like the CardboardĮnable AR by using the platforms AR capabilities such as ARCore to render the WebGL scene onto the users environment like a magic window. It allows you develop and host VR and AR experiences on the web. The WebXR Device API provides access to input (pose information from headset and controllers) and output (hardware display) capabilities commonly associated with Virtual Reality (VR) and Augmented Reality (AR) devices.