有人可能知道我会添加到场景中的模型中以使其"旋转"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__rot="property:rotation;
dur:3000;
to:0 360 0;
loop: true;
easing:linear;"
请在此处查看:https://jsfiddle.net/gL0pkgz7/.