Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
loktar's avatar
loktar
Honored Guest
13 years ago

Node-webkit standalone exe's with vr.js

Just got my Rift last Tuesday and have been messing around with vr.js. I wanted the ability to send out standalone exe's and not have to worry about people installing a chrome plugin, activating developer mode, ect (something most people won't want to do I imagine). So I wanted to see if VR.js and the plugin for the rift could be used with node-webkit. I packaged up the threejs boxes demo and am happy to say it works! There is one draw back however, I notice a decent amount of lag which of course sucks. However with time I think that can be improved. I'm just pumped I can us JS/webgl to make some demos for the rift and hydras :)

Here's a link to the demo as a standalone windows exe. However I see no reason using node-webkit you couldnt compile for the mac and linux as well.

**note** I've only tested this on my machine but since node-webkit is standalone Im hoping my settings won't matter.
http://somethinghitme.com/downloads/threejs_boxes_demo.zip

5 Replies

  • This sounds quite interesting to me. Would you mind publishing the source, too? :)
  • loktar's avatar
    loktar
    Honored Guest
    Sure here is the source (includes vr.js)

    So to get it to work you need node-webkit you can grab it here

    Then follow the instructions for packaging. There are a few ways to do it, heres a quick rundown. You need a package.json thats where you tell it how big the window should be, to show the window frame or not, etc. Next change the .zip in the file above to .nw now you can just drag the threejs_boxes_demo-source.nw to nw.exe and it should work. To make it an exe use this command

    copy /b nw.exe+threejs_boxes_demo-source.nw threejs_boxes_demo.exe


    I downloaded Enigma Virtual Box so I could make it a self contained exe including all the dll's. Anyway all the packaging instructions including how to package it with enigma are in the link above on the github page.
  • I've done some testing with nodewebkit as well, and I think it is a great idea. But as mentioned, there was a noticeable increase in latency. I don't know if this is due to three.js or webgl or vrjs, but it seems like a solvable problem.

    The great benefit of using nodewebkit and webgl is that you open the door to VR for a lot of web developers who otherwise might stay away from Unity or UDK. I know that I am certainly in that boat. The other benefit it that the web is free and mostly open source, relative to the 3d engines. That allows us to capitalize on one another's creations.

    Voxel.js seems particularly promising, and there are some oculus related libraries already out there.