Animation “动画填充模式”;“远期”;在3.js中

Animation “动画填充模式”;“远期”;在3.js中,animation,three.js,Animation,Three.js,我的动画正在运行,但完成后,将恢复到原始状态。 像我一样在终止后保持最终状态? 像Css中的“动画填充模式:前进” 可以使用使动画在完成后在最后一帧暂停 this.mixer = new THREE.AnimationMixer(this.box); this.animation = this.mixer.clipAction(this.box.geometry.animations[0]); this.animation.setDuration(1.5); this.animation.set

我的动画正在运行,但完成后,将恢复到原始状态。 像我一样在终止后保持最终状态? 像Css中的“动画填充模式:前进”

可以使用使动画在完成后在最后一帧暂停

this.mixer = new THREE.AnimationMixer(this.box);
this.animation = this.mixer.clipAction(this.box.geometry.animations[0]);
this.animation.setDuration(1.5);
this.animation.setLoop(THREE.LoopOnce, 1);
this.animation.clampWhenFinished = true;
希望有帮助

this.mixer = new THREE.AnimationMixer(this.box);
this.animation = this.mixer.clipAction(this.box.geometry.animations[0]);
this.animation.setDuration(1.5);
this.animation.setLoop(THREE.LoopOnce, 1);
this.animation.clampWhenFinished = true;