【发布时间】:2018-03-29 18:23:01
【问题描述】:
我在启用 webVR 的 GearVR 中使用三星互联网浏览器。我直接从 github 源代码中获取了“两个盒子,每只眼睛一个”示例的代码。它应该在每只眼睛中显示一个框。但无论我尝试过什么,我都会在每只眼睛中都得到两个盒子或更糟的东西。我没有尝试过产生正确的结果。
我的最终目标是使用 webVR 在 webVR 中以立体方式播放 360 度 3D 视频(来自 VUZE)。但我什至无法让这个简单的立体声应用程序工作。任何有关让立体 VR 在 HMD(尤其是 GearVR)中工作的最佳方式的建议都将不胜感激。
来源是https://github.com/oscarmarinmiro/aframe-stereo-component的两个盒子示例
代码是:
<html>
<head>
<title>My A-Frame Scene</title>
<script src="https://aframe.io/releases/latest/aframe.min.js"></script>
<script src="aframe-stereo-component.js.min.js"></script>
</head>
<body>
<a-scene>
<a-sky color="#FFF"></a-sky>
<a-light color="#333" position="0 5 0" type="ambient" intensity="0.2"></a-light>
<a-light type="point" color="#EEE" intensity="1.0" position="3 3 10"></a-light>
<!-- 'left' eye entities will pass trough the camera in non-VR mode -->
<a-camera position="0 0 10" cursor-color="black" stereocam="eye:left;"></a-camera>
<!-- in VR mode, the first box is displayed only in the left eye, the second one in the right eye -->
<a-entity geometry="primitive: box" material="color: #C03546" stereo="eye:left"></a-entity>
<a-entity geometry="primitive: box" material="color: #3546C0" position="0 5 0" stereo="eye: right"></a-entity>
"</a-scene>
</body>
</html>
【问题讨论】:
-
我在 DayDream 上使用 Pixel 2 进行了尝试,所有示例都按预期工作。
-
我使用了 Daydream 和 Pixel 1 以及 chrome 64.0.3282.137。我在两只眼睛里都看到了两个盒子。我的代码有问题吗? chrome的一些特殊设置?它仅适用于 Pixel2 吗?是否有带有 2 框示例的 URL? (我一直在我的网站上发布代码的副本。)