easter-egg-quest 1.0.8 → 1.0.10

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.
@@ -4170,7 +4170,7 @@ class MotionStage {
4170
4170
  this._narrativeIndex = 0;
4171
4171
  this._lastFadeNarrativeTime = 0;
4172
4172
  this._introPlayed = false;
4173
- this.FADE_THRESHOLD_MS = 2500;
4173
+ this.FADE_THRESHOLD_MS = 500;
4174
4174
  this.config = config;
4175
4175
  this.script = script;
4176
4176
  this.input = input;
@@ -4195,6 +4195,8 @@ class MotionStage {
4195
4195
  }
4196
4196
  this.bus.emit("narrative:clear");
4197
4197
  await this._wait(1e3);
4198
+ this._lastUpdateTime = Date.now();
4199
+ this._movingAccum = 0;
4198
4200
  this._introPlayed = true;
4199
4201
  }
4200
4202
  update(_dt) {
@@ -4218,9 +4220,9 @@ class MotionStage {
4218
4220
  }
4219
4221
  } else {
4220
4222
  const stillDuration = this.input.stillDuration;
4221
- if (stillDuration > this.FADE_THRESHOLD_MS && this._movingAccum > 500) {
4223
+ if (stillDuration > this.FADE_THRESHOLD_MS && this._movingAccum > 0) {
4222
4224
  this._fades++;
4223
- this._movingAccum = Math.max(0, this._movingAccum - stillDuration * 0.6);
4225
+ this._movingAccum = 0;
4224
4226
  this._handleFade();
4225
4227
  }
4226
4228
  }
@@ -4308,8 +4310,9 @@ class RhythmStage {
4308
4310
  }
4309
4311
  this.bus.emit("narrative:clear");
4310
4312
  await this._wait(1e3);
4311
- this._introPlayed = true;
4313
+ this.input.resetPhases();
4312
4314
  this._lastPhaseCount = this.input.phases.length;
4315
+ this._introPlayed = true;
4313
4316
  }
4314
4317
  update(_dt) {
4315
4318
  if (this._status === "complete" || !this._introPlayed) return this._status;