Skip to content

Commit 63eaa75

Browse files
author
Nathan Shin
authored
Add files via upload
1 parent 61feed5 commit 63eaa75

17 files changed

+83
-0
lines changed

Build/UnityLoader.js

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

Build/walljwanparty.data.unityweb

2.03 MB
Binary file not shown.

Build/walljwanparty.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"companyName": "Nathan.Shin",
3+
"productName": "Wall.Game",
4+
"dataUrl": "walljwanparty.data.unityweb",
5+
"wasmCodeUrl": "walljwanparty.wasm.code.unityweb",
6+
"wasmFrameworkUrl": "walljwanparty.wasm.framework.unityweb",
7+
"TOTAL_MEMORY": 268435456,
8+
"graphicsAPI": ["WebGL 2.0", "WebGL 1.0"],
9+
"webglContextAttributes": {"preserveDrawingBuffer": false},
10+
"splashScreenStyle": "Dark",
11+
"backgroundColor": "#231F20"
12+
}
3.49 MB
Binary file not shown.
85.3 KB
Binary file not shown.

TemplateData/UnityProgress.js

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

index2.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 | Wall.Game</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 gameInstance = UnityLoader.instantiate("gameContainer", "Build/walljwanparty.json", {onProgress: UnityProgress});
13+
</script>
14+
</head>
15+
<body>
16+
<div class="webgl-content">
17+
<div id="gameContainer" style="width: 960px; height: 600px"></div>
18+
<div class="footer">
19+
<div class="webgl-logo"></div>
20+
<div class="fullscreen" onclick="gameInstance.SetFullscreen(1)"></div>
21+
<div class="title">Wall.Game</div>
22+
</div>
23+
</div>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)