-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
123 lines (108 loc) · 3.64 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html>
<head>
<title>The Key Grab</title>
<link rel="stylesheet" type="text/css" src="css/css-reset.css"/>
<style type="text/css">
body {
background-color: #0f0f0f;
text-align: center;
margin: 0;
}
canvas {
background-color: #0f0f0f;
display: block;
opacity: 0.0;
-webkit-transition: opacity 0.8s ease-in;
-moz-transition: opacity 0.8s ease-in;
-o-transition: opacity 0.8s ease-in;
transition: opacity 0.8s ease-in;
}
canvas.opaque {
opacity: 1.0;
}
#health {
position: absolute;
width: 100%;
height: 100%;
z-index: 10;
background-color: #330000;
opacity: 0.0;
pointer-events:none;
-webkit-transition: background-color 500ms ease-out 0.5s, color 500ms ease-out 1s;
-moz-transition: background-color 500ms ease-out 0.5s, color 500ms ease-out 1s;
-o-transition: background-color 500ms ease-out 0.5s, color 500ms ease-out 1s;
transition: background-color 500ms ease-out 0.5s, color 500ms ease-out 1s;
color: rgba(0, 0, 0, 0);
font-size: 4em;
font-family: sans-serif;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#health.darkness {
background-color: #0f0f0f;
color: rgba(255, 255, 255, 255);
opacity: 1;
}
#win {
position: absolute;
width: 100%;
height: 100%;
z-index: 10;
background-color: #0f0f0f;
opacity: 0.0;
pointer-events:none;
-webkit-transition: opacity 500ms ease-out, color 500ms ease-out 1s;
-moz-transition: opacity 500ms ease-out, color 500ms ease-out 1s;
-o-transition: opacity 500ms ease-out, color 500ms ease-out 1s;
transition: opacity 500ms ease-out, color 500ms ease-out 1s;
color: rgba(0, 0, 0, 0);
font-size: 4em;
font-family: sans-serif;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#win.winner {
color: rgba(255, 255, 255, 255);
opacity: 1;
}
sm {
font-size: 0.25em;
}
me {
font-size: 0.5em;
}
</style>
<script type="text/javascript" src="js/lib/three.min.js"></script>
<script type="text/javascript" src="js/lib/stats.js"></script>
<script type="text/javascript" src="js/lib/PointerLockControls.js"></script>
<script type="text/javascript" src="js/three-helper.js"></script>
<script type="text/javascript" src="js/game-constants.js"></script>
<script type="text/javascript" src="js/particle-effect.js"></script>
<script type="text/javascript" src="js/room.js"></script>
<script type="text/javascript" src="js/player.js"></script>
<script type="text/javascript" src="js/key.js"></script>
<script type="text/javascript" src="js/laser.js"></script>
<script type="text/javascript" src="js/skeleton.js"></script>
<script type="text/javascript" src="js/torch.js"></script>
<script type="text/javascript" src="js/game.js"></script>
</head>
<body>
<div id="health">
<div style="text-align: center;">
GAME OVER<br /><me>Press space to restart.</me><br /><sm>(Press escape to release mouse)</sm>
</div>
</div>
<div id="win">
<div style="text-align: center;">
YOU WIN<br /><me>Press space to restart.</me><br /><sm>(Press escape to release mouse)</sm>
</div>
</div>
</body>
</html>