Aframe(如何?)对具有同时和顺序缩放/旋转/位置的一个或多个实体进行动画处理 [英] Aframe (how to?) Animate entity or entities with both simultaneous and sequential scaling/rotations/positions

查看:367
本文介绍了Aframe(如何?)对具有同时和顺序缩放/旋转/位置的一个或多个实体进行动画处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是菜单:

This is the menu:

如何为实体设置动画,以便在发生单击之类的事件时,它同时缩放,旋转,定位和顺序缩放,旋转,定位。

How do I animate an entity, so that upon an event like a click, it does simultaneous scaling, rotation, positioning, and sequential scaling, rotation, positioning.

    <a-curve id="track1">
    <a-curve-point position="4 2 -3"></a-curve-point>
    <a-curve-point position="6 5 -2"></a-curve-point>
    <a-curve-point scale="10 -3 -1"></a-curve-point>

    </a-curve>

    <a-cylinder position="5 0.75 -3" radius="0.5" height="1.5" color="#FFC65D" shadow>
    <a-animation alongpath="curve: #track1" begin="click"></a-animation>
    </a-cylinder>


推荐答案

事件触发的动画:

< a-entity animation__1 = startEvents:someevent animation__2 = startEvents:someevent>

然后发出:

el.emit('someevent');

有关顺序的信息,请参见 https ://www.npmjs.com/package/aframe-animation-timeline-component

For sequential, see https://www.npmjs.com/package/aframe-animation-timeline-component

这篇关于Aframe(如何?)对具有同时和顺序缩放/旋转/位置的一个或多个实体进行动画处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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