diff options
author | Minteck <nekostarfan@gmail.com> | 2021-06-10 20:04:31 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-06-10 20:04:31 +0200 |
commit | 3e62534eb7db3011ef540b6053811d48761dda21 (patch) | |
tree | 3c812ba3717ba38a1f1efa712d6200e2cae79e0a | |
parent | 634dc4c860993963e6f5f9847eaf1ddc5f213ec3 (diff) | |
download | kartik-client-3e62534eb7db3011ef540b6053811d48761dda21.tar.gz kartik-client-3e62534eb7db3011ef540b6053811d48761dda21.tar.bz2 kartik-client-3e62534eb7db3011ef540b6053811d48761dda21.zip |
Cutefox Studios
-rw-r--r-- | index.html | 3 | ||||
-rw-r--r-- | online/server.json | 2 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | sfx/newintro.mp3 | bin | 0 -> 47762 bytes | |||
-rw-r--r-- | views/common/banner.gif | bin | 0 -> 96319 bytes | |||
-rw-r--r-- | views/loader.html | 11 | ||||
-rw-r--r-- | views/script/core_viewer.js | 1 | ||||
-rw-r--r-- | views/script/loader_global.js | 96 |
8 files changed, 75 insertions, 40 deletions
@@ -17,6 +17,9 @@ </script> </head> <body style="background:#000000;margin:0;height:100%;width:100%;zoom:1.2;"> + <div id="dummyloader" style="display:flex;align-items:center;justify-content:center;position:fixed;z-index:1;inset: 0;height: 100%;background:#fed1ae;overflow:hidden;"> + <img src="logo/itch/banner.jpg" style="height:100%;width:auto;"> + </div> <div style="height: 64px;position: fixed;bottom: 10px;left: 0;background-image: url(./logo/newloader.svg);width: 100000000px;background-size: contain;animation-name: loading;animation-direction: reverse;animation-fill-mode: forwards;animation-timing-function: linear;animation-duration: 5000s;animation-iteration-count: infinite;opacity: .5;"></div> <style> @keyframes loading { diff --git a/online/server.json b/online/server.json index 905621c..19726bf 100644 --- a/online/server.json +++ b/online/server.json @@ -1,4 +1,4 @@ { - "hostname": "kartik.hopto.org", + "hostname": "192.168.1.51", "port": 8448 } diff --git a/package.json b/package.json index 7056680..f1485c6 100644 --- a/package.json +++ b/package.json @@ -1 +1 @@ -{"name":"kartik","version":"ba7cd43","channel":"git","description":"A multiplatform 2D karting game","main":"app.js","dependencies":{"@electron/remote":"^1.0.4","discord-rpc":"^3.2.0","electron":"^12.0.1","ini":"^1.3.8","jquery":"^3.6.0","os-locale":"^5.0.0","uuid":"^8.3.2","yaml":"^1.10.2"},"scripts":{"test":"node_modules\\electron\\dist\\electron.exe app.js"},"author":"Minteck Projects","license":"UNLICENSED","serial":"XXX99999999999"}
\ No newline at end of file +{"name":"kartik","version":"634dc4c","channel":"git","description":"A multiplatform 2D karting game","main":"app.js","dependencies":{"@electron/remote":"^1.0.4","discord-rpc":"^3.2.0","electron":"^12.0.1","ini":"^1.3.8","jquery":"^3.6.0","os-locale":"^5.0.0","uuid":"^8.3.2","yaml":"^1.10.2"},"scripts":{"test":"node_modules\\electron\\dist\\electron.exe app.js"},"author":"Minteck Projects","license":"GPL-3.0-or-later","serial":"XXX99999999999"}
\ No newline at end of file diff --git a/sfx/newintro.mp3 b/sfx/newintro.mp3 Binary files differnew file mode 100644 index 0000000..b209f4d --- /dev/null +++ b/sfx/newintro.mp3 diff --git a/views/common/banner.gif b/views/common/banner.gif Binary files differnew file mode 100644 index 0000000..e65d463 --- /dev/null +++ b/views/common/banner.gif diff --git a/views/loader.html b/views/loader.html index c1db38b..9e100bb 100644 --- a/views/loader.html +++ b/views/loader.html @@ -21,15 +21,12 @@ } </script> - <div style="display:flex;align-items:center;justify-content:center;inset: 0;height: 100%;"> - <img src="../logo/vendor.png" id="vendor" style="width:128px;transform: scale(1);transition: transform 200ms;"> + <img id="imgpreload" src="common/banner.gif" style="height:100%;width:auto;opacity:0;position:fixed;pointer-events:none;"> + <div style="display:flex;align-items:center;justify-content:center;inset: 0;height: 100%;background:#fed1ae;overflow:hidden;"> + <img id="banner" src="../logo/itch/banner.jpg" style="height:100%;width:auto;"> </div> <script> - if (native) { - document.write(`<div style="position: fixed;bottom: 20px;right: 20px;font-size: 12px;padding: 10px 20px;background: lightblue;border-radius: 5px;transition: all 200ms;" id="updates">${lang.updates.wait}</div>`); - } else { - document.write(`<div style="position: fixed;bottom: 20px;right: 20px;font-size: 12px;padding: 10px 20px;background: black;border: 1px solid white;border-radius: 5px;transition: all 200ms;color:white;" id="updates">Kartik <b>Mobile</b></div>`); - } + document.write(`<div style="position: fixed;bottom: 20px;right: 20px;font-size: 12px;padding: 10px 20px;background: lightblue;border-radius: 5px;transition: all 200ms;display:none;" id="updates">${lang.updates.wait}</div>`); </script> <div id="warning" style="opacity:0;transition:opacity 200ms;position: fixed;background: darkred;color: white;padding: 20px 10px;max-width: 40vw;text-align: center;border-radius: 10px;left: 20vw;top: 30vh;"><h2><script>document.write(lang.updates.warn[0]);</script></h2><p><script>document.write(lang.updates.warn[1]);</script></p></div> diff --git a/views/script/core_viewer.js b/views/script/core_viewer.js index d22ada9..389bf41 100644 --- a/views/script/core_viewer.js +++ b/views/script/core_viewer.js @@ -1,6 +1,7 @@ const webview = document.getElementById('wb'); webview.addEventListener('dom-ready', () => { + document.getElementById('dummyloader').style.display = "none"; require('@electron/remote').getCurrentWindow().log(" * " + webview.getURL()); try { if (require('@electron/remote').getCurrentWindow().debug) { diff --git a/views/script/loader_global.js b/views/script/loader_global.js index 67016d9..6bde06c 100644 --- a/views/script/loader_global.js +++ b/views/script/loader_global.js @@ -2,8 +2,6 @@ window.addEventListener('load', () => { setTimeout(() => { if (native) { setTimeout(() => { - document.getElementById('vendor').style.transform = "scale(3)"; - new Audio("../sfx/intro.mp3").play(); setTimeout(() => { if (native) {global.$ = require('jquery');} else {var script = document.createElement('script');script.src = '../webinit/jquery.js';script.type = 'text/javascript';document.getElementsByTagName('head')[0].appendChild(script);} $("#progress").fadeOut(500); @@ -27,46 +25,75 @@ window.addEventListener('load', () => { } } setTimeout(() => { - $("body").fadeOut(500); - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 3000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 2000) }).catch((e) => { console.warn(e); document.getElementById('updates').style.backgroundColor = "lightcoral"; document.getElementById('updates').innerText = lang.updates.error; setTimeout(() => { - $("body").fadeOut(500); - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 3000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 2000) }); }).catch((e) => { console.warn(e); document.getElementById('updates').style.backgroundColor = "lightcoral"; document.getElementById('updates').innerText = lang.updates.error; setTimeout(() => { - $("body").fadeOut(500); - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 3000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 2000) }); }).catch((e) => { console.warn(e); document.getElementById('updates').style.backgroundColor = "lightcoral"; document.getElementById('updates').innerText = lang.updates.error; setTimeout(() => { - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 3000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 2000) }); }, 2000) }, 3000) @@ -74,12 +101,19 @@ window.addEventListener('load', () => { } else { if (native) {global.$ = require('jquery');} else {var script = document.createElement('script');script.src = '../webinit/jquery.js';script.type = 'text/javascript';document.getElementsByTagName('head')[0].appendChild(script);} setTimeout(() => { - $("body").fadeOut(500); - setTimeout(() => { - info("LoadWindow", "Switching control to MenuWindow"); - location.href = "intro.html"; - }, 1000) - }, 8000); + document.getElementById('banner').style.width = "380px"; + document.getElementById('banner').style.height = "auto"; + document.getElementById('banner').src = "common/banner.gif"; + introsfx = new Audio("../sfx/newintro.mp3"); + introsfx.play() + introsfx.onended = () => { + $("body").fadeOut(500); + setTimeout(() => { + info("LoadWindow", "Switching control to MenuWindow"); + location.href = "intro.html"; + }, 1000) + } + }, 5000) } }, 2000) }) |