Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Aframe a帧模型动画更改a动画上的轨迹_Aframe - Fatal编程技术网

Aframe a帧模型动画更改a动画上的轨迹

Aframe a帧模型动画更改a动画上的轨迹,aframe,Aframe,我正在加载模型并尝试更改a动画事件上的动画轨迹: <a-entity three-model="loader:object;src:url(http://localhost:3000/upload/6tTxHz6JMPXMsGD8W/marine_anims_core.json);animation:run;animationDuration:0;enableAnimation:true" > <a-animation begin="mouseenter" attribu

我正在加载模型并尝试更改a动画事件上的动画轨迹:

<a-entity three-model="loader:object;src:url(http://localhost:3000/upload/6tTxHz6JMPXMsGD8W/marine_anims_core.json);animation:run;animationDuration:0;enableAnimation:true" >
   <a-animation begin="mouseenter" attribute="three-model.animation" repeat="1" dur="1000" direction="alternate" from="walk" to="run"></a-animation>
</a-entity>
我不确定这是因为A-Animation没有处理文本还是什么?

依赖于Tween.js(cf用于文档),它基本上采用了
from
值和
to
值,这两个值在引擎盖下都是数字(是的,甚至是颜色)。来自
值将等于时间0时的0和时间
dur时的值1。从0到1的更改将取决于所选的
属性,但基本上您会被分配到所选的
属性
中,从*0到*0.1再到*0.2。。。从*0.9到*1

所有这些都表明吐温依赖于连续值,而不是离散值。步行和跑步之间的中间值是什么?跑步步行*.0.2?走快一点?慢跑?如果您的tweening系统无法将值从
插值到
,则动画(至少从当前0.3中使用的tweening系统开始)将无法工作


您可以在模型上添加addEventListener(),如果尚未运行,则启动运行动画,等待所需时间,停止并再次启动行走动画。

我将使用事件集组件更改值以响应事件:


aframe-extras.loaders.min.js:688 [three-model] Animation "NaN" not found.
   playAnimation @ aframe-extras.loaders.min.js:688
   update @ aframe-extras.loaders.min.js:658
   updateProperties @ component.js:205
   value @ a-entity.js:427
   value @ a-entity.js:450
   value @ a-entity.js:579
   f @ a-animation.js:426
   (anonymous function) @ a-animation.js:136
   update @ Tween.js:339
   update @ Tween.js:81
   value @ a-scene.js:382
   value @ a-scene.js:407
<a-entity three-model="animation: walk" event-set="_event: mouseenter; three-model.animation: run;>