easter-egg-quest 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3665,7 +3665,7 @@ const _ResultsRenderer = class _ResultsRenderer {
|
|
|
3665
3665
|
display: "flex",
|
|
3666
3666
|
alignItems: "center",
|
|
3667
3667
|
justifyContent: "center",
|
|
3668
|
-
pointerEvents: "
|
|
3668
|
+
pointerEvents: "auto"
|
|
3669
3669
|
});
|
|
3670
3670
|
document.body.appendChild(this.host);
|
|
3671
3671
|
this.shadow = this.host.attachShadow({ mode: "closed" });
|
|
@@ -4857,7 +4857,8 @@ class RhythmStage {
|
|
|
4857
4857
|
isMoving: this.input.snapshot.isMoving,
|
|
4858
4858
|
progress,
|
|
4859
4859
|
moveDuration: this.input.moveDuration,
|
|
4860
|
-
stillDuration: this.input.stillDuration
|
|
4860
|
+
stillDuration: this.input.stillDuration,
|
|
4861
|
+
liveConfidence: this._getLiveConfidence()
|
|
4861
4862
|
});
|
|
4862
4863
|
if (accuracy === 0 && Date.now() - this._lastGuideTime > 12e3) {
|
|
4863
4864
|
this._lastGuideTime = Date.now();
|
|
@@ -4890,6 +4891,21 @@ class RhythmStage {
|
|
|
4890
4891
|
const stillOk = stillPhase.duration >= this.IDEAL_PAUSE_MIN && stillPhase.duration <= this.IDEAL_PAUSE_MAX;
|
|
4891
4892
|
return moveOk && stillOk;
|
|
4892
4893
|
}
|
|
4894
|
+
_getLiveConfidence() {
|
|
4895
|
+
if (this.input.snapshot.isMoving) {
|
|
4896
|
+
return this._scoreDuration(this.input.moveDuration, this.IDEAL_MOVE_MIN, this.IDEAL_MOVE_MAX);
|
|
4897
|
+
}
|
|
4898
|
+
return this._scoreDuration(this.input.stillDuration, this.IDEAL_PAUSE_MIN, this.IDEAL_PAUSE_MAX);
|
|
4899
|
+
}
|
|
4900
|
+
_scoreDuration(duration, idealMin, idealMax) {
|
|
4901
|
+
if (duration <= 0) return 0;
|
|
4902
|
+
if (duration >= idealMin && duration <= idealMax) return 1;
|
|
4903
|
+
const tolerance = Math.max(300, Math.round((idealMax - idealMin) * 0.35));
|
|
4904
|
+
if (duration < idealMin) {
|
|
4905
|
+
return Math.max(0, 1 - (idealMin - duration) / tolerance);
|
|
4906
|
+
}
|
|
4907
|
+
return Math.max(0, 1 - (duration - idealMax) / tolerance);
|
|
4908
|
+
}
|
|
4893
4909
|
_showReaction() {
|
|
4894
4910
|
const now = Date.now();
|
|
4895
4911
|
if (now - this._lastNarrativeTime > 12e3) {
|
|
@@ -5205,11 +5221,9 @@ class GameController {
|
|
|
5205
5221
|
var _a3, _b3;
|
|
5206
5222
|
(_a3 = this.eggRenderer) == null ? void 0 : _a3.setBreathIntensity(data.accuracy);
|
|
5207
5223
|
(_b3 = this.pageBreather) == null ? void 0 : _b3.update(data.accuracy, data.isMoving);
|
|
5208
|
-
const rhythmSignal = Math.max(data.accuracy, data.progress * 0.75);
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
const liveSignal = hasLiveCycleSignal ? 0.2 : 0;
|
|
5212
|
-
this.threeRenderer.showProgressParticles(Math.max(0.35, 0.45 + Math.max(rhythmSignal, liveSignal) * 0.55), "rhythm");
|
|
5224
|
+
const rhythmSignal = Math.max(data.accuracy, data.progress * 0.75, data.liveConfidence * 0.85);
|
|
5225
|
+
if (rhythmSignal > 0.18 && this.threeRenderer) {
|
|
5226
|
+
this.threeRenderer.showProgressParticles(0.3 + rhythmSignal * 0.7, "rhythm");
|
|
5213
5227
|
} else if (this.threeRenderer) {
|
|
5214
5228
|
this.threeRenderer.fadeOutAmbientParticles();
|
|
5215
5229
|
}
|