一个活动的glTF动画。glTF资源可以包含动画。活跃的动画
当前正在播放或计划播放的动画
加上一个型号的
ModelAnimationCollection
。活动动画是
动画的实例;例如,可以有多个活动动画
对于相同的glTF动画,每个动画都有不同的开始时间。
Create this by calling ModelAnimationCollection#add
.
Members
从
ModelAnimation#startTime
到开始播放的延迟(以秒为单位)。-
Default Value:
undefined
readonly loop : ModelAnimationLoop
确定是否以及如何循环动画。
-
Default Value:
ModelAnimationLoop.NONE
大于
1.0
的值会增加动画的相对播放速度
到场景时钟速度;小于1.0
的值会降低速度。价值
1.0
以映射到场景的glTF动画中的速度播放动画
时钟速度。例如,如果场景以2倍实时播放,则为两秒钟的glTF动画
即使multiplier
是1.0
,也将在一秒钟内播放。-
Default Value:
1.0
标识此动画的glTF动画名称。
当
true
时,动画在停止播放后被移除。
这比不移除它稍微更有效,但是如果,例如,
时间颠倒,动画不再播放。-
Default Value:
false
6166在动画6166中播放时,反向播放。
-
Default Value:
false
start : Event
启动此动画时激发的事件。这可以用来
例如,在动画开始时播放声音或启动粒子系统。
This event is fired at the end of the frame after the scene is rendered.
-
Default Value:
new Event()
Example:
animation.start.addEventListener(function(model, animation) {
console.log('Animation started: ' + animation.name);
});
readonly startTime : JulianDate
开始播放此动画的场景时间。当这是
undefined
时,
动画从下一帧开始。-
Default Value:
undefined
stop : Event
停止此动画时激发的事件。这可以用来
例如,在动画停止时播放声音或启动粒子系统。
This event is fired at the end of the frame after the scene is rendered.
-
Default Value:
new Event()
Example:
animation.stop.addEventListener(function(model, animation) {
console.log('Animation stopped: ' + animation.name);
});
readonly stopTime : JulianDate
停止播放此动画的场景时间。当这是
undefined
时,
动画将在其整个持续时间内播放,并且可能会根据
ModelAnimation#loop
-
Default Value:
undefined
update : Event
更新此动画时在每帧上激发的事件。这个
相对于glTF动画时间跨度,动画的当前时间为
传递给事件,例如,允许在
相对于播放动画的特定时间。
This event is fired at the end of the frame after the scene is rendered.
-
Default Value:
new Event()
Example:
animation.update.addEventListener(function(model, animation, time) {
console.log('Animation updated: ' + animation.name + '. glTF animation time: ' + time);
});