Spaces:
Running
Running
Commit
·
12be507
1
Parent(s):
b0dbb4e
Upload 5 files
Browse files- Build/Jammo Robot WEBGL.data +2 -2
- index.html +19 -98
Build/Jammo Robot WEBGL.data
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0a1be90fda6fa6d581ef12cc50ec51238fd8335ebf3f0876a0457206f8cb2fe7
|
3 |
+
size 26324385
|
index.html
CHANGED
@@ -4,116 +4,37 @@
|
|
4 |
<meta charset="utf-8">
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<title>Unity WebGL Player | Jammot</title>
|
7 |
-
<link rel="shortcut icon" href="TemplateData/favicon.ico">
|
8 |
-
<link rel="stylesheet" href="TemplateData/style.css">
|
9 |
</head>
|
10 |
-
<body>
|
11 |
-
<
|
12 |
-
|
13 |
-
<div id="unity-loading-bar">
|
14 |
-
<div id="unity-logo"></div>
|
15 |
-
<div id="unity-progress-bar-empty">
|
16 |
-
<div id="unity-progress-bar-full"></div>
|
17 |
-
</div>
|
18 |
-
</div>
|
19 |
-
<div id="unity-warning"> </div>
|
20 |
-
<div id="unity-footer">
|
21 |
-
<div id="unity-webgl-logo"></div>
|
22 |
-
<div id="unity-fullscreen-button"></div>
|
23 |
-
<div id="unity-build-title">Jammot</div>
|
24 |
-
</div>
|
25 |
-
</div>
|
26 |
<script>
|
27 |
-
var container = document.querySelector("#unity-container");
|
28 |
-
var canvas = document.querySelector("#unity-canvas");
|
29 |
-
var loadingBar = document.querySelector("#unity-loading-bar");
|
30 |
-
var progressBarFull = document.querySelector("#unity-progress-bar-full");
|
31 |
-
var fullscreenButton = document.querySelector("#unity-fullscreen-button");
|
32 |
-
var warningBanner = document.querySelector("#unity-warning");
|
33 |
-
|
34 |
-
// Shows a temporary message banner/ribbon for a few seconds, or
|
35 |
-
// a permanent error message on top of the canvas if type=='error'.
|
36 |
-
// If type=='warning', a yellow highlight color is used.
|
37 |
-
// Modify or remove this function to customize the visually presented
|
38 |
-
// way that non-critical warnings and error messages are presented to the
|
39 |
-
// user.
|
40 |
-
function unityShowBanner(msg, type) {
|
41 |
-
function updateBannerVisibility() {
|
42 |
-
warningBanner.style.display = warningBanner.children.length ? 'block' : 'none';
|
43 |
-
}
|
44 |
-
var div = document.createElement('div');
|
45 |
-
div.innerHTML = msg;
|
46 |
-
warningBanner.appendChild(div);
|
47 |
-
if (type == 'error') div.style = 'background: red; padding: 10px;';
|
48 |
-
else {
|
49 |
-
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
|
50 |
-
setTimeout(function() {
|
51 |
-
warningBanner.removeChild(div);
|
52 |
-
updateBannerVisibility();
|
53 |
-
}, 5000);
|
54 |
-
}
|
55 |
-
updateBannerVisibility();
|
56 |
-
}
|
57 |
-
|
58 |
-
var buildUrl = "Build";
|
59 |
-
var loaderUrl = buildUrl + "/Jammo Robot WEBGL.loader.js";
|
60 |
-
var config = {
|
61 |
-
dataUrl: buildUrl + "/Jammo Robot WEBGL.data",
|
62 |
-
frameworkUrl: buildUrl + "/Jammo Robot WEBGL.framework.js",
|
63 |
-
codeUrl: buildUrl + "/Jammo Robot WEBGL.wasm",
|
64 |
-
streamingAssetsUrl: "StreamingAssets",
|
65 |
-
companyName: "DefaultCompany",
|
66 |
-
productName: "Jammot",
|
67 |
-
productVersion: "0.1",
|
68 |
-
showBanner: unityShowBanner,
|
69 |
-
};
|
70 |
-
|
71 |
-
// By default Unity keeps WebGL canvas render target size matched with
|
72 |
-
// the DOM size of the canvas element (scaled by window.devicePixelRatio)
|
73 |
-
// Set this to false if you want to decouple this synchronization from
|
74 |
-
// happening inside the engine, and you would instead like to size up
|
75 |
-
// the canvas DOM size and WebGL render target sizes yourself.
|
76 |
-
// config.matchWebGLToCanvasSize = false;
|
77 |
-
|
78 |
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
|
79 |
// Mobile device style: fill the whole browser client area with the game canvas:
|
80 |
-
|
81 |
var meta = document.createElement('meta');
|
82 |
meta.name = 'viewport';
|
83 |
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
|
84 |
document.getElementsByTagName('head')[0].appendChild(meta);
|
85 |
-
container.className = "unity-mobile";
|
86 |
-
canvas.className = "unity-mobile";
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
91 |
|
92 |
-
|
93 |
-
} else {
|
94 |
-
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
95 |
-
|
96 |
-
canvas.style.width = "960px";
|
97 |
-
canvas.style.height = "600px";
|
98 |
}
|
99 |
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
};
|
112 |
-
}).catch((message) => {
|
113 |
-
alert(message);
|
114 |
-
});
|
115 |
-
};
|
116 |
-
document.body.appendChild(script);
|
117 |
</script>
|
118 |
</body>
|
119 |
</html>
|
|
|
4 |
<meta charset="utf-8">
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6 |
<title>Unity WebGL Player | Jammot</title>
|
|
|
|
|
7 |
</head>
|
8 |
+
<body style="text-align: center; padding: 0; border: 0; margin: 0;">
|
9 |
+
<canvas id="unity-canvas" width=960 height=600 style="width: 960px; height: 600px; background: #231F20"></canvas>
|
10 |
+
<script src="Build/Jammo Robot WEBGL.loader.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
|
13 |
// Mobile device style: fill the whole browser client area with the game canvas:
|
|
|
14 |
var meta = document.createElement('meta');
|
15 |
meta.name = 'viewport';
|
16 |
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
|
17 |
document.getElementsByTagName('head')[0].appendChild(meta);
|
|
|
|
|
18 |
|
19 |
+
var canvas = document.querySelector("#unity-canvas");
|
20 |
+
canvas.style.width = "100%";
|
21 |
+
canvas.style.height = "100%";
|
22 |
+
canvas.style.position = "fixed";
|
23 |
|
24 |
+
document.body.style.textAlign = "left";
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
|
27 |
+
createUnityInstance(document.querySelector("#unity-canvas"), {
|
28 |
+
dataUrl: "Build/Jammo Robot WEBGL.data",
|
29 |
+
frameworkUrl: "Build/Jammo Robot WEBGL.framework.js",
|
30 |
+
codeUrl: "Build/Jammo Robot WEBGL.wasm",
|
31 |
+
streamingAssetsUrl: "StreamingAssets",
|
32 |
+
companyName: "DefaultCompany",
|
33 |
+
productName: "Jammot",
|
34 |
+
productVersion: "0.1",
|
35 |
+
// matchWebGLToCanvasSize: false, // Uncomment this to separately control WebGL canvas render size and DOM element size.
|
36 |
+
// devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays.
|
37 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
</script>
|
39 |
</body>
|
40 |
</html>
|