borismus / webvr-boilerplate

A starting point for web-based VR experiences that work on all VR headsets.
Apache License 2.0
1.8k stars 454 forks source link

Undefined VRDisplay when using webvr-boilerplate in three-vr-boilerplate #137

Open Xaxis opened 8 years ago

Xaxis commented 8 years ago

I've been playing around with making a boilerplate of webvr-boilerplate, one that allows me to spin up webvr/three.js based apps and develop them in the manner I'm accustomed to these days: using require, backbone, sass, etc. The project is https://github.com/Xaxis/three-vr-boilerplate.

The problem I'm having is VRDisplay is not defined coming from line 401 in webvr-manager here. The bulk of my project code related to webvr-boilerplate initialization is here.

Could someone inform me a bit more regarding where VRDisplay is defined normally? Could this be a conflict with require.js due to the fact that I'm loading a project that is also using require as a module loader? Any help or insight would be hugely appreciated.

borismus commented 8 years ago

You probably need to use the webvr-polyfill. Or a special build that exposes WebVR API.

On Wed, Apr 27, 2016, 1:09 PM Wil Neeley notifications@github.com wrote:

I've been playing around with making a boilerplate of webvr-boilerplate, one that allows me to spin up webvr/three.js based apps and develop them in the manner I'm accustomed to these days: using require, backbone, sass, etc. The project is https://github.com/Xaxis/three-vr-boilerplate.

The problem I'm having is VRDisplay is not defined coming from line 401 in webvr-manager here https://github.com/borismus/webvr-boilerplate/blob/master/build/webvr-manager.js#L401. The bulk of my project code related to webvr-boilerplate initialization is here https://github.com/Xaxis/three-vr-boilerplate/blob/master/app/js/libs/native/main/main.js .

Could someone inform me a bit more regarding where VRDisplay is defined normally? Could this be a conflict with require.js due to the fact that I'm loading a project that is also using require as a module loader? Any help or insight would be hugely appreciated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/borismus/webvr-boilerplate/issues/137

nhirata commented 8 years ago

Which browser were you using? On the Nightly of Firefox, I'm experiencing the same thing. I don't experience that with Chromium without the headset (right now Chromium doesn't work with Oculus Runtime 1.3). With older version of Firefox, I don't experience the issue, but I can't see it within the browser. I filed bug 1269057 for the Firefox Nightly and will try to dig into it some.

Xaxis commented 8 years ago

I'm experiencing the issue in: Chrome 50.0.2661.86 Firefox 46.0.1 Firefox Nightly

brianpeiris commented 8 years ago

Firefox Nightly does not support WebVR 1.0 yet (which implements VRDisplay). The MozVR team is working on supporting 1.0 at the moment. Until then, if you want to support Nightly, you'll have to use v0.3.8

brianpeiris commented 8 years ago

This is also covered by #127

nhirata commented 8 years ago

Ah. that answers the question. For the Nightly, WebVR 1.0 is being currently implemented, you can see the work being done in this bug : https://bugzilla.mozilla.org/show_bug.cgi?id=1250244

Brian, would you think it's feasible to do a fall back if VRDisplay is null to fall back to VRDevice?

Xaxis, Not sure about Chrome. I believe they have to update with Oculus runtime 1.3.2; With the 46.0.1, are you using the addon?

brianpeiris commented 7 years ago

We can close this, since Firefox supports WebVR 1.0