Skip to main content
New Participant
April 30, 2013

vr.js -- a plugin/library to access the Rift and Hydra in JS

Hey all!
I whipped up a plugin that lets Firefox and Chrome access the Oculus Rift and Razer Hydra. It's fast and (I think) pretty easy to make existing WebGL content compatible. It provides both the raw sensor data and helpers for doing all of the math and even drawing WebGL scenes with the distortion/chromatic aberration correction shaders.

Currently it requires downloading the repo zip and running a batch file, but in the future if I get good feedback I'll create Chrome Web Store and Mozilla Addons versions that are easier for non-developers to get.

Please tell me what you think/file issues/etc!

Source/binaries: https://github.com/benvanik/vr.js

    28 replies

    New Participant
    May 31, 2013
    ....actually I am getting a "npvr.dll failed to load" message. Are there any libraries required to be installed on Windows for the dll to register?
    New Participant
    June 1, 2013
    In relation to my last post, I just installed Sketchup and it installed the .NET framework (version 2?) which then allowed the dll to register. Great!
    Participant
    June 14, 2013
    This library is awesome, thanks! Here's my progress so far, despite not actually knowing three.js:


    Up and Coming
    June 20, 2013
    How does this compare to:

    https://github.com/grimwire/ohmd-plugin
    New Participant
    July 10, 2013
    "benvanik" wrote:
    Please tell me what you think/file issues/etc!

    this is an awesome project. really good work. I hope you keep it up!
    I myself haven't managed to get it to run, my oculus isn't here yet and vr.js doesn't support linux well. the hydra for instance doesn't work at all.
    I'm hoping beyond hope that since both hydra and oculus linux sdk & drivers have arrived we will get native support in vr.js.
    I can't wait to see my threejs projects useful in VR! I've already created a little world just for vr.js.
    Up and Coming
    July 13, 2013
    Awesome project! And to hook it up with three.js is great, lots of good tutorials and open source projects around three.js right now.

    Works great in chrome canary on OSX, particularly with SizeUp. Open in a chrome window, key command to move it to the rift screen and go full screen.

    Thanks for this! Any improvements planned? I'd love to contribute.
    New Participant
    July 24, 2013
    Im just try to integrate vr.js and Three.js CSS3DRenderer. Have anyone done this successfully? It seems the sample OculusRiftEffect.js supports only WebGLRenderer and CanvasRenderer...

    Any help would be really appreciated.
    New Participant
    September 5, 2013
    "japboy" wrote:
    Im just try to integrate vr.js and Three.js CSS3DRenderer. Have anyone done this successfully? It seems the sample OculusRiftEffect.js supports only WebGLRenderer and CanvasRenderer...

    Any help would be really appreciated.


    i am also try to integrate Three.js CSS3DRenderer.
    do you integrate Three.js CSSDRenderrer for oculus rift ?

    if completed, could you share me sourcecode?

    thank in advance.
    Participant
    October 27, 2013
    Hi,
    I try to install the npvr plugin on my mac. Wine pops up but i can not get it.. Somebody can talk me through the exact procedure?
    tuurtje@online.nl

    Tuur
    New Participant
    November 1, 2013
    I just installed it and it worked great. I downloaded the zip file. Uncompressed it. Then in terminal went to the dir I just unzipped and ran bin/install.sh. Then I had to restart Chrome. Then I went to the demo page but still got an error about the plugin not working. There was an icon in the upper right of the window next to the URL bar. Clicking on the icon I got a dropdown asking if I wanted to enable the plugin. I think Chrome started disabling NSAPI plugins by default, so you have to manually approve it now. Once I did that and reloaded the page it worked fine.

    This is an amazing lib, btw. I can't wait to play around with it.