mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
101.98k stars 35.33k forks source link

Examples claim "WEBXR NOT AVAILABLE" but immersiveweb.dev works #18431

Closed omgitsraven closed 4 years ago

omgitsraven commented 4 years ago
Description of the problem

When either implementing the code shown on https://threejs.org/docs/index.html#manual/en/introduction/How-to-create-VR-content , or clicking any of its examples (under 'Next Steps'), the VRButton says "WEBXR NOT AVAILABLE" and links to immersiveweb.dev — however, on immersiveweb.dev , the "WebXR particles" demo works fine; that button says "ENTER VR", and if I click it, I can view the particles demo in VR.

In short:

Three.js version

r112

Browser

Only tried in Firefox

OS

Windows

Hardware Requirements (graphics card, VR Device, ...)

Oculus Rift

Mugen87 commented 4 years ago

Only tried in Firefox

Can you also try it with Chrome?

mrdoob commented 4 years ago

Firefox has not implemented WebXR yet.

steren commented 2 years ago

If Firefox doesn't support WebXR, does it mean the immersive web samples use a webVR fallback?

For example https://immersive-web.github.io/webxr-samples/ runs great on Firefox on Windows without having to turn any flag.

JeffesJiang commented 2 years ago

If you are not connected to a VR headset, you can use the chrome plug-in WebXR API Emulator 0.3.3. If you have a headset with an Android system, you can enter VR normally by using the VR version of the Firefox browser. The VR of the Android Google browser is the kind of mode that requires the mud mobile phone to be put into the glasses case, and the screen will become two left and right. image

Plugin url : https://chrome.google.com/webstore/detail/webxr-api-emulator/mjddjgeghkdijejnciaefnkjmkafnnje

steren commented 2 years ago

My question was: how come the immersive web sample works on the regular Firefox browser but three.js does not

If Firefox doesn't support WebXR, is the immersive web sample using a WebVR fallback?

Mugen87 commented 2 years ago

Yes, these examples use a polyfill. It's https://github.com/immersive-web/webxr-polyfill

The three.js examples use no polyfill.