自动移动相机A帧js [英] Automatically move camera A-frame js

查看:93
本文介绍了自动移动相机A帧js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am creating flat tour using a-frame js . I wanted to move camera automatically.currently I am doing that using mouse .can anyone help me?

推荐答案

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

To do tweening in A-Frame, you'll probably use the a-animation system:

  <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 .要对此进行自定义,请参见动画文档. >

JSFiddle. To customize this, see the animation documentation.

此外:对于VR场景,自动移动相机通常会让用户感到不舒服,并且应该很少进行且完全没有加速度.

Aside: For VR scenes, moving the camera automatically is often uncomfortable for users, and should be done rarely and without acceleration, if at all.

这篇关于自动移动相机A帧js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆