BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Mozilla's WebXR Viewer 2.0 Experiments with WebXR-Compliant JavaScript API for iOS

Mozilla's WebXR Viewer 2.0 Experiments with WebXR-Compliant JavaScript API for iOS

This item in japanese

Bookmarks

WebXR 2.0 is a full rewrite of Mozilla's experimental augmented reality (AR) browser aimed to allow web developers to experiment with web-based AR experiences on iOS using WebXR. A key tenet of WebXR 2.0 is its new, specification-complying implementation of the WebXR JavaScript API.

Mozilla started working on WebXR more than three years ago and the evolution of the WebXR specification made its original implementation of the JavaScript API not compatible with it in substantial ways, says Mozilla principal research scientist Blair MacIntyre. Hence the need for a new compatible implementation which is now available on GitHub.

According to MacIntyre, the WebXR JavaScript API developed for WebXR Viewer is the first such API for iOS that does not rely on third-party JavaScript libraries and websites, thus preserving users' privacy.

We need to ensure that there is a standards-based solution that is secure and private, unlike the proprietary solutions currently in the market that are siloed to create new, closed markets controlled by single companies.

But possibly the most important characteristic of WebXR Viewer is its reliance on native implementations of AR tech to optimize CPU and GPU usage and prevent thermal throttling, which would adversely affect performance. In particular, WebXR Viewer leverages iOS ARKit for tasks such as face-tracking, object detection, and so on.

Version 2 of WebXR Viewer, which is available on the App Store, is also a major step forward in terms of its attempt to provide a fuller Web-browsing experience. In fact, WebXR Viewer adopted Firefox for iOS code-base as a base for the rewrite, with the aim to provide a more complete experience. Not all Firefox features are currently working, while others are still a work in progress, but the new version is surely a great improvement over the previous versions, which provided a single-page web browser UI.

In the end, MacIntyre explains, WebXR Viewer is also an attempt to fill a gap on the iOS platform created by Apple's lack of interest in supporting WebXR at the OS level. Supporting WebXR on all major platforms is a key ingredient to make WebXR a success story, says MacIntyre, and using Firefox as a base hints at the possibility Mozilla will eventually integrate WebXR tech into its iOS browser.

While there is still plenty of UI work to do before moving this to a mainstream browser, we're quite happy with the performance; WebXR demos run better in this version of the app than they did in the previous one, and the impact on non-WebXR web pages seems minimal.

There are still many questions that remain open at the time, and it remains to be seen if Apple will announce official support for WebXR in its upcoming iOS 14, but you can download WebXR Viewer on the App Store and try it out for yourself.

Rate this Article

Adoption
Style

BT