benvanik / vr.js

NPAPI plugin to expose fun VR devices to Javascript.
Apache License 2.0
498 stars 105 forks source link

file './experimental/usb-driver/demo/demo.html' is missing #27

Open jjsmclaughlin opened 10 years ago

jjsmclaughlin commented 10 years ago

Hi,

The file '/home/jamie/Downloads/vr.js-master/experimental/usb-driver/background.js' attempts to launch 'demo/demo.html' when the experimental usb driver plugin is launched. Unfortunately, the file doesn't exist.

Maybe it got missed out somewhere or not committed. But it means at present you can't use the experimental usb driver.

jjsmclaughlin commented 10 years ago

Get the experimental usb driver working by copying the following files to the 'experimental/usb-driver/demo' directory (in addition to the files already copied there by 'experimental/usb-driver/setup.sh'):

examples/rift_cube_demo.html experimental/usb-driver/driver.js experimental/usb-driver/device-info.js

Change line 54 of 'experimental/usb-driver/background.js' to:

chrome.app.window.create('demo/rift_cube_demo.html', {

Replace lines 5 and 6 of 'experimental/usb-driver/demo/rift_cube_demo.html' with:

<script src="driver.js"></script>
<script src="device-info.js"></script>
<script src="vr.js"></script>
<script src="gl-matrix.js"></script>

Comment out lines 518, 521 and 523 of 'experimental/usb-driver/demo/vr.js'.

There is probably a more elegant way to do this, but it worked as a temporary fix for me.

benvanik commented 10 years ago

Good catch - the script should probably also copy these.