threejs混合器未使用`setTime`更新

问题描述 投票:0回答:1

我有一个Threejs动画混合器,设置如下:

this.mixer = new THREE.AnimationMixer(this.object);
this.mixer.timeScale = 2; //play twice as fast
this.mixer.addEventListener('finished', this.handlePullAnimFinished);
this.pullAnim = this.mixer.clipAction(this.animations[0]);
this.pullAnim.clampWhenFinished = true;
this.pullAnim.setLoop(THREE.LoopOnce);
this.pullAnim.enable = true;

但是如果我尝试执行类似this.mixer.setTime(0.5)的操作,然后选择this.mixer.update(),则没有任何反应

我如何以编程方式将混合器设置为动画中的特定点(并且不使其自动播放?)>

我看过有关设置动画以自动播放(并成功实现该功能的文档here

我有一个Threejs动画混合器,设置如下:this.mixer = new THREE.AnimationMixer(this.object); this.mixer.timeScale = 2; //播放两倍快this.mixer.addEventListener('finished',this ....

animation three.js 3d webgl gltf
1个回答
0
投票

乍看起来,您的错误是.update()中没有任何参数。

© www.soinside.com 2019 - 2024. All rights reserved.