BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News WebXR Arrives in Chrome 79

WebXR Arrives in Chrome 79

WebXR, the in-progress standard for virtual and augmented reality on the web, is now available in Chrome 79. After preliminary work on WebVR was superseded by WebXR, Chrome becomes the first production browser release supporting portions of the new standard.

Current Chrome support of WebXR focuses on the virtual reality portion of the WebXR standard, with the augmented reality portions of the standard remaining a work in progress. The GamePad API was also updated in Chrome to support controls within VR.

The Chrome team describes WebXR as the foundation for the immersive web, providing viable experiences using web technologies for games, 360° videos, traditional 2D or 3D videos presented in immersive surroundings, home buying, product viewing, art, and more.

As is common with other APIs like audio and video playing, a website or web app cannot leverage the WebXR API until the user interacts with the user interface. There are many key concepts to learn to leverage WebXR:

  • WebXR sessions: Using feature detection, developers listen for an immersive-vr session and then create an XR-compatible WebGL canvas context.
  • WebGL canvas: Drawing is done to this canvas via WebGL APIs, with various reference spaces available to describe the perspective of WebGL drawings.
  • Frames: Frame loops and requestAnimationFrame get leveraged to animate over the canvas context to provide an immersive experience.
  • Poses: Poses provide position and orientation of a thing in immersive space, to understand where the viewer is within the WebXR space.
  • Views: XRView represents a full or partial display with information to render content positioned for the device and the viewer.

WebXR support in other browsers is under active development. Firefox retains support for the earlier WebVR proposal while working on efforts to support WebXR. Other Chromium-based browsers, including Edge, are expected to provide WebXR support soon.

Virtual and augmented reality is a substantial advancement for the web ecosystem, and getting support for WebXR is a high priority for all browser vendors. Support for the virtual reality portion of WebXR is expected to arrive in all evergreen browsers in 2020.

Rate this Article

Adoption
Style

BT