diff --git a/src/app/chat/ChatInfo/DanceList/index.tsx b/src/app/chat/ChatInfo/DanceList/index.tsx index 3d2fd36c..e4bec398 100644 --- a/src/app/chat/ChatInfo/DanceList/index.tsx +++ b/src/app/chat/ChatInfo/DanceList/index.tsx @@ -65,14 +65,6 @@ const DanceList = memo((props: PlayListProps) => { /> } /> - - item.danceId} - data={danceList} - followOutput={false} - itemContent={(index, item) => } - /> - {danceList.length === 0 ? ( { {t('danceMarket')} - ) : null} + ) : ( + item.danceId} + data={danceList} + followOutput={false} + itemContent={(index, item) => } + /> + )} ); diff --git a/src/libs/emoteController/motionManager.ts b/src/libs/emoteController/motionManager.ts index b08fa4d6..4b573e01 100644 --- a/src/libs/emoteController/motionManager.ts +++ b/src/libs/emoteController/motionManager.ts @@ -20,6 +20,8 @@ export class MotionManager { this.vrm = vrm; this.mixer = new AnimationMixer(vrm.scene); this.ikHandler = IKHandler.get(vrm); + this.currentAction = undefined; + this.currentClip = undefined; } public async loadMotionUrl( @@ -70,18 +72,19 @@ export class MotionManager { } public disposeCurrentMotion(): void { - if (this.currentClip && this.mixer) { + this.mixer.stopAllAction(); + if (this.currentClip) { this.mixer.uncacheAction(this.currentClip); this.mixer.uncacheClip(this.currentClip); + this.currentAction = undefined; } + this.ikHandler.disableAll(); + if (this.currentAction) { this.currentAction.stop(); + this.currentClip = undefined; } - this.ikHandler.disableAll(); - - this.currentAction = undefined; - this.currentClip = undefined; } public update(delta: number): void { diff --git a/src/libs/vrmViewer/model.ts b/src/libs/vrmViewer/model.ts index 9a47ca39..418c6e20 100644 --- a/src/libs/vrmViewer/model.ts +++ b/src/libs/vrmViewer/model.ts @@ -93,8 +93,9 @@ export class Model { const { volume } = this._lipSync.update(); this.emoteController?.lipSync('aa', volume); } - - this.emoteController?.update(delta); + // vrm 先更新 this.vrm?.update(delta); + // 后更新表情动作 + this.emoteController?.update(delta); } }