offline version fix

This commit is contained in:
ParadoxGitHub 2023-03-13 21:20:47 -04:00
parent bab1b81a9d
commit 94a1b9022a
5 changed files with 3374 additions and 3359 deletions

View File

@ -35,84 +35,91 @@ Compile it yourself here: https://gitlab.com/lax1dude/eaglercraftx-1.8/
<meta property="og:type" content="website" />
<meta property="og:title" content="EaglercraftX 1.8 Offline" />
<meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass" />
<style>
html {
font-family: sans-serif;
text-align: center;
}
<style>
html {
font-family: sans-serif;
text-align: center;
}
#progresstext {
font-weight: bold;
top: 30vh;
position: relative;
font-size: 1.75vw;
}
#progresstext {
font-weight: bold;
top: 30vh;
position: relative;
font-size: 1.75vw;
}
#clienttitle {
position: relative;
top: 20vh;
font-size: 5.5vw;
}
#clienttitle {
position: relative;
top: 20vh;
font-size: 5.5vw;
}
#clientversion {
position: relative;
top: 15vh;
font-size: 2.5vw;
color: gray;
}
#clientversion {
position: relative;
top: 15vh;
font-size: 2.5vw;
color: gray;
}
#progress {
width: 10%;
height: 7.5vh;
display: block;
border-radius: 10vw;
background-color: black;
transition: all 0.5s;
margin-top: -2.8vh;
margin-left: -1.3vw;
}
#progress {
width: 10%;
height: 7.5vh;
display: block;
border-radius: 10vw;
background-color: black;
transition: all 0.5s;
margin-top: -2.8vh;
margin-left: -1.3vw;
}
#meter {
width: 80vw;
margin:auto;
top: 28vh;
height: 2vh;
position: relative;
border: 0.65vw solid black;
border-radius: 20vw;
padding: 1.15vw;
}
#ratio {
position: relative;
top: 13vh;
font-size: 2vh;
font-family: sans-serif;
}
#dividk {
background-color: white;
position: absolute;
top: 0px;
left: 0px;
width: 100vw;
height: 100vh;
}
</style>
<script type="text/javascript">
function updateTextProgress(progress, total){
document.getElementById("progresstext").innerText = Math.round(progress/total*100) + "%" + "(" + progress + "MB" + "/" + total + "MB )";
}
function setVersion(version){
document.getElementById("clientversion").innerText = version;
}
function setBarProg(event, epkSize){
let progress = Math.round(event.loaded/1024/1024);
let size = Math.round(epkSize/1024/1024);
document.getElementById("progress").style.width = (Math.round(progress/size*100)+4)+"%";
updateTextProgress(progress, size);
}
#meter {
width: 80vw;
margin:auto;
top: 28vh;
height: 2vh;
position: relative;
border: 0.65vw solid black;
border-radius: 20vw;
padding: 1.15vw;
}
function die(){
document.getElementById( "dividk" ).style.display = "none";
}
#dividk {
background-color: white;
position: absolute;
top: 0px;
left: 0px;
width: 100vw;
height: 100vh;
}
</style>
<script type="text/javascript">
function updateTextProgress(event, epkSize){
document.getElementById("progresstext").innerText = Math.round(event.loaded/epkSize*10000)/100 + "%" + "(" + Math.round(event.loaded/1024/1024) + "MB" + "/" + Math.round(epkSize/1024/1024) + "MB )";
}
function setVersion(version){
document.getElementById("clientversion").innerText = version;
}
function setBarProg(event, epkSize){
let progress = Math.round(event.loaded/1024/1024);
let size = Math.round(epkSize/1024/1024);
document.getElementById("progress").style.width = (Math.round(progress/size*100)+4)+"%";
updateTextProgress(event, epkSize);
}
</script>
function die(){
document.getElementById( "dividk" ).style.display = "none";
}
</script>
<script type="text/javascript">
"use strict";
@ -137,9 +144,16 @@ window.addEventListener("load", () => {
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxI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dSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" />
</head>
<body style="margin:0px;width:100vw;height:100vh;overflow:hidden;" id="game_frame">
<div id = "dividk">
<h1 id="clienttitle">Resent Client</h1>
<h2 id="clientversion">3.6</h2>
<div id = "dividk">
<h1 id="clienttitle">Resent Client</h1>
<h2 id="clientversion">3.6</h2>
<p id="progresstext">0%</p>
<p id="ratio">use <a href="./badwifi/index.html">this link</a> if your internet is bad</p>
<div id="meter">
<span style="width: 0%" id="progress"></span>
</div>
</div>
</body>
</html>

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -78,6 +78,7 @@ public class PlatformRuntime {
static WebGLFramebuffer mainFramebuffer = null;
public static void create() {
setClientVersion(ClientInfo.version);
win = Window.current();
doc = win.getDocument();
@ -304,7 +305,7 @@ public class PlatformRuntime {
int epkSize = Integer.parseInt(request.getResponseHeader("content-length"));
Event event = evt;
setClientVersion(ClientInfo.version);
setBarProgress(event, epkSize);
}catch (Exception e){
e.printStackTrace();