-
Notifications
You must be signed in to change notification settings - Fork 0
/
duo.html
81 lines (77 loc) · 3.1 KB
/
duo.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
<!DOCTYPE html>
<html lang="en-us">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-B0SKSRDZQK"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-B0SKSRDZQK');
</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>BitNaughts</title>
<link rel="shortcut icon" type="image/x-icon" href="assets/bnico.ico">
<link rel="stylesheet" href="TemplateData/style.css">
</head>
<body style="background-color: rgba(0, 0, 0)">
<div id="unity-container" class="unity-desktop">
<canvas id="unity-canvas"></canvas>
<div id="unity-loading-bar">
<div id="unity-logo"></div>
<div id="unity-progress-bar-empty">
<div id="unity-progress-bar-full"></div>
</div>
</div>
<div id="unity-footer">
<!-- <div id="unity-webgl-logo"></div> -->
<div id="unity-fullscreen-button"></div>
<div id="unity-build-title"><a href="https://github.com/bitnaughts" style="color:white; font-family: 'Abstract Slab'; font-weight: normal; font-style: normal;font-size: 30px">github.com/bitnaughts</a></div></div>
</div>
</div>
<script>
var buildUrl = "Build";
var loaderUrl = buildUrl + "/06242024-webgl.loader.js";
var config = {
dataUrl: buildUrl + "/06242024-webgl.data.unityweb",
frameworkUrl: buildUrl + "/06242024-webgl.framework.js.unityweb",
codeUrl: buildUrl + "/06242024-webgl.wasm.unityweb",
streamingAssetsUrl: "StreamingAssets",
companyName: "BitNaughts",
productName: "BitNaughts",
productVersion: "1",
};
var container = document.querySelector("#unity-container");
var canvas = document.querySelector("#unity-canvas");
var loadingBar = document.querySelector("#unity-loading-bar");
var progressBarFull = document.querySelector("#unity-progress-bar-full");
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
container.className = "unity-mobile";
config.devicePixelRatio = 2;
} else {
container.className = "unity-mobile";
// canvas.style.width = "1910px";
// canvas.style.height = "880px";
}
loadingBar.style.display = "block";
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
loadingBar.style.display = "none";
fullscreenButton.onclick = () => {
unityInstance.SetFullscreen(1);
};
}).catch((message) => {
alert(message);
});
};
document.body.appendChild(script);
</script>
</body>
</html>