Skip to content

Commit 5989469

Browse files
authored
Add files via upload
1 parent 9abc988 commit 5989469

17 files changed

+87
-0
lines changed
1.84 MB
Binary file not shown.

Build/Gravity Trails WebGL.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"companyName": "DefaultCompany",
3+
"productName": "Gravity Trails",
4+
"productVersion": "0.1",
5+
"dataUrl": "Gravity Trails WebGL.data.unityweb",
6+
"wasmCodeUrl": "Gravity Trails WebGL.wasm.code.unityweb",
7+
"wasmFrameworkUrl": "Gravity Trails WebGL.wasm.framework.unityweb",
8+
"graphicsAPI": ["WebGL 2.0","WebGL 1.0"],
9+
"webglContextAttributes": {"preserveDrawingBuffer": false},
10+
"splashScreenStyle": "Dark",
11+
"backgroundColor": "#231F20",
12+
"cacheControl": {"default": "must-revalidate"},
13+
"developmentBuild": false,
14+
"multithreading": false,
15+
"unityVersion": "2019.4.32f1"
16+
}
4.47 MB
Binary file not shown.
Binary file not shown.

Build/UnityLoader.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TemplateData/UnityProgress.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
function UnityProgress(unityInstance, progress) {
2+
if (!unityInstance.Module)
3+
return;
4+
if (!unityInstance.logo) {
5+
unityInstance.logo = document.createElement("div");
6+
unityInstance.logo.className = "logo " + unityInstance.Module.splashScreenStyle;
7+
unityInstance.container.appendChild(unityInstance.logo);
8+
}
9+
if (!unityInstance.progress) {
10+
unityInstance.progress = document.createElement("div");
11+
unityInstance.progress.className = "progress " + unityInstance.Module.splashScreenStyle;
12+
unityInstance.progress.empty = document.createElement("div");
13+
unityInstance.progress.empty.className = "empty";
14+
unityInstance.progress.appendChild(unityInstance.progress.empty);
15+
unityInstance.progress.full = document.createElement("div");
16+
unityInstance.progress.full.className = "full";
17+
unityInstance.progress.appendChild(unityInstance.progress.full);
18+
unityInstance.container.appendChild(unityInstance.progress);
19+
}
20+
unityInstance.progress.full.style.width = (100 * progress) + "%";
21+
unityInstance.progress.empty.style.width = (100 * (1 - progress)) + "%";
22+
if (progress == 1)
23+
unityInstance.logo.style.display = unityInstance.progress.style.display = "none";
24+
}

TemplateData/favicon.ico

13 KB
Binary file not shown.

TemplateData/fullscreen.png

345 Bytes
Loading

TemplateData/progressEmpty.Dark.png

155 Bytes
Loading

TemplateData/progressEmpty.Light.png

159 Bytes
Loading

TemplateData/progressFull.Dark.png

137 Bytes
Loading

TemplateData/progressFull.Light.png

142 Bytes
Loading

TemplateData/progressLogo.Dark.png

2.29 KB
Loading

TemplateData/progressLogo.Light.png

2.21 KB
Loading

TemplateData/style.css

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.webgl-content * {border: 0; margin: 0; padding: 0}
2+
.webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
3+
4+
.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
5+
.webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;}
6+
.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;}
7+
.webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;}
8+
.webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;}
9+
10+
.webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');}
11+
.webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');}
12+
.webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');}
13+
14+
.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px;}
15+
.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;}
16+
.webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;}
17+
.webgl-content .footer .title {margin-right: 10px; float: right;}
18+
.webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;}

TemplateData/webgl-logo.png

3.5 KB
Loading

index.html

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en-us">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6+
<title>Unity WebGL Player | Gravity Trails</title>
7+
<link rel="shortcut icon" href="TemplateData/favicon.ico">
8+
<link rel="stylesheet" href="TemplateData/style.css">
9+
<script src="TemplateData/UnityProgress.js"></script>
10+
<script src="Build/UnityLoader.js"></script>
11+
<script>
12+
var unityInstance = UnityLoader.instantiate("unityContainer", "Build/Gravity Trails WebGL.json", {onProgress: UnityProgress});
13+
</script>
14+
</head>
15+
<body>
16+
<div class="webgl-content">
17+
<div id="unityContainer" style="width: 960px; height: 600px"></div>
18+
<div class="footer">
19+
<div class="webgl-logo"></div>
20+
<div class="fullscreen" onclick="unityInstance.SetFullscreen(1)"></div>
21+
<div class="title">Gravity Trails</div>
22+
</div>
23+
</div>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)