Aframe (how to?) Animate entity or entities with both simultaneous and sequential scaling/rotations/positions

牧云@^-^@ 提交于 2019-12-10 12:20:49

问题


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>

回答1:


Event-triggered animations:

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

Then emit:

el.emit('someevent');

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



来源:https://stackoverflow.com/questions/53388074/aframe-how-to-animate-entity-or-entities-with-both-simultaneous-and-sequentia

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!