244 lines
6.6 KiB
HTML
244 lines
6.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-us">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
|
<title>Geometry Dash</title>
|
|
<style>
|
|
html {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
*, *:before, *:after {
|
|
box-sizing: inherit;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
background: #444;
|
|
}
|
|
|
|
#gameContainer {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
}
|
|
|
|
canvas {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: block;
|
|
}
|
|
|
|
/* try to handle mobile dialog */
|
|
canvas + * {
|
|
z-index: 2;
|
|
}
|
|
|
|
.logo {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 10;
|
|
object-fit: cover;
|
|
object-position: bottom;
|
|
}
|
|
|
|
.progress {
|
|
margin: 1.5em;
|
|
width: 420px;
|
|
height: 32px;
|
|
display: none;
|
|
position: absolute;
|
|
z-index: 100;
|
|
background-image: url(./slider.png);
|
|
bottom: 85px;
|
|
background-size: contain;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
border-radius: 35px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress .full {
|
|
height: 16px;
|
|
background-image: url(./sliderBar.png);
|
|
background-repeat-y: no-repeat;
|
|
top: 50%;
|
|
}
|
|
|
|
.progress_border_parent {
|
|
position: absolute;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 22;
|
|
}
|
|
|
|
.progress_child {
|
|
position: absolute;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: start;
|
|
width: 100%;
|
|
height: 100%;
|
|
border-radius: 32px;
|
|
overflow: hidden;
|
|
padding: 0 5px;
|
|
z-index: 1;
|
|
}
|
|
|
|
#loader {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background-color: black;
|
|
}
|
|
|
|
.spinner,
|
|
.spinner:after {
|
|
border-radius: 50%;
|
|
width: 5em;
|
|
height: 5em;
|
|
}
|
|
|
|
.spinner {
|
|
margin: 10px;
|
|
font-size: 10px;
|
|
position: relative;
|
|
text-indent: -9999em;
|
|
border-top: 1.1em solid rgba(255, 255, 255, 0.2);
|
|
border-right: 1.1em solid rgba(255, 255, 255, 0.2);
|
|
border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);
|
|
border-left: 1.1em solid #ffffff;
|
|
transform: translateZ(0);
|
|
animation: spinner-spin 1.1s infinite linear;
|
|
}
|
|
|
|
@keyframes spinner-spin {
|
|
0% {
|
|
transform: rotate(0deg);
|
|
}
|
|
100% {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
svg:not(:root) {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.main-svg-sprite {
|
|
display: none
|
|
}
|
|
|
|
.svg-icon {
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
width: 24px;
|
|
height: 24px;
|
|
fill: currentColor;
|
|
font-size: 0
|
|
}
|
|
|
|
.svg-icon__link {
|
|
vertical-align: top;
|
|
fill: inherit;
|
|
width: inherit;
|
|
height: inherit
|
|
}
|
|
a.info{
|
|
font-weight: 900;
|
|
position: absolute;
|
|
height: 50px;
|
|
border: 0;
|
|
box-shadow: 2px 1px 20px 0 rgba(0, 0, 0, 0.5);
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
background: #ffc500;
|
|
font-size: 1em;
|
|
color: #161717;
|
|
transition: all 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.3s cubic-bezier(0.455, 0.03, 0.515, 0.955), box-shadow 0.3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
|
|
overflow: hidden;
|
|
left: 20px;
|
|
top: 20px;
|
|
width: 50px;
|
|
border-radius: 50%;
|
|
z-index: 1000;
|
|
padding: 12px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="gameContainer"></div>
|
|
<a href="https://geometrydashlite.co/" class="info" target="_blank"><span class="svg-icon " aria-hidden="true"><svg class="svg-icon__link"><use xlink:href="#icon-info"></use></svg></span></a>
|
|
<div id="loader">
|
|
<img class="logo" src="logo.png?v=1">
|
|
<div class="spinner"></div>
|
|
<div class="progress">
|
|
<div class="progress_border_parent">
|
|
<img class="progress_border_img" src="./slider.png">
|
|
</div>
|
|
<div class="progress_child">
|
|
<div class="full"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<svg class="main-svg-sprite main-svg-sprite--icons" xmlns="http://www.w3.org/2000/svg"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<symbol id="icon-info" viewBox="0 0 32 32">
|
|
<path d="M14 9.5c0-0.825 0.675-1.5 1.5-1.5h1c0.825 0 1.5 0.675 1.5 1.5v1c0 0.825-0.675 1.5-1.5 1.5h-1c-0.825 0-1.5-0.675-1.5-1.5v-1z"></path>
|
|
<path d="M20 24h-8v-2h2v-6h-2v-2h6v8h2z"></path>
|
|
<path d="M16 0c-8.837 0-16 7.163-16 16s7.163 16 16 16 16-7.163 16-16-7.163-16-16-16zM16 29c-7.18 0-13-5.82-13-13s5.82-13 13-13 13 5.82 13 13-5.82 13-13 13z"></path>
|
|
</symbol>
|
|
</svg>
|
|
</body>
|
|
|
|
|
|
<script src="Build/UnityLoader.js"></script>
|
|
<script>
|
|
UnityLoader.compatibilityCheck = function (e, t, r) {
|
|
t();
|
|
};
|
|
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/geo.json", {onProgress: UnityProgress});
|
|
|
|
function UnityProgress(gameInstance, progress) {
|
|
|
|
//if (!gameInstance.Module) {
|
|
//return;
|
|
//}
|
|
|
|
const loader = document.querySelector("#loader");
|
|
let percent_progress = progress * 100;
|
|
|
|
if (!gameInstance.progress) {
|
|
const progress = document.querySelector("#loader .progress");
|
|
progress.style.display = "block";
|
|
gameInstance.progress = progress.querySelector(".full");
|
|
loader.querySelector(".spinner").style.display = "none";
|
|
|
|
}
|
|
|
|
gameInstance.progress.style.width = `${percent_progress}%`;
|
|
if (progress === 1 && !gameInstance.removeTimeout) {
|
|
gameInstance.removeTimeout = setTimeout(function () {
|
|
loader.style.display = "none";
|
|
}, 2000);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
</html>
|
|
|