【问题标题】:Automatically move camera A-frame js自动移动相机A帧js
【发布时间】:2017-02-03 22:54:41
【问题描述】:

我正在使用 a-frame js 创建平面游览。我想自动移动相机。目前我正在使用鼠标。有人可以帮我吗?

【问题讨论】:

    标签: aframe


    【解决方案1】:

    要在 A-Frame 中进行补间,您可能会使用 a-animation 系统:

      <a-entity camera position="0 1.6 0">
        <a-animation attribute="position"
                dur="2000"
                easing="linear"
                to="0 1.6 -10"></a-animation>
      </a-entity>
    

    JSFiddle。要对此进行自定义,请参阅animation documentation

    顺便说一句:对于 VR 场景,自动移动摄像头通常会让用户感到不舒服,并且应该很少这样做,而且如果有加速的话。

    【讨论】:

      【解决方案2】:

      这个沿路径组件也适用于沿路径插入实体的位置:https://jsbin.com/dasefeh/edit?html,output

      【讨论】:

        猜你喜欢
        • 2018-07-21
        • 2021-09-09
        • 2021-09-21
        • 2021-09-07
        • 2018-09-03
        • 2021-10-06
        • 2021-03-10
        • 2017-06-30
        • 1970-01-01
        相关资源
        最近更新 更多