easter-egg-quest 1.0.13 → 1.0.15

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.
@@ -853,10 +853,6 @@ class HiddenEntry {
853
853
  const goBtn = document.createElement("button");
854
854
  goBtn.className = "eeq-snackbar-btn";
855
855
  goBtn.textContent = "Let's go!";
856
- Object.assign(goBtn.style, {
857
- background: "rgba(76,175,80,0.85)",
858
- color: "#fff"
859
- });
860
856
  goBtn.addEventListener("click", () => {
861
857
  dismiss();
862
858
  onConfirm();
@@ -4515,6 +4511,7 @@ class RhythmStage {
4515
4511
  if (isGood) {
4516
4512
  this._goodCycles++;
4517
4513
  } else {
4514
+ this._goodCycles = 0;
4518
4515
  this._showReaction();
4519
4516
  }
4520
4517
  this._lastPhaseCount += 2;
@@ -4674,6 +4671,7 @@ class PageBreather {
4674
4671
  this._startTime = 0;
4675
4672
  this._isUserMoving = false;
4676
4673
  this._inSync = false;
4674
+ this._accuracy = 0;
4677
4675
  this.CYCLE_MS = 6e3;
4678
4676
  this._tick = () => {
4679
4677
  if (!this._active || !this._overlay) return;
@@ -4683,7 +4681,7 @@ class PageBreather {
4683
4681
  const phase = elapsed % this.CYCLE_MS / this.CYCLE_MS;
4684
4682
  const wave = (Math.sin(phase * Math.PI * 2 - Math.PI / 2) + 1) * 0.5;
4685
4683
  const shouldMove = phase < 0.5;
4686
- this._inSync = shouldMove === this._isUserMoving;
4684
+ this._inSync = this._accuracy > 0 && shouldMove === this._isUserMoving;
4687
4685
  const baseOpacity = wave * 0.85;
4688
4686
  const syncBonus = this._inSync ? 0.15 : 0;
4689
4687
  const opacity = this._intensity * (baseOpacity + (1 - wave) * 0.05 + syncBonus);
@@ -4714,6 +4712,7 @@ class PageBreather {
4714
4712
  update(accuracy, isMoving) {
4715
4713
  if (!this._active) return;
4716
4714
  this._isUserMoving = isMoving;
4715
+ this._accuracy = accuracy;
4717
4716
  const raw = Math.max(0, Math.min(1, (accuracy - 0.05) / 0.5));
4718
4717
  this._targetIntensity = 0.5 + raw * 0.5;
4719
4718
  }
@@ -4731,6 +4730,7 @@ class PageBreather {
4731
4730
  this._intensity = 0;
4732
4731
  this._targetIntensity = 0;
4733
4732
  this._inSync = false;
4733
+ this._accuracy = 0;
4734
4734
  }
4735
4735
  destroy() {
4736
4736
  this.stop();
@@ -4832,7 +4832,7 @@ class GameController {
4832
4832
  var _a3, _b3, _c;
4833
4833
  (_a3 = this.eggRenderer) == null ? void 0 : _a3.setBreathIntensity(data.accuracy);
4834
4834
  (_b3 = this.pageBreather) == null ? void 0 : _b3.update(data.accuracy, data.isMoving);
4835
- if (((_c = this.pageBreather) == null ? void 0 : _c.isInSync()) && this.threeRenderer) {
4835
+ if (((_c = this.pageBreather) == null ? void 0 : _c.isInSync()) && data.accuracy > 0 && this.threeRenderer) {
4836
4836
  this.threeRenderer.showProgressParticles(0.6 + data.accuracy * 0.4);
4837
4837
  }
4838
4838
  });