Up-in-the-Air – commitdiff

You can use Git to clone the repository via the web URL. Download snapshot (zip)
Try harder to clean up title screen CSS after it's done animating
authorJulian Fietkau <git@fietkau.software>
Sat, 28 Sep 2024 00:11:34 +0000 (02:11 +0200)
committerJulian Fietkau <git@fietkau.software>
Sat, 28 Sep 2024 00:11:34 +0000 (02:11 +0200)
main.js

diff --git a/main.js b/main.js
index 137575bb01343045b197de24d3be90926cdfa78d..6fd34293ad3f15c2d714031561332bf7377ff01b 100644 (file)
--- a/main.js
+++ b/main.js
@@ -681,7 +681,10 @@ function animate(game, renderer, scene) {
         if(game.timeProgress >= 3.0 && game.timeProgress <= 4.0) {
           game.ui.root.querySelector('.ui-page.title .footer').style.opacity = easeInOut(Math.max(0.0, Math.min(1.0, game.timeProgress - 3.0))).toFixed(2);
         }
-        if(game.timeProgress > 4.0) {
+        if(game.timeProgress > 4.0 && !game.ui.reachedStart) {
+          game.ui.root.querySelector('.ui-page.title h1').removeAttribute('style');
+          game.ui.root.querySelectorAll('.ui-page.title button').forEach(btn => { btn.disabled = false; btn.removeAttribute('style'); });
+          game.ui.root.querySelector('.ui-page.title .footer').removeAttribute('style');
           game.ui.reachedStart = true;
         }
       }