This commit is contained in:
yinsx
2025-12-25 09:46:16 +08:00
parent 48d587c1ff
commit e56f47076c
4 changed files with 36 additions and 19 deletions

View File

@ -231,7 +231,12 @@ class BlendShapeAnimator {
this.blinkInterval = setTimeout(() => {
if (this.isBlinkEnabled) {
this._doBlink();
scheduleNext();
const holdDuration = Math.max(0, this.blinkParams.duration || 0);
this.blinkInterval = setTimeout(() => {
if (this.isBlinkEnabled) {
scheduleNext();
}
}, holdDuration);
}
}, delay);
};
@ -281,8 +286,13 @@ class BlendShapeAnimator {
const delay = this.eyeLookParams.intervalMin + Math.random() * (this.eyeLookParams.intervalMax - this.eyeLookParams.intervalMin);
this.eyeLookInterval = setTimeout(() => {
if (this.isEyeLookEnabled) {
this._doRandomEyeLook();
scheduleNext();
const holdDuration = this._doRandomEyeLook();
const waitDuration = Math.max(0, holdDuration || 0);
this.eyeLookInterval = setTimeout(() => {
if (this.isEyeLookEnabled) {
scheduleNext();
}
}, waitDuration);
}
}, delay);
};
@ -330,6 +340,8 @@ class BlendShapeAnimator {
});
}
}, holdDuration);
return holdDuration;
}
_resetEyeLook() {