Jump to content

WebVR

From VR & AR Wiki

Note: WebVR is obsolete and has been replaced by WebXR. New projects should use the WebXR Device API instead.

WebVR
Information
Type Virtual reality
Creator Vladimir Vukićević
Developer Mozilla, Google
Operating System Windows, Mac, Android
Browser Firefox, Chrome, Samsung Internet
Release Date March 1, 2016 (version 1.0 proposal)
Website http://mozvr.com/

WebVR was an experimental JavaScript API that let web pages detect virtual reality headsets, read their pose and input, and render stereoscopic 3D content to them directly from the browser. It made it possible to open a VR experience by visiting a URL, with no separate app to install. WebVR was never ratified as a web standard. It is now deprecated and has been superseded by the WebXR Device API, which covers both VR and augmented reality.[1][2]

What it did

WebVR gave web content a way to talk to VR hardware. A page could query the list of connected VR displays, read the headset's position and orientation each frame, and submit a left-eye and right-eye image for the browser to send to the headset. Pages handled the actual 3D drawing with WebGL, the JavaScript API for rendering hardware-accelerated graphics in the browser, and most developers used a higher-level framework on top of it rather than calling WebVR directly.[1]

Because the experience ran inside an ordinary web page, there was nothing to download or install. A user could click a link and be inside a VR scene, and the same page could fall back to a flat view on a phone or desktop without a headset. That low barrier to entry was the main appeal of putting VR on the web.

History

The WebVR API was first conceived in spring 2014 by Vladimir Vukićević, an engineer at Mozilla. Early contributors included Brandon Jones of Google and Boris Smus of Mozilla, so the work was a joint effort between the two browser makers from the start.[2][3]

On March 1, 2016, the Mozilla VR team and the Google Chrome team jointly announced the version 1.0 release of the WebVR API proposal. This was the milestone that turned scattered experiments into a more stable interface that frameworks and demos could build against.[2]

In practice WebVR was implemented and enabled by default in only a few browsers and supported a small number of devices. Firefox shipped it, Chromium-based browsers carried experimental implementations, and mobile browsers such as Samsung Internet and Oculus-branded browsers supported it for phone-based and standalone headsets. Mozilla published its early VR builds and demos under the MozVR banner, and Google ran a Chrome Experiments site for Google Cardboard.[1][2]

Frameworks built on WebVR

Most people never wrote raw WebVR calls. They used a framework that handled the boilerplate of setting up a headset session and a render loop.

Framework Built on Notes
A-Frame Three.js Open-source framework from the Mozilla VR team, first released December 16, 2015. It lets developers build VR scenes with HTML-style markup and an entity-component-system structure, which made it the easiest entry point for web developers.[4]
Three.js WebGL General-purpose 3D library that A-Frame and React VR were built on. Experienced JavaScript developers used it directly for finer control over the scene.
React VR / React 360 Three.js Used React, the JavaScript library from Facebook, to build VR sites and 360 experiences with a component model.
Babylon.js WebGL Game-focused 3D engine. Version 3.0 added support for the WebVR 1.1 specification and brought features like collision detection.
WebVR Boilerplate Three.js Starter template for web VR that targeted both Google Cardboard and the Oculus Rift.

A-Frame in particular became the public face of WebVR, and its later move to WebXR tracked the same shift the rest of the ecosystem made.

Deprecation and replacement by WebXR

WebVR was always experimental and never finished the standards process. It was designed only for virtual reality, which left no clean path for augmented reality on the same hardware. The browser vendors who had shipped WebVR agreed to replace it with a single successor.[1]

That successor is the WebXR Device API. In 2018 it superseded WebVR, and it was designed for both augmented reality and virtual reality devices rather than VR alone. The work moved into the W3C Immersive Web Working Group, which became official on September 24, 2018. WebXR also has a cleaner design: a single session model covers both VR and AR, input is handled in a more consistent way, and the API was written to fit the W3C standards track that WebVR never completed.[2][5]

WebXR reached a production browser when Chrome 79 enabled the WebXR Device API by default. Chrome 79 was released on December 10, 2019, which made Chrome the first stable browser to ship the new API to everyone instead of hiding it behind a flag.[6][7]

Once WebXR shipped, WebVR was wound down. Chrome deprecated it and kept only a short temporary origin trial for the older WebVR 1.1 interface in Chrome 80, released in February 2020, so existing content had time to migrate. Firefox later disabled WebVR by default in favor of WebXR. Today WebVR has been removed from the browsers that once carried it, and the framework ecosystem moved with it: A-Frame released version 1.0.0 on December 16, 2019 specifically to support WebXR.[8][9][10]

The practical takeaway is simple: WebVR is obsolete, and developers should use the WebXR Device API for any new VR or AR work on the web.

See also

References