如何使用 "a-animation" 更改圆柱体的高度?
How can I change the height of a cylinder with "a-animation"?
我想在 aframe
上增加 cylinder
的高度作为动画。
如何实现?
我会使用 ngoKevins animation component:
1) 为比例设置动画:
animation__scale="property: scale; dir: alternate; dur: 200;
easing: easeInSine; loop: true; to: 1 2 1"
2) 或动画高度:
animation__height="property: height; dir: alternate; dur: 200;
easing: easeInSine; loop: true; to: 3"
Fiddlehere。
使用 <a-animation>
会是这样的:
<a-animation attribute="scale"
dur="1000"
direction="alternate"
to="1 2 1"
repeat="indefinite"></a-animation>
或
<a-animation attribute="height"
dur="1000"
direction="alternate"
to="3"
repeat="indefinite"></a-animation>
fiddle here
我想在 aframe
上增加 cylinder
的高度作为动画。
如何实现?
我会使用 ngoKevins animation component:
1) 为比例设置动画:
animation__scale="property: scale; dir: alternate; dur: 200;
easing: easeInSine; loop: true; to: 1 2 1"
2) 或动画高度:
animation__height="property: height; dir: alternate; dur: 200;
easing: easeInSine; loop: true; to: 3"
Fiddlehere。
使用
<a-animation>
会是这样的:
<a-animation attribute="scale"
dur="1000"
direction="alternate"
to="1 2 1"
repeat="indefinite"></a-animation>
或
<a-animation attribute="height"
dur="1000"
direction="alternate"
to="3"
repeat="indefinite"></a-animation>
fiddle here