BabylonJS vastly improves WebVR support

April 26, 2017

I’ve always like the BabylonJS (http://babylonjs.com) library for 3D web development, due to its simple design similar to game engines. With babylon, it’s possible to get basic 3D apps up and running in about 1/2 the code lines of THREE, and 1/10 “vanilla” JavaScript. WebVR support has been promised for quite some time in Babylon, and it is finally here.

http://www.html5gamedevs.com/topic/29113-webvr-11-in-babylonjs-on-its-way/

The upcoming version of BabylonJS fully supports WebVR 1.1. It also creates an elegant way of supporting VR – you simply swap in a WebVR camera if you want to go to VR mode, and swap in a standard 3D camera if that’s not possible. Babylon also has its own fallback – DeviceOrientationCamera – which could be used instead of trying to support the relatively klunky WebVR-Polyfill library. The DeviceOrientationCamera would also work great for Augmented Reality apps.

Documentation is also greatly improved. But, best of all tutorials!

http://www.babylonjs-playground.com/#6PVF0Y#2

http://www.babylonjs-playground.com/#6PVF0Y#5

http://www.babylonjs-playground.com/#5MV04

And a sample:

http://raananweber.com/WebVRBall/

Get to work…