forked from gn-math/html
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path186.html
More file actions
83 lines (74 loc) · 2.74 KB
/
186.html
File metadata and controls
83 lines (74 loc) · 2.74 KB
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
<!DOCTYPE html>
<html lang="en-us"><head>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-');
</script>
<base href="https://cdn.jsdelivr.net/gh/gn-math/assets@main/186/">
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Ragdoll Archers</title>
<link rel="stylesheet" href="style.css">
<body>
<div id="unity-container" class="unity-desktop">
<canvas id="unity-canvas"></canvas>
</div>
<div id="loading-cover">
<div id="unity-loading-bar">
<div id="unity-logo"><img src="logo.jpeg"></div>
<div class="progress-spinner-container">
<div class="spinner-left"><img src="spinner.png"></div>
<div id="unity-progress-bar-empty">
<div id="unity-progress-bar-full"></div>
</div>
<div class="spinner-right"><img src="spinner.png"></div>
</div>
</div>
</div>
<script>
const buildUrl = "Build";
const loaderUrl = buildUrl + "/v111.loader.js";
const config = {
dataUrl: buildUrl + "/6697b6deba8b617c67b69c55dcd07cb1.data.unityweb",
frameworkUrl: buildUrl + "/0be3c3ee7115b26e1ae28e643afdf1f2.js.unityweb",
codeUrl: buildUrl + "/b3397c29f6878557c1c614cbf9e196ea.wasm.unityweb",
streamingAssetsUrl: "StreamingAssets",
companyName: "Ericetto",
productName: "Ragdoll Archers",
productVersion: "0.1",
};
const container = document.querySelector("#unity-container");
const canvas = document.querySelector("#unity-canvas");
const loadingCover = document.querySelector("#loading-cover");
const progressBarEmpty = document.querySelector("#unity-progress-bar-empty");
const progressBarFull = document.querySelector("#unity-progress-bar-full");
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
container.className = "unity-mobile";
}
loadingCover.style.display = "";
const unityLoader = document.createElement("script");
unityLoader.src = loaderUrl;
unityLoader.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarEmpty.style.display = "";
progressBarFull.style.width = `${100 * progress}%`;
}).then((unityInstance) => {
window.unityInstance = unityInstance;
loadingCover.style.display = "none";
}).catch((message) => {
alert(message);
});
};
document.body.appendChild(unityLoader);
document.addEventListener("pointerdown", () => {
container.focus();
window.focus();
canvas.focus();
});
</script>
</body></html>