eloigil6 commited on
Commit
2b68966
·
1 Parent(s): 9a247b0

Update startDescent function to hide the start button during descent transition. This change prevents the button from capturing pointer events and allows user interactions with underlying elements, ensuring a smoother experience.

Browse files
Files changed (1) hide show
  1. frontend/main.js +4 -6
frontend/main.js CHANGED
@@ -550,12 +550,10 @@ function startDescent() {
550
  intro.phase = "descending";
551
  intro.t0 = performance.now();
552
  overlay.classList.add("hidden");
553
- // The overlay fades via opacity (no display:none, to keep the exit
554
- // transition), but #start-btn.ready stays pointer-events:auto — leaving an
555
- // invisible button pinned at screen center that swallows clicks on whatever
556
- // sits under it (the bench / cassette collection). Drop .ready so the spent
557
- // button stops capturing pointer events.
558
- startBtn.classList.remove("ready");
559
  }
560
 
561
  const pageLoaded = new Promise((resolve) =>
 
550
  intro.phase = "descending";
551
  intro.t0 = performance.now();
552
  overlay.classList.add("hidden");
553
+ // The overlay only fades out (opacity), so its still-`ready` start button
554
+ // would stay pinned on top and swallow clicks meant for the scene behind it
555
+ // (e.g. the bench / cassette collection). Hide the spent button outright.
556
+ startBtn.hidden = true;
 
 
557
  }
558
 
559
  const pageLoaded = new Promise((resolve) =>