Oculus Rift, Google Cardboard and Samsung’s Gear VR are all trying to get developers excited about building immersive virtual reality (VR) experiences. But as VR is capturing our imaginations, developers are left to wonder whether this new world will once again be dominated by competing and incompatible platforms, just the way mobile and desktop computing have been for so long.
Some developers think they’ve found a solution to this problem. “Remember the old ‘write once, run anywhere’ promise,” asked Google employee and VR enthusiast Boris Smus in a blog post this week, adding: “The web is the closest thing we have to fulfilling it.” Instead of building native apps that just work on one platform or even just one single VR headset, developers could build their VR experiences in HTML, and simply have them run in a browser.
This idea, commonly known as WebVR, is championed by a variety of developers and organizations, with one big proponent being Mozilla. The browser maker launched its own MozVR website for web-based VR experiences last year, and added VR support to the nightly (pre-alpha) builds of Firefox last month. There are also efforts to bring VR to Chrome, and Google launched a website highlighting VR Chrome experiments when it unveiled its own DIY Cardboard VR viewer last year.
Mozilla is one of the early proponents of web-based VR.
However, so far, these efforts aren’t compatible. “The latest VR wave has barely begun and already the web VR world is fragmented,” wrote Smus, adding: “Case in point, vr.chromeexperiments.com don’t work on Oculus, and mozvr.com demos don’t work in Cardboard.” Developers can now either wait until Google, Mozilla, Oculus and others agree on a common standard — or simply get their own cross-platform approach ready.
That’s exactly what Smus did this week by launching what he calls “responsive WebVR.” The idea: Make HTML-based VR work across headsets, and even without any headset at all. His inspiration? Responsive web design that automatically detects whether a user accesses a site with a desktop or a mobile browser, and optimizes the experience accordingly:
“Responsive web design promises content which automatically adapts to your viewing environment by using fluid layouts, flexible images, proportional grids; a cocktail of modern web technologies. Similarly, WebVR experiences need to work even without VR hardware.”
Smus’ WebVR boilerplate open source project allows developers to create HTML-based VR experiences that work with both Oculus Rift and Google Cardboard, as well as with no VR headset at all, using a phone’s gyroscope to allow users to tilt the display to explore worlds. For now, it still requires developers to download a special build of Chrome, but developers should feel encouraged by the promise of cross-platform capabilities — and the potential of web-based experiences that work in an ordinary desktop or mobile browser as well as a VR headset is pretty exciting.