WebXR

{{short description|Experimental JavaScript API for augmented/virtual reality devices}}

{{Infobox technology standard

| title = WebXR

| long_name = WebXR Device API

| image = Webxr logo full.svg

| image_size =

| status = {{Indented plainlist|

  • Candidate Recommendation (CR)
  • Device API
  • Augmented Reality Module
  • Working Draft (WD)
  • Layers API
  • Hand Input Module
  • Gamepads Module
  • First Public Working Draft (FPWD)
  • Lighting Estimation API
  • Hit Test Module
  • DOM Overlays Module
  • Depth Sensing Module
  • Editor's Draft (ED)
  • Anchors Module}}

| year_started =

| first_published =

| version =

| version_date =

| preview =

| preview_date =

| organization = W3C

| committee = {{Plainlist|

  • Immersive Web Community Group
  • Immersive Web Working Group

}}

| series =

| editors = {{Plainlist|

  • Rik Cabanier
  • Manish Goregaokar
  • Brandon Jones
  • Nell Waliczek

}}

| authors =

| base_standards = {{Plainlist|

}}

| related_standards =

| domain = {{Plainlist|

}}

| license =

| copyright =

| website = {{URL|https://immersive-web.github.io/}}

}}

WebXR Device API is a Web application programming interface (API){{Cite web |title=Web APIs {{!}} MDN |url=https://developer.mozilla.org/en-US/docs/Web/API |access-date=2022-03-01 |website=developer.mozilla.org |language=en-US}}{{Cite web |title=Why You Should Be Paying Attention to WebXR |url=https://crosscomm.com/resources/blog/future-webxr |access-date=2022-03-01 |website=CrossComm |language=en}} that describes support for accessing augmented reality and virtual reality devices, such as the HTC Vive, Oculus Rift, Meta Quest, Google Cardboard, HoloLens, Apple Vision Pro, Android XR-based devices, Magic Leap or Open Source Virtual Reality (OSVR), in a web browser.{{cite web|url=https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API/Fundamentals|title=Fundamentals of WebXR|access-date=22 December 2021|work=MDN Web Docs}}{{Cite web |title=WebXR Device API |url=https://www.w3.org/TR/webxr/Overview.html |access-date=2022-03-01 |website=www.w3.org}} The WebXR Device API and related APIs{{Cite web |title=The Immersive Web Working Group/Community Group |url=https://immersive-web.github.io/ |access-date=2022-03-01 |website=immersive-web.github.io |language=en-US}} are standards defined by W3C groups, the Immersive Web Community Group{{Cite web |title=Immersive Web Community Group |url=https://www.w3.org/community/immersive-web/ |access-date=2022-03-01 |website=www.w3.org |date=22 March 2017 |language=en-US}} and Immersive Web Working Group.{{Cite web |title=Immersive Web Working Group |url=https://www.w3.org/groups/wg/immersive-web |access-date=2022-03-01 |website=www.w3.org}}{{Cite web |title=WebXR Device API - Web APIs {{!}} MDN |url=https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API |access-date=2022-03-01 |website=developer.mozilla.org |language=en-US}} While the Community Group works on the proposals in the incubation period, the Working Group defines the final web specifications to be implemented by the browsers.{{Citation |title=Immersive Web Community Group Proposals Repo |date=2022-02-21 |url=https://github.com/immersive-web/proposals |publisher=Immersive Web at W3C |access-date=2022-03-01}}{{Cite web |title=Community and Business Group Process {{!}} Community and Business Groups |url=https://www.w3.org/community/about/process/ |access-date=2022-03-01 |website=www.w3.org |language=en-US}}{{Cite web |title=Standards/Participating in a W3C Working Group - MozillaWiki |url=https://wiki.mozilla.org/Standards/Participating_in_a_W3C_Working_Group |access-date=2022-03-01 |website=wiki.mozilla.org}}

WebVR was an experimental Web API that was only capable of representing virtual reality and was superseded by WebXR.{{cite web|url=https://blog.mozilla.org/blog/2017/10/20/bringing-mixed-reality-web/|title=Bringing Mixed Reality to the Web – The Mozilla Blog|website=The Mozilla Blog|author-last=Vrignaud|author-first=Andre|date=October 20, 2017|access-date=December 23, 2021}}{{cite web|url=https://developers.google.com/web/updates/2018/05/welcome-to-immersive|title=Welcome to the immersive web|website=Google Developers|author-first=Joseph|author-last=Medley|date=May 2018|access-date=December 23, 2021}}{{Cite web|title = WebVR API|url = https://developer.mozilla.org/en-US/docs/Web/API/WebVR_API|website = MDN Web Docs|access-date = 2015-11-04}}

History

WebVR API was first conceived in spring 2014 by Vladimir Vukićević from Mozilla. The API's contributors include Brandon Jones(Google), Boris Smus and others from the Mozilla team.{{Cite web |date=2022-02-28 |title=WebVR Deprecated Specification |url=https://immersive-web.github.io/webvr/spec/1.1/ |website=W3C webvr}} On March 1, 2016, the Mozilla VR team and the Google Chrome team announced the version 1.0 release of the WebVR API proposal. The resulting API refactoring brought many improvements to WebVR.{{Cite web|url=https://hacks.mozilla.org/2016/03/introducing-the-webvr-1-0-api-proposal/|title=Introducing the WebVR 1.0 API Proposal|website=Mozilla Hacks|author-first=Casey|author-last=Yee|date=March 1, 2016|access-date=2021-12-23}}

The latest WebXR Device API Working Draft was last published in February 2022. The editors of the specification currently are from Google and Meta. Other members from Mozilla, Microsoft, Samsung Electronics and Apple, as well as various startups and invited experts have input in the future of the specification.{{Cite web |title=Immersive Web Working Group - Participants |url=https://www.w3.org/groups/wg/immersive-web/participants |access-date=2022-03-01 |website=www.w3.org}} All of the discussions of the specifications are public on GitHub.{{Cite web |title=Immersive Web at W3C |url=https://github.com/immersive-web |access-date=2022-03-01 |website=GitHub |language=en}}

Notable updates include enhanced AR capabilities, improved performance, and broader device support.{{Cite web |title=WebXR GitHub repository |url=https://github.com/immersive-web/webxr-samples |access-date=2024-08-02 |website=github.com}} The ongoing efforts focus on standardizing and advancing the WebXR API, providing developers with the necessary tools and resources to create immersive web experiences.{{Cite web |title=W3C WebXR Device API |url=https://www.w3.org/TR/webxr/ |access-date=2024-08-02 |website=w3.org}}

In 2018, the WebXR Device API superseded WebVR, being designed for both augmented reality, virtual reality devices and the possible future realities and devices. WebVR was implemented in Firefox and Chromium-based browsers before being deprecated and removed. On September 24, 2018, the Immersive Web Working Group became official.{{Cite web|url=https://www.w3.org/2018/09/immersive-web-wg-charter.html|title=Immersive Web Working Group Charter|access-date=December 23, 2021}}

Design

The WebXR Device API exposes a few new interfaces (such as XRView,{{Cite web |title=WebXR Device API |url=https://immersive-web.github.io/webxr/#xrview-interface |access-date=2022-03-01 |website=immersive-web.github.io}} XRPose{{Cite web |title=WebXR Device API |url=https://immersive-web.github.io/webxr/#xrpose-interface |access-date=2022-03-01 |website=immersive-web.github.io}}) that allow web applications to present content in virtual reality and augmented reality, by using WebGL with the necessary camera settings and device interactions (such as controllers or point of view).

Support

WebXR Device API{{cite web |url=https://www.w3.org/TR/webxr/ |title=WebXR Device API |access-date=2024-02-17 |website=W3C}} (Candidate Recommendation Draft) is currently supported in the stable versions of Edge and Chrome 79+, Chrome for Android 79+, Opera 66+, Opera Mobile 64+, Samsung Internet 12+, and Oculus Browser.{{Cite web |title="webxr" {{!}} Can I use... Support tables for HTML5, CSS3, etc |url=https://caniuse.com/?search=webxr |access-date=2022-03-01 |website=caniuse.com}}{{Cite web |title=Introduction to Oculus Browser {{!}} Oculus Developers |url=https://developer.oculus.com/documentation/web/browser-intro/ |access-date=2022-03-01 |website=developer.oculus.com}} WebXR is supported in Safari for visionOS on the Apple Vision Pro mixed reality headset.{{Cite web |title=Meet Safari for spatial computing |url=https://developer.apple.com/videos/play/wwdc2023/10279/ |access-date=2024-02-17 |website=developer.apple.com}} Android XR also supports WebXR.{{citation needed|date=December 2024}}

Similar technologies

Although WebXR is unique as an API, it has similarities to native APIs in the same space such as OpenXR, ARCore, and ARKit.

See also

References

{{Reflist}}