From 73864d898c3fb3cb0d9a8e3060ae01e780774d48 Mon Sep 17 00:00:00 2001 From: Minteck Date: Fri, 27 Aug 2021 19:18:42 +0200 Subject: Sleek new loading screen --- index.html | 15 +- logo/iridium.png | Bin 0 -> 1443 bytes online/global.js | 8 + online/server.json | 2 +- typescript/builder.js | 4 +- views/common/banner.gif | Bin 96319 -> 0 bytes views/common/old/Josefin Sans 100.ttf | Bin 58400 -> 0 bytes views/common/old/Josefin Sans 100italic.ttf | Bin 62460 -> 0 bytes views/common/old/Josefin Sans 200.ttf | Bin 58568 -> 0 bytes views/common/old/Josefin Sans 200italic.ttf | Bin 62708 -> 0 bytes views/common/old/Josefin Sans 300italic.ttf | Bin 62676 -> 0 bytes views/common/old/Josefin Sans 500.ttf | Bin 58560 -> 0 bytes views/common/old/Josefin Sans 500italic.ttf | Bin 62792 -> 0 bytes views/common/old/Josefin Sans 600.ttf | Bin 58580 -> 0 bytes views/common/old/Josefin Sans 600italic.ttf | Bin 62820 -> 0 bytes views/common/old/Josefin Sans 700italic.ttf | Bin 62568 -> 0 bytes views/common/old/Josefin Sans italic.ttf | Bin 62660 -> 0 bytes views/common/old/bold~.ttf | Bin 134916 -> 0 bytes views/common/old/light~.ttf | Bin 135420 -> 0 bytes views/common/old/regular~.ttf | Bin 135304 -> 0 bytes views/game.html | 1 + views/loader.html | 9 +- views/loader.svg | 128 -- views/loader/back.png | Bin 67643 -> 0 bytes views/loader/logo.png | Bin 165369 -> 0 bytes views/menu.html | 11 +- views/rain/rainscript.js | 44 - views/rain/rainstyle.css | 155 -- views/script/game_music.js | 6 +- views/script/loader_global.js | 3 + views/script/menu_login.js | 4 - views/script/menu_music.js | 2 +- views/splash.png | Bin 209449 -> 0 bytes views/splash.svg | 2831 +++++++++++++++++++++++++++ 34 files changed, 2870 insertions(+), 353 deletions(-) create mode 100644 logo/iridium.png delete mode 100644 views/common/banner.gif delete mode 100644 views/common/old/Josefin Sans 100.ttf delete mode 100644 views/common/old/Josefin Sans 100italic.ttf delete mode 100644 views/common/old/Josefin Sans 200.ttf delete mode 100644 views/common/old/Josefin Sans 200italic.ttf delete mode 100644 views/common/old/Josefin Sans 300italic.ttf delete mode 100644 views/common/old/Josefin Sans 500.ttf delete mode 100644 views/common/old/Josefin Sans 500italic.ttf delete mode 100644 views/common/old/Josefin Sans 600.ttf delete mode 100644 views/common/old/Josefin Sans 600italic.ttf delete mode 100644 views/common/old/Josefin Sans 700italic.ttf delete mode 100644 views/common/old/Josefin Sans italic.ttf delete mode 100644 views/common/old/bold~.ttf delete mode 100644 views/common/old/light~.ttf delete mode 100644 views/common/old/regular~.ttf delete mode 100644 views/loader.svg delete mode 100644 views/loader/back.png delete mode 100644 views/loader/logo.png delete mode 100644 views/rain/rainscript.js delete mode 100644 views/rain/rainstyle.css delete mode 100644 views/splash.png create mode 100644 views/splash.svg diff --git a/index.html b/index.html index 72bb82c..aac4e9f 100644 --- a/index.html +++ b/index.html @@ -28,7 +28,7 @@ -
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Kartik -%version% - - - - - - - diff --git a/views/loader/back.png b/views/loader/back.png deleted file mode 100644 index 4d268cc..0000000 Binary files a/views/loader/back.png and /dev/null differ diff --git a/views/loader/logo.png b/views/loader/logo.png deleted file mode 100644 index 09112ca..0000000 Binary files a/views/loader/logo.png and /dev/null differ diff --git a/views/menu.html b/views/menu.html index 59171d4..4503e20 100644 --- a/views/menu.html +++ b/views/menu.html @@ -48,14 +48,9 @@
  • diff --git a/views/rain/rainscript.js b/views/rain/rainscript.js deleted file mode 100644 index 1dabb23..0000000 --- a/views/rain/rainscript.js +++ /dev/null @@ -1,44 +0,0 @@ -var makeItRain = function() { - //clear out everything - $('.rain').empty(); - - var increment = 0; - var drops = ""; - var backDrops = ""; - - while (increment < 100) { - //couple random numbers to use for various randomizations - //random number between 98 and 1 - var randoHundo = (Math.floor(Math.random() * (98 - 1 + 1) + 1)); - //random number between 5 and 2 - var randoFiver = (Math.floor(Math.random() * (5 - 2 + 1) + 2)); - //increment - increment += randoFiver; - //add in a new raindrop with various randomizations to certain CSS properties - drops += '
    '; - backDrops += '
    '; - } - - $('.rain.front-row').append(drops); - $('.rain.back-row').append(backDrops); -} - -$('.splat-toggle.toggle').on('click', function() { - $('body').toggleClass('splat-toggle'); - $('.splat-toggle.toggle').toggleClass('active'); - makeItRain(); -}); - -$('.back-row-toggle.toggle').on('click', function() { - $('body').toggleClass('back-row-toggle'); - $('.back-row-toggle.toggle').toggleClass('active'); - makeItRain(); -}); - -$('.single-toggle.toggle').on('click', function() { - $('body').toggleClass('single-toggle'); - $('.single-toggle.toggle').toggleClass('active'); - makeItRain(); -}); - -makeItRain(); \ No newline at end of file diff --git a/views/rain/rainstyle.css b/views/rain/rainstyle.css deleted file mode 100644 index fef63cf..0000000 --- a/views/rain/rainstyle.css +++ /dev/null @@ -1,155 +0,0 @@ -.rain { - position: absolute; - left: 0; - width: 100%; - height: 100%; - z-index: 2; -} - -.rain.back-row { - display: none; - z-index: 1; - bottom: 60px; - opacity: 0.5; -} - -body.back-row-toggle .rain.back-row { - display: block; -} - -.drop { - position: absolute; - bottom: 100%; - width: 15px; - height: 120px; - pointer-events: none; - animation: drop 0.5s linear infinite; -} - -@keyframes drop { - 0% { - transform: translateY(0vh); - } - 75% { - transform: translateY(90vh); - } - 100% { - transform: translateY(90vh); - } -} - -.stem { - width: 1px; - height: 60%; - margin-left: 7px; - background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.25)); - animation: stem 0.5s linear infinite; -} - -@keyframes stem { - 0% { - opacity: 1; - } - 65% { - opacity: 1; - } - 75% { - opacity: 0; - } - 100% { - opacity: 0; - } -} - -.splat { - width: 15px; - height: 10px; - border-top: 2px dotted rgba(255, 255, 255, 0.5); - border-radius: 50%; - opacity: 1; - transform: scale(0); - animation: splat 0.5s linear infinite; - display: none; -} - -body.splat-toggle .splat { - display: block; -} - -@keyframes splat { - 0% { - opacity: 1; - transform: scale(0); - } - 80% { - opacity: 1; - transform: scale(0); - } - 90% { - opacity: 0.5; - transform: scale(1); - } - 100% { - opacity: 0; - transform: scale(1.5); - } -} - -.toggles { - position: absolute; - top: 0; - left: 0; - z-index: 3; -} - -.toggle { - position: absolute; - left: 20px; - width: 50px; - height: 50px; - line-height: 51px; - box-sizing: border-box; - text-align: center; - font-family: sans-serif; - font-size: 10px; - font-weight: bold; - background-color: rgba(255, 255, 255, 0.2); - color: rgba(0, 0, 0, 0.5); - border-radius: 50%; - cursor: pointer; - transition: background-color 0.3s; -} - -.toggle:hover { - background-color: rgba(255, 255, 255, 0.25); -} - -.toggle:active { - background-color: rgba(255, 255, 255, 0.3); -} - -.toggle.active { - background-color: rgba(255, 255, 255, 0.4); -} - -.splat-toggle { - top: 20px; -} - -.back-row-toggle { - top: 90px; - line-height: 12px; - padding-top: 14px; -} - -.single-toggle { - top: 160px; -} - -body.single-toggle .drop { - display: none; -} - -body.single-toggle .drop:nth-child(10) { - display: block; -} \ No newline at end of file diff --git a/views/script/game_music.js b/views/script/game_music.js index 2aa7e94..7d43a25 100644 --- a/views/script/game_music.js +++ b/views/script/game_music.js @@ -1,8 +1,8 @@ startHooks.push(() => { info("MusicMgr", "Playing game" + i + ".mp3"); - require('electron').ipcRenderer.send('newmusic', kresources.music['game' + i].file); + if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['game' + i].file); }) if (location.search === "?online") { - require('electron').ipcRenderer.send('newmusic', kresources.music['prepare'].file); -} \ No newline at end of file + if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['prepare'].file); +} diff --git a/views/script/loader_global.js b/views/script/loader_global.js index 81b4dd7..2333db4 100644 --- a/views/script/loader_global.js +++ b/views/script/loader_global.js @@ -2,6 +2,9 @@ const $ = require('jquery'); require('electron').ipcRenderer.on('ready', (e, a) => { document.getElementById("banner-decoration").style.display = ""; + document.getElementById("banner-outer").style.backgroundImage = ""; + document.getElementById("banner-outer").style.backgroundColor = "#042349"; + document.getElementById("banner-contrast").style.display = "none"; setTimeout(() => { if (native) { diff --git a/views/script/menu_login.js b/views/script/menu_login.js index f2d7c7e..57b4bbc 100644 --- a/views/script/menu_login.js +++ b/views/script/menu_login.js @@ -88,7 +88,6 @@ window.addEventListener('load', () => { onlineMode = false; postOnlineMode(); document.getElementById("loginIntro").innerText = lang.polymer.error[2]; - document.getElementById("online").parentElement.parentElement.outerHTML = ""; }) }).catch((e) => { require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.polymer.error[0], message: lang.polymer.error[1]}); @@ -96,7 +95,6 @@ window.addEventListener('load', () => { onlineMode = false; postOnlineMode(); document.getElementById("loginIntro").innerText = lang.polymer.error[2]; - document.getElementById("online").parentElement.parentElement.outerHTML = ""; }) }).catch((e) => { require('@electron/remote').getCurrentWindow().webContents.send("notification", {title: lang.polymer.error[0], message: lang.polymer.error[1]}); @@ -104,7 +102,6 @@ window.addEventListener('load', () => { onlineMode = false; postOnlineMode(); document.getElementById("loginIntro").innerText = lang.polymer.error[2]; - document.getElementById("online").parentElement.parentElement.outerHTML = ""; }) }) @@ -237,6 +234,5 @@ function postOnlineMode() { console.error(e); onlineMode = false; document.getElementById("loginIntro").innerText = lang.polymer.error[2]; - document.getElementById("online").parentElement.parentElement.outerHTML = ""; } } \ No newline at end of file diff --git a/views/script/menu_music.js b/views/script/menu_music.js index f1d23f9..d650478 100644 --- a/views/script/menu_music.js +++ b/views/script/menu_music.js @@ -1,5 +1,5 @@ if (location.search !== "?noreset") { console.log("back"); - require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file); + if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file); } info("MenuWindow", "Menu opened"); diff --git a/views/splash.png b/views/splash.png deleted file mode 100644 index c11ea4d..0000000 Binary files a/views/splash.png and /dev/null differ diff --git a/views/splash.svg b/views/splash.svg new file mode 100644 index 0000000..e9bfac3 --- /dev/null +++ b/views/splash.svg @@ -0,0 +1,2831 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit