-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
77 lines (76 loc) · 2.93 KB
/
index.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
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | AngryBots</title>
<link rel="stylesheet" href="TemplateData/style.css">
<link rel="shortcut icon" href="TemplateData/favicon.ico" />
<script src="TemplateData/UnityProgress.js"></script>
</head>
<body class="template">
<p class="header"><span>Unity WebGL Player | </span>AngryBots</p>
<div class="template-wrap clear">
<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" height="600px" width="938px"></canvas>
<div class="logo"></div>
<div class="fullscreen"><img src="TemplateData/fullscreen.png" width="38" height="38" alt="Fullscreen" title="Fullscreen" onclick="SetFullscreen(1);" /></div>
<div class="title">AngryBots</div>
</div>
<p class="footer">« created with <a href="http://unity3d.com/" title="Go to unity3d.com">Unity</a> »</p>
<script type='text/javascript'>
// connect to canvas
var Module = {
filePackagePrefixURL: "Release/",
memoryInitializerPrefixURL: "Release/",
preRun: [],
postRun: [],
print: (function() {
return function(text) {
console.log (text);
};
})(),
printErr: function(text) {
console.error (text);
},
canvas: document.getElementById('canvas'),
progress: null,
setStatus: function(text) {
if (this.progress == null)
{
if (typeof UnityProgress != 'function')
return;
this.progress = new UnityProgress (canvas);
}
if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
if (text === Module.setStatus.text) return;
this.progress.SetMessage (text);
var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
if (m)
this.progress.SetProgress (parseInt(m[2])/parseInt(m[4]));
if (text === "")
this.progress.Clear()
},
totalDependencies: 0,
monitorRunDependencies: function(left) {
this.totalDependencies = Math.max(this.totalDependencies, left);
Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
}
};
Module.setStatus('Downloading (0.0/1)');
</script>
<script src="Release/UnityConfig.js"></script>
<script src="Release/fileloader.js"></script>
<script src="Release/asmjsunpack.js"></script>
<script>
var asmModule;
unpackAsmJS('AngryBots-asm.packed.js', 'Release/asmjsunpack-worker.js').then(function(unpackedAsmModule) {
asmModule = unpackedAsmModule;
var script = document.createElement('script');
script.src = "Release/AngryBots-glue.js";
document.body.appendChild(script);
}, function(reason) {
console.log("Failed to unpack asm.js: " + reason);
});
</script>
</body>
</html>