let modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(
new Cesium.Cartesian3.fromDegrees(120.003, 41.001, 15));
let model = scene.primitives.add(Cesium.Model.fromGltf({
url: this.modelUrl,
modelMatrix: modelMatrix,
scale: 0.5,
}))
Cesium.when(model.readyPromise).then((m) => {
// addAll 添加所有动画,add 添加指定动画
let addA = m.activeAnimations.add({
name: 'All Animations',
speedup : 190.5, // Play at double speed
reverse : true,
loop : Cesium.ModelAnimationLoop.REPEAT
})
console.log(addA)
addA.start.addEventListener((m1, animation) => {
// console.log('Animation started: ' + animation.name);
});
addA.update.addEventListener((m1, animation, time) => {
console.log('Animation updated: ' + animation.name + '. glTF animation time: ' + time);
});
addA.stop.addEventListener((m1, animation) => {
// console.log('Animation stopped: ' + animation.name);
});
});
当我修改speedup对应的值的时候,动画没有变化,在update监听里面的时间的最大值没有变化,这是怎么回事?