Jump to content

WebXR: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
expand
Replace Unity and Blender with OpenXR, ARCore, and ARKit as similar technologies. They are much better analogs.
(32 intermediate revisions by 22 users not shown)
Line 1: Line 1:
{{short description|Experimental JavaScript API for augumented/virtual reality devices}}
{{short description|Experimental JavaScript API for augmented/virtual reality devices}}
{{primary sources|date=August 2017}}
{{Infobox technology standard
{{Infobox technology standard
| title = WebXR
| title = WebXR
| long_name =
| long_name = WebXR Device API
| image =
| image =
| image_size =
| image_size =
| alt =
| alt = WebXR Device API
| caption =
| caption = WebXR Device API
| abbreviation =
| abbreviation = WebXR
| status = {{Indented plainlist|
| status = {{Indented plainlist|
* [[World Wide Web Consortium#Working draft (WD)|'''Working Draft''']] (WD)
* [[World Wide Web Consortium#Candidate recommendation (CR)|'''Candidate Recommendation''']] (CR)
** Device API
** Augmented Reality Module
** Augmented Reality Module
* [[World Wide Web Consortium#Working draft (WD)|'''Working Draft''']] (WD)
** Layers API
** Layers API
** Device API
** Hand Input Module
** Hand Input Module
** Gamepads Module
** Gamepads Module
Line 22: Line 22:
** Depth Sensing Module
** Depth Sensing Module
* '''Editor's Draft''' (ED)
* '''Editor's Draft''' (ED)
** Anchors Module
** Anchors Module}}
| year_started = <!-- {{Start date|YYYY|MM|DD|df=y}} -->
}}
| year_started = <!-- {{Start date|YYYY|MM|DD|df=y}} -->
| first_published = <!-- {{Start date|YYYY|MM|DD|df=y}} -->
| version =
| first_published = <!-- {{Start date|YYYY|MM|DD|df=y}} -->
| version =
| version_date =
| version_date =
| preview =
| preview =
| preview_date =
| organization = [[World Wide Web Consortium|W3C]]
| preview_date =
| committee = {{Plainlist|
| organization = [[World Wide Web Consortium|W3C]]
| committee = {{Plainlist|
* Immersive Web Community Group
* Immersive Web Community Group
* Immersive Web Working Group
* Immersive Web Working Group
}}
}}
| series =
| series =
| editors = {{Plainlist|
| editors = {{Plainlist|
* Piotr Bialecki
* Rik Cabanier
* Rik Cabanier
* Manish Goregaokar
* Manish Goregaokar
* Brandon Jones
* Brandon Jones
* Nell Waliczek
* Nell Waliczek
* Klaus Weidner
}}
}}
| authors =
| authors =
| base_standards = {{Plainlist|
| base_standards = {{Plainlist|
* [[Document Object Model|HTML DOM]]
* [[Document Object Model|HTML DOM]]
* [[ECMAScript]] (ECMA-262)
* [[ECMAScript]] (ECMA-262)
Line 52: Line 49:
}}
}}
| related_standards =
| related_standards =
| domain = {{Plainlist|
| domain = {{Plainlist|
* [[JavaScript]] [[API]]
* [[World Wide Web|Web]] [[API]]
* [[Augumented reality]]
* [[Augmented reality]]
* [[Virtual reality]]
* [[Virtual reality]]
}}
}}
| license =
| license =
| copyright =
| copyright =
| website = {{URL|https://immersive-web.github.io/}}
| website = {{URL|https://immersive-web.github.io/}}
}}
}}


'''WebXR''' Device API is a Web [[application programming interface]] (API)<ref>{{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}}</ref><ref>{{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}}</ref> that describes support for accessing [[augmented reality]] and [[virtual reality headset|virtual reality devices]], such as the [[HTC Vive]], [[Oculus Rift]], [[Oculus Quest]], [[Google Cardboard]], [[Microsoft HoloLens|HoloLens]], [[Apple Vision Pro]], [[Magic Leap]] or [[Open Source Virtual Reality]] (OSVR), in a [[web browser]].<ref name="fundamentals">{{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]]}}</ref><ref name=":0">{{Cite web |title=WebXR Device API |url=https://www.w3.org/TR/webxr/Overview.html |access-date=2022-03-01 |website=www.w3.org}}</ref> The WebXR Device API and related APIs<ref>{{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}}</ref> are standards defined by [[W3C]] groups, the Immersive Web Community Group<ref>{{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}}</ref> and Immersive Web Working Group.<ref>{{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}}</ref><ref>{{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}}</ref> 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.<ref>{{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}}</ref><ref>{{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}}</ref><ref>{{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}}</ref>


'''WebVR''' was an experimental Web API that was only capable of representing virtual reality and was superseded by WebXR.<ref name="blog.mozilla.org">{{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}}</ref><ref name="developers.google.com">{{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}}</ref><ref>{{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}}</ref>
'''WebXR''' is a [[JavaScript]] [[application programming interface]] (API) that enables applications to interact with [[augmented reality]] and [[virtual reality headset|virtual reality devices]], such as the [[HTC Vive]], [[Oculus Rift]], [[Google Cardboard]] or [[Open Source Virtual Reality]] (OSVR), in a [[web browser]].<ref name="fundamentals">{{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]]}}</ref>. The WebXR API is specified by a family of [[W3C]] specifications, and lead by the two groups in collaboration, the Immersive Web Community Group and Immersive Web Working Group.

'''WebVR''' was an experimental JavaScript API that was only capable of representing virtual reality and was superseded by WebXR.<ref name="blog.mozilla.org">{{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}}</ref><ref name="developers.google.com">{{cite web|url=https://developers.google.com/web/updates/2018/05/welcome-to-immersive|title=Welcome to the immersive web - Web - Google Developers|website=Google Developers}}</ref><ref>{{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}}</ref>

This API is designed with the following goals in mind:<ref>{{Cite web|url=https://github.com/w3c/webvr/blob/master/explainer.md|title=w3c/webvr|website=GitHub|language=en|access-date=2017-04-08}}</ref>
* Detect available virtual reality devices.
* Query the device's capabilities.
* Poll the device’s position and orientation.
* Display imagery on the device at the appropriate frame rate.


== History ==
== History ==
WebVR API was first conceived in spring 2014 by [[Vladimir Vukićević]] from [[Mozilla]]. The API's contributors include Brandon Jones, Boris Smus and others from the Mozilla team.<ref>{{Cite web|url=https://webvr.info/|title=WebVR - Bringing Virtual Reality to the Web|website=webvr.info|access-date=2016-07-08}}</ref> 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.<ref>{{Cite web|url=https://hacks.mozilla.org/2016/03/introducing-the-webvr-1-0-api-proposal/|title=Introducing the WebVR 1.0 API ProposalMozilla Hacks – the Web developer blog|website=hacks.mozilla.org|access-date=2016-07-08}}</ref>
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.<ref>{{Cite web |date=2022-02-28 |title=WebVR Deprecated Specification |url=https://immersive-web.github.io/webvr/spec/1.1/ |website=W3C webvr}}</ref> 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.<ref>{{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}}</ref>


The latest WebXR Device API [[World Wide Web Consortium|Working Draft]] was last published in February 2022.<ref name=":0" /> The editors of the specification currently are from [[Google]] and [[Meta Platforms|Meta]]. Other members from [[Mozilla]], [[Microsoft]], [[Samsung Electronics]] and [[Apple Inc.|Apple]], as well as various startups and invited experts have input in the future of the specification.<ref>{{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}}</ref> All of the discussions of the specifications are public on GitHub.<ref>{{Cite web |title=Immersive Web at W3C |url=https://github.com/immersive-web |access-date=2022-03-01 |website=GitHub |language=en}}</ref>
The last tagged version is 1.1,<ref>{{Cite web|url=https://w3c.github.io/webvr/spec/1.1/|title=WebVR|website=w3c.github.io|language=en|access-date=2017-04-08}}</ref> which was last edited on April 5, 2017. The editors of the document include members from Mozilla and Google teams. However some Microsoft members have joined, and are actively collaborating in the drafting process of version 2.0 for the WebVR API.<ref>{{Cite web|url=https://w3c.github.io/webvr/spec/latest/|title=WebVR|website=w3c.github.io|language=en|access-date=2017-04-08}}</ref>


In 2018, the WebXR API superseded WebVR, being designed for both [[augmented reality]] and virtual reality devices.<ref name="blog.mozilla.org"/><ref name="developers.google.com"/> WebVR was implemented in Firefox and Chromium-based browsers before being deprecated and removed.
In 2018, the WebXR Device API superseded WebVR, being designed for both augmented reality, virtual reality devices and the possible future realities and devices.<ref name="blog.mozilla.org"/><ref name="developers.google.com"/><ref name="WebXR Device API Explained"/> 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.<ref name="immersive-web-wg-history">{{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}}</ref>


== Design ==
== Design ==
The WebVR API exposes a few new interfaces (such as VR Display, VR pose) that allow [[web application]]s to present content in [[virtual reality]], by using [[WebGL]] with the necessary camera settings and device interactions (such as controllers or point of view). The API has been designed to follow a certain path, which is very similar to other intrusive Web API like the [[W3C Geolocation API|Geolocation API]]. The necessary steps are:
The WebXR Device API exposes a few new interfaces (such as XRView,<ref name="WebXR Device API Explained">{{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}}</ref> XRPose<ref>{{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}}</ref>) that allow [[web application]]s 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).
# Request a list of the available VR devices.
# Check to see if the desired device supports the presentation modes the application needs.
# If so, application advertises VR functionality to the user.
# User performs an action that indicates they want to enter VR mode.
# Request a VR session to present VR content with.
# Begin a render loop that produces graphical frames to be displayed on the VR device.
# Continue producing frames until the user indicates that they wish to exit VR mode.
# End the VR session.


== Support ==
== Support ==
WebXR Device API<ref>{{cite web |url=https://www.w3.org/TR/webxr/ |title=WebXR Device API |access-date=2024-02-17 |website=[[W3C]]}}</ref> (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.<ref>{{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}}</ref><ref>{{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}}</ref> WebXR is supported in [[Safari (web browser)|Safari]] for visionOS on the [[Apple Vision Pro]] mixed reality headset.<ref>{{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}}</ref>
WebVR 1.0 is currently supported in the release version of Firefox 55+ for Windows (64 bit version only)<ref name="ff55-support">{{cite web|url=https://hacks.mozilla.org/2017/08/firefox-55-supports-webvr/|title=Firefox 55: first desktop browser to support WebVR – Mozilla Hacks - the Web developer blog|website=Mozilla Hacks – the Web developer blog}}</ref> and was supported by Chrome for Android until version 80<ref>{{cite web|url=https://webvr.rocks/chrome_for_android|title=WebVR Rocks|website=WebVR Rocks}}</ref> as an Origin Trial Experiment, which means that developers can request a token to add to their website which will seamlessly enable WebVR. WebVR 1.1 is supported in [[Microsoft Edge]] from build 15002+,<ref>{{cite web|url=https://docs.microsoft.com/en-us/microsoft-edge/webvr/webvr-with-edge|title=WebVR with Microsoft Edge - WebVR|last=mattwojo|website=docs.microsoft.com}}</ref> and in Samsung Internet, [[Chromium (web browser)|Chromium]], Servo and Oculus Carmel.

Chrome for Windows supports WebVR 1.1 in a special build. Firefox 55+ on [[macOS]] also supports WebVR if a setting is enabled by the user.<ref name="ff55-support" />


== Similar technologies ==
== 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]].
Although WebVR is unique as an API, there are native applications on most hardware allowing for networked experiences and access to web content. Several key tools, such as Unity and Blender, are also able to export for the web and provide users a way to use their content without installing a dedicated application.


== See also ==
== See also ==
* [[WebGL]]
* [[WebGL]]
* [[Web API]]
* [[Virtual reality|Virtual Reality]]
* [[Augmented reality|Augmented Reality]]
* [[Metaverse]]
* [[World Wide Web Consortium|W3C]]


== References ==
== References ==
Line 107: Line 92:
== External links ==
== External links ==
* [https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API/Fundamentals Fundamentals of WebXR] on [[MDN Web Docs]]
* [https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API/Fundamentals Fundamentals of WebXR] on [[MDN Web Docs]]
* [https://www.news.viverse.com/post/webxr-how-to-bring-virtual-reality-to-any-device WebXR: How to Bring Virtual Reality to Any Device]


{{Web interfaces}}
{{W3C standards}}
{{Mixed reality}}
{{Mixed reality}}
{{Mozilla}}
{{Mozilla}}
Line 113: Line 101:
[[Category:HTML5]]
[[Category:HTML5]]
[[Category:Virtual reality]]
[[Category:Virtual reality]]
[[Category:Web development]]

Revision as of 16:49, 23 May 2024

WebXR
WebXR Device API
AbbreviationWebXR
Status
  • 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
OrganizationW3C
Committee
  • Immersive Web Community Group
  • Immersive Web Working Group
Editors
  • Rik Cabanier
  • Manish Goregaokar
  • Brandon Jones
  • Nell Waliczek
Base standards
Domain
Websiteimmersive-web.github.io

WebXR Device API is a Web application programming interface (API)[1][2] that describes support for accessing augmented reality and virtual reality devices, such as the HTC Vive, Oculus Rift, Oculus Quest, Google Cardboard, HoloLens, Apple Vision Pro, Magic Leap or Open Source Virtual Reality (OSVR), in a web browser.[3][4] The WebXR Device API and related APIs[5] are standards defined by W3C groups, the Immersive Web Community Group[6] and Immersive Web Working Group.[7][8] 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.[9][10][11]

WebVR was an experimental Web API that was only capable of representing virtual reality and was superseded by WebXR.[12][13][14]

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.[15] 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.[16]

The latest WebXR Device API Working Draft was last published in February 2022.[4] 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.[17] All of the discussions of the specifications are public on GitHub.[18]

In 2018, the WebXR Device API superseded WebVR, being designed for both augmented reality, virtual reality devices and the possible future realities and devices.[12][13][19] 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.[20]

Design

The WebXR Device API exposes a few new interfaces (such as XRView,[19] XRPose[21]) 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[22] (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.[23][24] WebXR is supported in Safari for visionOS on the Apple Vision Pro mixed reality headset.[25]

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

  1. ^ "Web APIs | MDN". developer.mozilla.org. Retrieved 2022-03-01.
  2. ^ "Why You Should Be Paying Attention to WebXR". CrossComm. Retrieved 2022-03-01.
  3. ^ "Fundamentals of WebXR". MDN Web Docs. Retrieved 22 December 2021.
  4. ^ a b "WebXR Device API". www.w3.org. Retrieved 2022-03-01.
  5. ^ "The Immersive Web Working Group/Community Group". immersive-web.github.io. Retrieved 2022-03-01.
  6. ^ "Immersive Web Community Group". www.w3.org. 22 March 2017. Retrieved 2022-03-01.
  7. ^ "Immersive Web Working Group". www.w3.org. Retrieved 2022-03-01.
  8. ^ "WebXR Device API - Web APIs | MDN". developer.mozilla.org. Retrieved 2022-03-01.
  9. ^ Immersive Web Community Group Proposals Repo, Immersive Web at W3C, 2022-02-21, retrieved 2022-03-01
  10. ^ "Community and Business Group Process | Community and Business Groups". www.w3.org. Retrieved 2022-03-01.
  11. ^ "Standards/Participating in a W3C Working Group - MozillaWiki". wiki.mozilla.org. Retrieved 2022-03-01.
  12. ^ a b Vrignaud, Andre (October 20, 2017). "Bringing Mixed Reality to the Web – The Mozilla Blog". The Mozilla Blog. Retrieved December 23, 2021.
  13. ^ a b Medley, Joseph (May 2018). "Welcome to the immersive web". Google Developers. Retrieved December 23, 2021.
  14. ^ "WebVR API". MDN Web Docs. Retrieved 2015-11-04.
  15. ^ "WebVR Deprecated Specification". W3C webvr. 2022-02-28.
  16. ^ Yee, Casey (March 1, 2016). "Introducing the WebVR 1.0 API Proposal". Mozilla Hacks. Retrieved 2021-12-23.
  17. ^ "Immersive Web Working Group - Participants". www.w3.org. Retrieved 2022-03-01.
  18. ^ "Immersive Web at W3C". GitHub. Retrieved 2022-03-01.
  19. ^ a b "WebXR Device API". immersive-web.github.io. Retrieved 2022-03-01.
  20. ^ "Immersive Web Working Group Charter". Retrieved December 23, 2021.
  21. ^ "WebXR Device API". immersive-web.github.io. Retrieved 2022-03-01.
  22. ^ "WebXR Device API". W3C. Retrieved 2024-02-17.
  23. ^ ""webxr" | Can I use... Support tables for HTML5, CSS3, etc". caniuse.com. Retrieved 2022-03-01.
  24. ^ "Introduction to Oculus Browser | Oculus Developers". developer.oculus.com. Retrieved 2022-03-01.
  25. ^ "Meet Safari for spatial computing". developer.apple.com. Retrieved 2024-02-17.