优化
This commit is contained in:
@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user