WebXR

In the world of reality it is expanding more and more. each time applications or devices are created to share what can be achieved and there are also methods to test this virtual reality without the famous glasses, one of those methods is through the WebXR API which allows you to create VR applications but with the functionality that these applications can also be used in a web page, so in this blog I will explain relevant information about this API.
What is WebXR:
As we saw WebXR Device API is a web application programming interface that describes the compatibility to access virtual reality and augmented reality devices, in addition to being able to do it in a web browser.
Therefore, one of its main purposes and the clearest is to open the gap so that more people can try basic things that can be done in virtual reality, such as grabbing objects with the mouse, simulating the controllers.
Frameworks:
Three.js
Three.js is a JavaScript library and an API, this is used to create 3D computer graphics, this library is compatible with WebXR but you have to know how to handle it since the user is responsible for controlling and managing the performance.
Advantages:
- Easy to learn
- Support for most popular model formats
- It has a good documentation on Github
- It has its own editor
- Nice updates
- PBR rendering
Disadvantages:
- The API is aimed at beginners so many of its advanced features are hidden
- The Three.js can make it so easy to create graphs that in the end you will actually learn little
- Not a game engine
- API unstable
Babylon.js
Babylon.js is a 3D engine that uses a Javascript library, it is aimed at more experienced coders, it is one of the most popular 3D game engines and is widely used by developers, as well as supporting WebXR as well as allowing make your games work in web browsers.
Advantages:
- It has a very active community so all questions or problems can be resolved quickly
- Babylon abstracts away the ugly details a bit more than Three.js, so building a scene takes less time with Babylon than with Three.js
- This abstraction gives a low learning curve for Beginner
- More AR/VR features
- Stable API with a focus on backwards compatibility
Disadvantages:
- Babylon has a large packet size
- Babylon still has far fewer downloads, which is worrying for the future
- Documentation takes some getting used to
- Fewer examples
Finally, all this serves as a reference to see the full scope of WebXR and the possibilities it offers to make this world of virtual reality a better known field.