The World Wide Web Consortium (W3C) recently published draft specifications for WebXR. The WebXR Device API seeks to provide “the interfaces necessary to enable developers to build compelling, comfortable, and safe immersive applications on the web across a wide variety of hardware form factors”.
WebXR is an API that allows developers to create XR experiences; a term which encompasses Augmented Reality (AR), Virtual Reality(VR) and newly-developed immersive technologies. The Immersive Web Community Group, the community behind the draft specification explains:
Since we don’t want to be limited to just one facet of VR or AR (or anything in between) we use “X”, not as part of an acronym but as an algebraic variable of sorts to indicate “Your Reality Here”. We’ve also heard it called “Extended Reality” and “Cross Reality”, which seem fine too, but really the X is whatever you want it to be!
WebVR was first announced in 2016, with the goal to bring VR content to the web, by means of a wide range of headsets. According to the Immersive Web Community Group, the WebXR Device API has two new goals with respect to WebVR:
- To support a wider variety of user inputs, such as voice and gestures, giving users options for navigating and interacting in virtual spaces
- To establish a commontechnical foundation for development of AR experiences, letting creators integrate real-world media with contextual overlays that elevate the experience, on any API-supporting devices.
The current version of the API specifies key features, allowing to:
- Detect available VR/AR devices.
- Query the devices capabilities.
- Poll the device’s position and orientation.
- Display imagery on the device at the appropriate frame rate.
The WebXR draft specification additionally notes:
The WebXR Device API’s new features give rise to unique privacy, security, and comfort risks that user agents must take steps to mitigate, [such as gaze tracking, or finger printing].
While WebXR is still in its early stages, it is already supported by both Mozilla and Chrome — with caveats.
A list of supported devices include (but is not limited to):
- ARCore-compatible devices
- Google Daydream
- HTC Vive
- Magic Leap One
- Microsoft Hololens
- Oculus Rift
- Samsung Gear VR
- Windows Mixed Reality headsets
Feedback and comments on the WebXR specification are welcome through Github issues. Discussions may also be found in the firstname.lastname@example.org archives.