360°旋转的动画组件属性

Animation Component Property for 360° Rotation

有没有人知道动画组件 属性 我会添加到场景中的模型以使其 'rotate' 360°(例如,当汽车在圆形平台上旋转时车展之类的)?理想情况下将其添加到此并希望能够使循环为真或假:

<a-entity gltf-model="#id" scale="0.5 0.5 0.5" rotation="0 90 0" animation__scale="property: scale; dir: alternate; dur: 200; easing: easeInSine; loop: false; to: 1.2 1 1.2">
</a-entity>

查看了 anime.js 自述文件,但似乎找不到。

谢谢

您可以使用基本动画组件:

<a-animation attribute="rotation"
             dur="2000"
             fill="forwards"
             to="0 360 0"
             repeat="indefinite"
             easing="linear"
             ></a-animation>

属性为旋转,角度设置为0 360 0,缓动设置为线性,平滑。

或使用 ngoKevin 的 animation component:

animation__rot="property:rotation;
                dur:3000;
                to:0 360 0;
                loop: true;
                easing:linear;"

在这里查看:https://jsfiddle.net/gL0pkgz7/