Aframe动画组件方向:替代错误

时间:2018-06-26 18:45:21

标签: animation aframe

我正在使用以下代码,但无法使动画与方向兼容:交替。动画拒绝交替显示,但总是从其初始值开始。

<a-entity 
gltf-model="models/u323/u323-2k1024.gltf"  
position="-0.4 1.7 -1.7" 
rotation="-2.7 0 0" 
scale="1.2 1.2 1.2" 

animation__position="property: position;
dir: alternate;
startEvents: click; 
from: -0.4 1.7 -1.7;
to: -0.47272469351429525 2.3 -2;
dur: 2000"

animation__light="property: light.intensity;
dir: alternate;
startEvents: click; 
from: 0;
to: 5;
dur: 2000"

>

1 个答案:

答案 0 :(得分:2)

尝试添加loop: 2,第二个动画应在备用方向上

animation__position="property: position;
dir: alternate;
startEvents: click; 
from: -0.4 1.7 -1.7;
to: -0.47272469351429525 2.3 -2;
dur: 2000"
loop: 2
相关问题