多个aframe动画 [英] Multiple aframe animations

查看:15
本文介绍了多个aframe动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了一个从 A 点到 B 点再到 C 点的脚本动画.

I have built a scripted animation from point A to B to C and so on.

动画通过 JS 触发(例如 document.getElementById('camera').emit('animazione_zero_avanti')).

Animations are triggered via JS (e.g document.getElementById('camera').emit('animazione_zero_avanti')).

我正在创建这样的动画:

I am creating animations like this:

我还想在第一个动画中添加 Z 轴旋转.一个动画可以有多个属性吗?

i would like to add a Z-Axis rotation as well to the first animation. Can an animation have multiple attributes?

提前致谢.

推荐答案

您可以添加多个元素.但请注意,由于生病,强烈不建议将相机旋转或控制它用于 VR.您可能会遇到麻烦,因为控件会不断更新相机.您也许可以为包装实体设置动画,但旋转的组合会很奇怪.

You can add multiple elements. Though note that rotating the camera or taking control of it is heavily not recommended for VR due to sickness. And you might have troubles since the controls continuously update the camera. You might be able to animate a wrapper entity, but then the rotations will compose weirdly.

<a-camera>
  <a-animation attribute="position" ...></a-animation>
  <a-animation attribute="rotation" ...></a-animation>
</a-camera>

<a-entity>
  <a-animation attribute="rotation" ...></a-animation>
  <a-camera>
    <a-animation attribute="position" ...></a-animation>
  </a-camera> 
</a-entity>

这篇关于多个aframe动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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