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- 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
|
| 554 |
-
//
|
| 555 |
-
//
|
| 556 |
-
|
| 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) =>
|