-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (82 loc) · 2.62 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>My project 0.1</title>
<style>
canvas {
/* Full app dimensions. Fit in container */
width: 1280px;
height: 720px;
max-width: 100%;
max-height: 100%;
}
.canvas-app-container {
width: 1280px;
height: 720px;
background: rgb(255,255,255) no-repeat center url("try_game.png");
/* A positioned parent for loading visuals */
position: relative;
/* Firefox fullscreen will resize container to screen. */
text-align: center;
vertical-align: middle;
}
.canvas-app-container:-webkit-full-screen {
/* Auto width and height in Safari/Chrome fullscreen. */
width: auto;
height: auto;
}
.canvas-app-progress {
position: absolute;
background-color: rgb(245, 245, 245);
height: 20px;
/* Fill up container width. */
width: 100%;
bottom: 0px;
}
.canvas-app-progress-bar {
font-size: 12px;
height: 20px;
color: rgb(255, 255, 255);
background-color: rgb(30, 100, 234);
text-align: center;
line-height: 20px;
}
.button {
color: #fff;
background-color: #1e64ea;
border-color: transparent;
padding: 10px 20px;
}
</style>
</head>
<body>
<div id="fb-root"></div>
<div id="app-container" class="canvas-app-container">
<canvas id="canvas" class="canvas-app-canvas" tabindex="1"></canvas>
</div>
<button id="fullscreen" class="button">Fullscreen</button>
<!-- -->
<script type='text/javascript' src="dmloader.js"></script>
<script type='text/javascript' src="dmengine_release.js" async onload=""></script>
<!-- -->
<script type='text/javascript'>
Module.runApp("canvas", "splash_image.png", "archive", "");
/* Fullscreen button */
document.getElementById("fullscreen").onclick = function (e) {
/* Enter fullscreen, don't lock pointer and don't resize canvas down. */
var elem = document.getElementById("app-container");
var rfs = elem.requestFullscreen ||
elem.requestFullScreen ||
elem.mozRequestFullScreen ||
elem.webkitRequestFullscreen ||
(function() {});
rfs.apply(elem, []);
document.getElementById("canvas").focus();
};
</script>
</body>
</html>