【问题标题】:aframe zoom animation in vr-modevr 模式下的 aframe 缩放动画
【发布时间】:2017-12-26 03:27:12
【问题描述】:

我在移动设备或其他 vr 设备上的 AFRAME vr 模式下的相机变焦存在问题。我已经建立了一个缩放动画,它不适用于移动设备或其他 VR 设备。 有人可以帮忙吗?

代码如下:

<a-entity id="cam-vr" camera="zoom:1; active:false " rotation="0 0 0"  look-controls>
    <a-animation begin="cursor-fusing" delay=" 3000" attribute="camera.zoom" from="1" to="4" dur="1000"></a-animation>
    <a-animation begin="click" delay="500" attribute="camera.zoom" from="4" to="1" dur="1000"></a-animation>

    <a-entity id="cursor" visible="false" cursor="fuse: true; fuseTimeout:4000" geometry="primitive: ring; radiusInner: 0.012; radiusOuter: 0.02; thetaLength: 360; thetaStart: 0" rotation="0 0 90" position="0 0 -1" material="color: black; side: double; shader: flat">
    <a-animation begin="cursor-fusing" attribute="geometry.thetaLength" from="360" to="0" easing="linear" dur="3000"></a-animation>
    <a-animation begin="mouseleave" attribute="geometry.thetaLength" from="360" to="360" dur="0"></a-animation>
    </entity>
</a-entity>

【问题讨论】:

    标签: three.js aframe webvr


    【解决方案1】:

    这是不可能的——在带有 A-Frame 或 three.js 的 VR 中,您使用 THREE.VREffect 进行渲染,而不仅仅是一个 THREE.PerspectiveCamera,并且没有一个简单的等价物在保持正确的左/右眼对齐。

    FPS 模式在 VR 中也并非总是如此有效。您可以将摄像头移近内容,但这也会让 VR 中的用户感到恶心。考虑适合 VR 的替代方案可能会更好,例如 teleporting

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-17
      • 2018-12-10
      相关资源
      最近更新 更多