mirror of
https://gitlab.com/skysthelimit.dev/selenite.git
synced 2025-06-16 02:22:07 -05:00
Update semag/geomelt/index.html
This commit is contained in:
parent
2840d229fb
commit
bd18064bf2
@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<link rel="stylesheet" href="game.css">
|
||||
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
|
||||
<style type="text/css">@font-face {font-family:Fredoka;font-style:normal;font-weight:400;src:url(/cf-fonts/v/fredoka/5.0.11/hebrew/wght/normal.woff2);unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;font-display:swap;}@font-face {font-family:Fredoka;font-style:normal;font-weight:400;src:url(/cf-fonts/v/fredoka/5.0.11/latin/wght/normal.woff2);unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;font-display:swap;}@font-face {font-family:Fredoka;font-style:normal;font-weight:400;src:url(/cf-fonts/v/fredoka/5.0.11/latin-ext/wght/normal.woff2);unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;font-display:swap;}@font-face {font-family:Fredoka;font-style:normal;font-weight:500;src:url(/cf-fonts/v/fredoka/5.0.11/hebrew/wght/normal.woff2);unicode-range:U+0590-05FF,U+200C-2010,U+20AA,U+25CC,U+FB1D-FB4F;font-display:swap;}@font-face {font-family:Fredoka;font-style:normal;font-weight:500;src:url(/cf-fonts/v/fredoka/5.0.11/latin/wght/normal.woff2);unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;font-display:swap;}@font-face {font-family:Fredoka;font-style:normal;font-weight:500;src:url(/cf-fonts/v/fredoka/5.0.11/latin-ext/wght/normal.woff2);unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;font-display:swap;}</style>
|
||||
<title>Geometry Dash Meltdown</title>
|
||||
<link rel="canonical" href="https://geometrydash.io/" data-react-helmet="true">
|
||||
@ -48,107 +48,107 @@
|
||||
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" data-cf-beacon='{"rayId":"8624f0a54ce47d24","version":"2024.2.4","r":1,"token":"98ca8b3a4cb64c358353a6a2d2089624","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
<script src="Build/UnityLoader.js"></script>
|
||||
<script>
|
||||
UnityLoader.compatibilityCheck = function (e, t, r) { t(); };
|
||||
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/geometrmeltdown.json", { onProgress: UnityProgress });
|
||||
const gameContainer = document.getElementById("gameContainer");
|
||||
var progressElement = document.getElementById('p1');
|
||||
function UnityProgress(gameInstance, progress) {
|
||||
if (!gameInstance.Module) {
|
||||
return;
|
||||
}
|
||||
const loader = document.querySelector("#loader");
|
||||
if (!gameInstance.progress) {
|
||||
const progress = document.querySelector("#loader .progress");
|
||||
gameContainer.style.display = "none";
|
||||
progress.style.display = "block";
|
||||
loader.querySelector(".spinner").style.display = "none";
|
||||
}
|
||||
progressElement.value = progress;
|
||||
if (progress === 1 && !gameInstance.removeTimeout) {
|
||||
gameInstance.removeTimeout = setTimeout(function () {
|
||||
loader.style.display = "none";
|
||||
gameContainer.style.display = "block";
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
<script>
|
||||
UnityLoader.compatibilityCheck = function (e, t, r) { t(); };
|
||||
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/geometrmeltdown.json", { onProgress: UnityProgress });
|
||||
const gameContainer = document.getElementById("gameContainer");
|
||||
var progressElement = document.getElementById('p1');
|
||||
function UnityProgress(gameInstance, progress) {
|
||||
if (!gameInstance.Module) {
|
||||
return;
|
||||
}
|
||||
const loader = document.querySelector("#loader");
|
||||
if (!gameInstance.progress) {
|
||||
const progress = document.querySelector("#loader .progress");
|
||||
gameContainer.style.display = "none";
|
||||
progress.style.display = "block";
|
||||
loader.querySelector(".spinner").style.display = "none";
|
||||
}
|
||||
progressElement.value = progress;
|
||||
if (progress === 1 && !gameInstance.removeTimeout) {
|
||||
gameInstance.removeTimeout = setTimeout(function () {
|
||||
loader.style.display = "none";
|
||||
gameContainer.style.display = "block";
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
window.onload = (event) => {
|
||||
Resize();
|
||||
screen.orientation.addEventListener("change", function(e) {
|
||||
tapOrClick(e);
|
||||
});
|
||||
};
|
||||
window.onresize = function () {
|
||||
Resize();
|
||||
};
|
||||
var theElement = document.getElementById("gameContainer");
|
||||
theElement.addEventListener("mouseup", tapOrClick, false);
|
||||
theElement.addEventListener("touchend", tapOrClick, false);
|
||||
|
||||
function Resize() {
|
||||
if (screen.availHeight > screen.availWidth) {
|
||||
|
||||
document.getElementById('alert_rotate').classList.remove('hidden');
|
||||
// document.getElementById('gameContainer').classList.add('rotated');
|
||||
} else {
|
||||
// document.getElementById('gameContainer').classList.remove('rotated');
|
||||
document.getElementById('alert_rotate').classList.add('hidden');
|
||||
}
|
||||
const innerWidth = window.innerWidth;
|
||||
const innerHeight = window.innerHeight;
|
||||
const loader = document.getElementById("loader");
|
||||
const progress = document.querySelector("#loader .pos_progress");
|
||||
const container = document.querySelector(".container");
|
||||
|
||||
const ratio = 1.77778;
|
||||
if (innerHeight > innerWidth) {
|
||||
container.style.display = "flex";
|
||||
loader.style.width = innerWidth + 'px';
|
||||
}
|
||||
else {
|
||||
container.style.display = "none";
|
||||
if ((innerWidth / innerHeight) > ratio) {
|
||||
loader.style.width = innerHeight * ratio + 'px';
|
||||
}
|
||||
else {
|
||||
loader.style.width = '100%';
|
||||
}
|
||||
}
|
||||
loader.style.top = (innerHeight - loader.offsetHeight) / 2 + 'px';
|
||||
progress.style.top = loader.offsetHeight * 0.90 + 'px';
|
||||
}
|
||||
|
||||
function tapOrClick(event) {
|
||||
fullScreenAPI();
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
function fullScreenAPI(){
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
var isAndroid = ua.indexOf("android") > -1;
|
||||
if(isAndroid) {
|
||||
GoFullScreen(document.documentElement);
|
||||
}
|
||||
}
|
||||
|
||||
function GoFullScreen(element) {
|
||||
if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {
|
||||
if (element.requestFullscreen && document.fullscreenEnabled) {
|
||||
element.requestFullscreen();
|
||||
}
|
||||
else if (element.mozRequestFullScreen) {
|
||||
element.mozRequestFullScreen();
|
||||
}
|
||||
else if (element.webkitRequestFullscreen) {
|
||||
element.webkitRequestFullscreen();
|
||||
}
|
||||
else if (element.msRequestFullscreen) {
|
||||
element.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
<script>
|
||||
window.onload = (event) => {
|
||||
Resize();
|
||||
screen.orientation.addEventListener("change", function(e) {
|
||||
tapOrClick(e);
|
||||
});
|
||||
};
|
||||
window.onresize = function () {
|
||||
Resize();
|
||||
};
|
||||
var theElement = document.getElementById("gameContainer");
|
||||
theElement.addEventListener("mouseup", tapOrClick, false);
|
||||
theElement.addEventListener("touchend", tapOrClick, false);
|
||||
|
||||
function Resize() {
|
||||
if (screen.availHeight > screen.availWidth) {
|
||||
|
||||
document.getElementById('alert_rotate').classList.remove('hidden');
|
||||
// document.getElementById('gameContainer').classList.add('rotated');
|
||||
} else {
|
||||
// document.getElementById('gameContainer').classList.remove('rotated');
|
||||
document.getElementById('alert_rotate').classList.add('hidden');
|
||||
}
|
||||
const innerWidth = window.innerWidth;
|
||||
const innerHeight = window.innerHeight;
|
||||
const loader = document.getElementById("loader");
|
||||
const progress = document.querySelector("#loader .pos_progress");
|
||||
const container = document.querySelector(".container");
|
||||
|
||||
const ratio = 1.77778;
|
||||
if (innerHeight > innerWidth) {
|
||||
container.style.display = "flex";
|
||||
loader.style.width = innerWidth + 'px';
|
||||
}
|
||||
else {
|
||||
container.style.display = "none";
|
||||
if ((innerWidth / innerHeight) > ratio) {
|
||||
loader.style.width = innerHeight * ratio + 'px';
|
||||
}
|
||||
else {
|
||||
loader.style.width = '100%';
|
||||
}
|
||||
}
|
||||
loader.style.top = (innerHeight - loader.offsetHeight) / 2 + 'px';
|
||||
progress.style.top = loader.offsetHeight * 0.90 + 'px';
|
||||
}
|
||||
|
||||
function tapOrClick(event) {
|
||||
fullScreenAPI();
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
function fullScreenAPI(){
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
var isAndroid = ua.indexOf("android") > -1;
|
||||
if(isAndroid) {
|
||||
GoFullScreen(document.documentElement);
|
||||
}
|
||||
}
|
||||
|
||||
function GoFullScreen(element) {
|
||||
if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {
|
||||
if (element.requestFullscreen && document.fullscreenEnabled) {
|
||||
element.requestFullscreen();
|
||||
}
|
||||
else if (element.mozRequestFullScreen) {
|
||||
element.mozRequestFullScreen();
|
||||
}
|
||||
else if (element.webkitRequestFullscreen) {
|
||||
element.webkitRequestFullscreen();
|
||||
}
|
||||
else if (element.msRequestFullscreen) {
|
||||
element.msRequestFullscreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user