peytonplayz585-shadow-3.0/javascript/index.html

172 lines
23 KiB
HTML
Raw Normal View History

2023-08-26 14:31:51 -07:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="EaglercraftX 1.8 test directory HTML page" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>EaglercraftX 1.8</title>
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="EaglercraftX 1.8" />
<meta property="og:description" content="test directory HTML page" />
<link type="image/png" rel="shortcut icon" href="favicon.png" />
<script type="text/javascript" src="classes.js"></script>
<script type="text/javascript" src="controller.js"></script>
2023-08-26 14:31:51 -07:00
<script type="text/javascript" src="fix-webm-duration.js"></script>
2024-01-21 18:47:43 -08:00
<style>
#loadingScreen {
transition: background-color 0.4s;
position: absolute;
left: 0px;
top: 0px;
width: 100vw;
height: 100vh;
background-color: white;
}
#logo {
transition: all 0.4s;
position: absolute;
width: 50%;
left: 50vw;
top: 50vh;
transform: translate(-50%, -50%);
}
#mojangLogo{
transition: all 0.4s;
position: absolute;
width: 50%;
left: 50vw;
top: 50vh;
transform: translate(-50%, -50%);
filter: invert(100%);
opacity: 0;
}
#progressBar{
transition: opacity 0.2s;
border: solid 5px black;
position: relative;
width: 80vw;
height: 30px;
left: 50vw;
top:-10%;
border-radius: 30px;
transform: translateX(-50%);
}
#progressBarInside{
transition: width 0.2s;
width:0%;
height:100%;
background-color: black;
border-radius: 30px;
}
#progress{
transition: all 0.4s;
position: relative;
top: -15%;
text-align: center;
font-family: sans-serif;
}
#kys{
width: 100px;
height: 80vh;
}
</style>
<script>
let hasUserInteractionHappened = false;
document.addEventListener("DOMContentLoaded", () => {
document.body.addEventListener("click", () => {
hasUserInteractionHappened = true;
});
});
function updateLoadingScreen(evt){
let percent = Math.round((evt.loaded / evt.total)*100);
let loadedMB = Math.round((evt.loaded/1024)/1024);
let totalMB = Math.round((evt.total/1024)/1024);
document.getElementById("progress").innerText = "Downloading assets: "+percent+"% ("+loadedMB+"MB / "+totalMB+"MB)";
document.getElementById("progressBarInside").style.width = percent+"%";
}
function showDecompressing(){
document.getElementById("progressBar").style.opacity = "0%";
document.getElementById("progress").innerText = "Decompressing assets...";
}
function showEnableScreen(){
if (!hasUserInteractionHappened){
document.getElementById("logo").style.width = "75%";
document.getElementById("logo").style.top = "30vh";
document.getElementById("progress").style.top = "-25%";
document.getElementById("progress").innerText = "Click anywhere on the screen to start Shadow Client!";
}
}
function showEaglerLoadingScreen(){
document.getElementById("progress").innerText = "Loading Minecraft...";
document.getElementById("logo").style.width = "50%";
document.getElementById("logo").style.top = "50vh";
document.getElementById("progress").style.top = "-15%";
}
function showMojangScreen() {
document.getElementById("loadingScreen").style.backgroundColor = "#f0323e";
document.getElementById("logo").style.opacity = "0";
document.getElementById("mojangLogo").style.opacity = "100%";
document.getElementById("progress").style.color = "white";
}
function die() {
// wait for actual mojang screen to die
setTimeout(() => {
document.getElementById("progress").style.opacity = "0";
document.getElementById("mojangLogo").style.transition = "all 0.8s";
document.getElementById("mojangLogo").style.width = "300%";
document.getElementById("loadingScreen").style.transition = "all 0.4s";
document.getElementById("loadingScreen").style.opacity = "0";
setTimeout(() => {
document.getElementById("loadingScreen").style.display = "none";
}, 400);
}, 500);
}
function returnHasUserInteractionHappened(){
return hasUserInteractionHappened;
}
</script>
2023-08-26 14:31:51 -07:00
<script type="text/javascript">
"use strict";
window.addEventListener("load", () => {
if(document.location.href.startsWith("file:")) {
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
}else {
window.eaglercraftXOpts = {
container: "game_frame",
assetsURI: "assets.epk",
localesURI: "lang/",
servers: [
{ addr: "ws://localhost:8081/", name: "Local test server" }
]
};
var q = window.location.search;
if(typeof q === "string" && q.startsWith("?")) {
q = new URLSearchParams(q);
var s = q.get("server");
if(s) window.eaglercraftXOpts.joinServer = s;
}
main();
}
});
</script>
</head>
<body style="marg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