WebVR

from Wikipedia, the free encyclopedia

WebVR is a programming interface (API) for accessing virtual reality devices such as head-mounted displays in web browsers using JavaScript . The standard was launched in 2014 by Mozilla and developed in cooperation with the Google Chrome team. Version 1.0 was released in 2016. Future versions will be developed under the name WebXR and expand the framework to augmented reality (AR).

Working principle

A navigator.getVRDisplayslist of all available VR devices can be requested using the function. These are represented by objects of the type VRDisplay.

The position of the user can be queried via these devices, the method getPose supplies the position, orientation, movement and other data about the user.

A canvas element is used for display , often in conjunction with WebGL . The two images for the left and right eye are drawn next to each other and requestPresentdisplayed there using the VR display device method. There it gives the user a three-dimensional image impression. The display should then be redrawn at regular intervals, preferably with the refresh rate of the device, and submitFrameupdated using the method.

In addition, other APIs are used, the gamepad API enables control via gamepads , the Web Audio API enables three-dimensional sound impressions to be generated.

For easy use there are libraries like A-Frame or three.js, which can take care of a large part of the display. There are also frameworks that allow export from Unity . Some engines also officially allow export to WebVR, including Blend4Web .

Browser support

There is initial experimental support in Mozilla Firefox and Google Chrome as well as in Samsung's browser for Samsung Gear VR . In some cases, an older version of the standard is still being implemented. There is stable support for the first time since Firefox 55.

Both Firefox and Chrome support Oculus Rift and HTC Vive in their desktop browsers , while smartphones can offer limited VR functions via Google Cardboard .

Individual evidence

  1. Casey Yee: Introducing the WebVR 1.0 API Proposal. In: Mozilla Hacks. March 1, 2016, accessed September 9, 2016 .
  2. ^ Andre Vrignaud, Lars Bergstrom: Bringing Mixed Reality to the Web. In: The Mozilla Blog. October 20, 2017, accessed December 12, 2017 .
  3. three.js
  4. Anthony Palma: Exporting An Indie Unity Game to WebVR. In: Mozilla Hacks. May 24, 2016, accessed September 9, 2016 .
  5. Release Notes - Blend4Web. v15.12. Retrieved September 9, 2016 .
  6. Is WebVR Ready? Retrieved September 9, 2016 .
  7. Sören Hentzschel: Firefox 55 receives support for virtual reality (VR). March 6, 2017. Retrieved March 7, 2017 .
  8. James Green: Virtual Reality: Getting Started with Mobile VR & WebVR. May 24, 2016, accessed September 9, 2016 .
  9. Sören Hentzschel: Support for HTC Vive lands in Firefox Nightly. September 5, 2016. Retrieved September 9, 2016 .

Web links