【问题标题】:The two box stereo example is not working in the Samsung Internet browser in GearVR两盒立体示例在 GearVR 中的三星互联网浏览器中不起作用
【发布时间】: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? (我一直在我的网站上发布代码的副本。)

标签: aframe webvr


【解决方案1】:

对于任何示例,我都无法让三星 VR 浏览器正常工作,甚至三星的也不行。

我为 Gear VR 上的所有 WebVR 使用 Oculus Carmel 浏览器。

【讨论】:

  • 谢谢。但是我在 GearVR 中安装了 Carmel,运行它并尝试了所有按钮,包括导航,但找不到任何方法来访问启用 webvr 的页面的 URL,这正是我想要做的。 .... 我想查看 www.qporitxr.com/twob/twob.html 页面——左眼应显示为红色框,右眼应显示为蓝色框。
  • 我可以在 Carmel 中加载 www.qporitxr.com/twob/twob.html,并且护目镜按钮出现在页面的左下角。然而,点击护目镜按钮会使 Carmel 进入一种我以前从未见过的奇怪模式,这看起来很像三星 VR。您可以从不同的示例开始,例如 aframe.io/examples/showcase/helloworld 或使用 A-Frame 的最新稳定版本:
【解决方案2】:

上面显示的代码来自https://github.com/oscarmarinmiro/aframe-stereo-component 的文档。

http://oscarmarinmiro.github.io/aframe-stereo-component/ 是一个工作示例。

查看http://oscarmarinmiro.github.io/aframe-stereo-component/two_boxes/index.html 的源代码会发现头中的两个脚本行 应该换成一行

<script src="../build.js"></script>.

build.js 和正确版本的索引文件在 https://github.com/oscarmarinmiro/aframe-stereo-component 的代码文件中,但不在它下面的文档中。

【讨论】:

    猜你喜欢
    • 2023-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-27
    相关资源
    最近更新 更多