three.js: Android Chrome Dev supports WebVr v1.0 however presenting causes a promise error.

Samsung S3 Android 4.3 Chrome Dev.

  1. the video vr example http://threejs.org/examples/#webvr_video
  2. Click Enter VR
  3. Presenting triggers an error. Should it fallback to sending the canvas fullscreen here for cardboard device view ? In WebVR 1.0 it tries to use the new API for presenting to displays.
VREffect.js:221 Uncaught (in promise) DOMException: VRDisplay cannot present

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 15 (4 by maintainers)

Most upvoted comments

I’ve reverted back to a few commits back, the refactor of the original CardboardEffect is actually broken.

The entire boiler plate and polyfill thing is bloaty and poorly scripted. It would be easier if it was a function part of the examples at least that can be imported directly.

I will try to import the distorter somehow directly into my Es6 project but it might be hard to implement and it uses raw functions. I can see what it’s trying to do with the vertex distortion in a shader program although uses device specific data.

The mesh distortion is working again for now as stereo, it was only displaying on the left.

I’ve reverted back to the VrEffect at is keeps getting refactors. But do display checks duplicated outside of it so I can dispatch when displays are available and it can present. You have no idea when it has obtained displays, as in no events that is all.

I guess we should close this and Android might have native distortion working when WebVr is enabled by default.

I’m working on implementing presentation on Android, it’s just been a bumpy road as we’ve worked on the transition to GoogleVR from the Cardboard SDK. Hoping to get something more useable out soon.

Code using WebVR should definitely plan on cases where canPresent is false, though. If/when we get it working on Tango devices I expect that will be the case, because you can get great 6DoF positions out of them but it’s unlikely that you’ll be using it in a headset.