How to run sample Threejs VR project using local s

2019-08-01 10:31发布

I am trying to run sample threejs project for VR using xampp local server in Samsung NOTE 4 device.In this phone, online threejs VR examples(https://threejs.org/examples/?q=vr#webvr_cubes) working fine,

but same example in our local server link(http://192.168.1.2/three.js-dev/examples/?q=vr#webvr_cubes) always returns "Your browser does not support WebVR".

Can any one give me suggestions or idea how to run that sample project using xampp local server

Thanks in Advance

1条回答
孤傲高冷的网名
2楼-- · 2019-08-01 11:23

At this time, WebVR is still an experimental feature (I assume you're using Chrome).

http://192.168.1.2/ is not seen as a trusted entity, hence experimental features are disabled.
However http://127.0.0.1 and https://threejs.org are allowed to use this feature.

To enable WebVR, go to chrome://flags/#enable-webvr and click Enable


If you want your users to be able to use WebVR today, you have to apply for Origin Trials by filling in this form. Google will give you a token to add on your page. (Note that you will have to set up HTTPS on your server).

Alternatively, you can add a polyfill to make your VR work everywhere (not just in Chrome M59+).
(just include the polyfill before three.js)

查看更多
登录 后发表回答