forked from geometrylite/geometrylite.github.io
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
162 lines (146 loc) · 5.8 KB
/
index.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!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">
<link rel="stylesheet" href="game.css?v=1.1.5">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500&display=swap" rel="stylesheet">
<title>Gorilla Adventure</title>
<style type="text/css">
.jss1:before {
top: 0;
width: 100%;
filter: blur(16px);
height: 100%;
content: "";
display: block;
opacity: .5;
z-index: 0;
position: absolute;
background-size: cover;
background-image: url("background.png")
}
</style>
</head>
<body>
<a href="https://gorillaadventure.io/" 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="gameContainer" style="display: none;">
<canvas id="#canvas"></canvas>
</div>
<div id="loadingBlock" style="">
<div class="jss31 jss34 jss1">
<div class="spinner"></div>
<div class="jss31 jss34 jss48" style="flex: 1 1 0%;">
<div class="jss32">
<div class="jss7 jss9 jss20 jss3">
<div class="jss125">
<div class="jss123">
<img src="1games.png">
</div>
</div>
</div>
</div>
</div>
<div class="jss31 jss34" style="flex: 3 1 0%;">
<div class="jss32">
<div class="jss31 jss34 jss39 jss50 gameloader">
<div class="jss32">
<div class="gameloader-game-name">Gorilla Adventure</div>
</div>
<div class="jss32">
<div class="jss32 gameloader-logo">
<img id="game-logo" src="background.png">
</div>
</div>
<div class="jss32">
<div>
<div class="gameloader-progressbar">
<div class="gameloader-progressbar-progress" id="progress_fill"
style="width: 10%;"></div>
</div>
<div class="gameloader-progress-info">Game Loading...</div>
</div>
</div>
</div>
</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>
var buildUrl = "./Build_gorilla_adventure";
var loaderUrl = buildUrl + "/gorilla-adventure.loader.js";
var config = {
dataUrl: buildUrl + "/gorilla-adventure.data.unityweb",
frameworkUrl: buildUrl + "/gorilla-adventure.framework.js.unityweb",
codeUrl: buildUrl + "/gorilla-adventure.wasm.unityweb",
streamingAssetsUrl: "StreamingAssets",
companyName: "1games.io",
productName: "Gorilla Adventure",
productVersion: "1.4",
};
var progressElement = document.getElementById('progress_fill');
var container = document.getElementById("gameContainer");
var canvas = document.getElementById("#canvas");
var loadingBar = document.querySelector("#loadingBlock");
var progressBarFull = document.querySelector("#progress_fill");
var progress_text = document.querySelector(".gameloader-progress-info");
let text_percent = "";
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressElement.style.width = 100 * progress + "%";
text_percent = "Downloading file: " + Math.round(progress*100) + "%";
progress_text.innerText = text_percent;
if (progress >= 99) {
progress_text.innerText = "Game Loading ...";
}
}).then((unityInstance) => {
window.unityInstance = unityInstance;
setTimeout(function() {
loadingBar.style.display = "none";
}, 2000);
container.style.display = "block";
}).catch((message) => {
alert(message);
});
};
document.body.appendChild(script);
</script>
<script src="https://www.gstatic.com/firebasejs/10.9.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.9.0/firebase-firestore-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.9.0/firebase-auth-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.9.0/firebase-analytics-compat.js"></script>
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.9.0/firebase-app.js";
import { getAnalytics } from "https://www.gstatic.com/firebasejs/10.9.0/firebase-analytics.js";
import { getAuth } from "https://www.gstatic.com/firebasejs/10.9.0/firebase-auth.js";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "AIzaSyDbg-gcbf0pH6fZzr5nIoNflnKNfTX5V6M",
authDomain: "games-geometry-lite.firebaseapp.com",
projectId: "games-geometry-lite",
storageBucket: "games-geometry-lite.appspot.com",
messagingSenderId: "23510219032",
appId: "1:23510219032:web:ad4c17e42228739bd9c66d",
measurementId: "G-9QZ1HGBJR6"
};
// Initialize Firebase
const app = firebase.initializeApp(firebaseConfig);
const auth = getAuth(app);
</script>
</html>