-
Notifications
You must be signed in to change notification settings - Fork 0
/
stub.html
117 lines (91 loc) · 3.69 KB
/
stub.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<meta charset="ascii">
<!--
Offline mode build of celeste-wasm (https://github.com/MercuryWorkshop/celeste-wasm)
To correctly download this file on github, right click on this page of code and press 'Save As...'
To correctly download this file on google drive, press the download button at the top right of the screen near the picture of your google account photo
-->
<html>
<link rel="stylesheet" href="BASE64LOAD:text/css:styles.css:">
<body>
<style>
body {
color: #fff;
background-color: #000;
display: flex;
align-items: center;
justify-content: center;
}
#interstitial {
display: flex;
justify-content: flex-start;
align-items: center;
gap: 0.5em;
height: 100vh;
width: 40vw;
font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
font-size: 1.2rem;
padding: 3em;
color: var(--fg);
background-color: var(--bg);
}
img {
image-rendering: pixelated;
width: 100px;
height: 100px;
}
</style>
<!-- put temporary body before any large files load -->
<div id="interstitial">
<h1 style="display: flex; align-items: center;">
<img src="BASE64LOAD:image/x-icon:assets/app.ico:" alt="Celeste Logo"> Loading...
</h1>
<script>
if (!localStorage["vfs_populated"]) {
document.querySelector("h3").append("This may take a very long time (>5 minutes) for the first load. Subsequent loads will be faster.");
}
</script>
</div>
</body>
<head>
<!-- wasm.pak is much smaller and will not be cached -->
<script id="wasm_pak" type="application/json">SEDHERE_IMPORTS</script>
<!-- we can load the real frontend now -->
<title>CelesteWasm - SINGLEFILE</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Inter+Tight:ital,wght@0,100..900;1,100..900&family=Inter:[email protected]&family=Material+Symbols+Rounded&display=swap"
rel="stylesheet" />
<link rel="icon" type="image/x-icon" href="BASE64LOAD:image/x-icon:assets/app.ico:">
<link rel="prefetch" id="mountainsrc" href="BASE64LOAD:image/png:assets/mountain.png:">
<script src="BASE64LOAD:text/javascript:cfg.js:"></script>
<script src="BASE64LOAD:text/javascript:zstd.js:"></script>
<script src="BASE64LOAD:text/javascript:wasm.pak.size.js:"></script>
<script src="BASE64LOAD:text/javascript:data.js:"></script>
<script src="BASE64LOAD:text/javascript:singlefileloader.js:"></script>
<script>
let modscripts = "BASE64LOAD:text/javascript:bundlesingle.js:";
</script>
<!-- order of the scripts is very intentional. if we're storing the game data in IDB we won't need the rest of the html file. we can tell the browser to stop parsing it, which will cut off everything after this script -->
<script>
if (localStorage["vfs_populated"]) {
// magical window.stop()! the browser won't have to parse the rest of the html file. i think this is the first time anyone has ever used this
window.stop();
unpak_wasm().then(() => {
// domcontentloaded never fires, meaning modules never load so we have to manually
import(modscripts);
});
}
</script>
<script id="game_data" type="application/json">SEDHERE_GAME_DATA</script>
<script>
document.querySelector("h1").innerText = "Decompressing game data...";
unpak_wasm().then(() => {
loadfrompacked().then(() => {
// we don't want to show the frontend until it can be parsed
import(modscripts);
});
});
</script>
</head>
</html>