-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfloor-is-lava.html
149 lines (136 loc) · 3.85 KB
/
floor-is-lava.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<html>
<head>
<meta charset="UTF-8">
<title>CPSC 314 Project 3 January 2016</title>
<style>
body {
margin: 0;
overflow: hidden
}
#minimap {
position: fixed;
width: 15em;
height: 15em;
margin: 0.5em;
opacity: 0.9;
}
#minimap>canvas {
width: 100%;
height: 100%;
border-radius: 0.5em;
border: solid;
border-color: #dd3388;
}
#canvas {
width: 100%;
height: 100%;
}
#fps {
background: #000000;
color: #dbc994;
font-family: sans-serif;
padding: 1em;
}
#fps-count {
display: inline-block;
}
#health {
display: inline-block;
float: right;
}
.heart {
position: relative;
top: -0.2em;
display: inline-block;
height: 1.7em;
}
#play {
position: absolute;
top: 50%;
border-radius: 1em;
border-color: #000000;
margin: auto;
background: #000000;
color: #dbc994;
}
.reload {
border-radius: 1em;
border-color: #ffff00;
background: #000000;
color: #ffff00;
}
.play-wrapper {
text-align: center;
}
#instructions, #loading {
padding: 2.5em;
font-family: sans-serif;
text-align: center;
color: #888888;
}
#lost, #won {
position: absolute;
bottom: 10%;
width: 100%;
padding-top: 15%;
padding-bottom: 15%;
text-align: center;
background-color: #000000;
color: #ffffff;
font-family: sans-serif;
font-size: 1em;
opacity: 0.8;
}
.lava-height {
display: inline-block;
}
</style>
</head>
<body>
<div id="fps">
Frames per second: <div id="fps-count">0</div>
<div id="health">
<img class="heart" src="img/heart.png">
<img class="heart" src="img/heart.png">
<img class="heart" src="img/heart.png">
<img class="heart" src="img/heart.png">
<img class="heart" src="img/heart.png">
</div>
</div>
<div id="minimap"></div>
<p id="instructions">
<b>The floor is lava!</b>
<br>
Find and click the lava wheel to drain it out.
<br>
<br>
F11 (fullscreen) for best results.
<br><em>WASD</em> to move. <em>Spacebar</em> to jump. <em>Mouse</em> to pan camera</p>
<div class="play-wrapper">
<p id="loading">Loading...</p>
<button hidden id="play" onclick="runGame()"> Play</button>
</div>
<div id="canvas"></div>
<div hidden id="lost">
You died a fiery death surrounded by fire-proof Ikea furniture :( <br>
The lava got to a height of <div class="lava-height"></div>!
<p><button class="reload" onclick="window.location.reload()">Restart Game</button></p>
</div>
<div hidden id="won">
You managed to flush out all the lava! Congrats :D <br>
The lava got to a height of <div class="lava-height"></div>!
<p><button class="reload" onclick="window.location.reload()">Restart Game</button></p>
</div>
<script src="js/three.js"></script>
<script src="js/OBJLoader.js"></script>
<script src="js/SourceLoader.js"></script>
<script src="js/OrbitControls.js"></script>
<script src="js/KeyboardState.js"></script> <!-- By Jerome Etienne: http://jetienne.com/ -->
<script src="js/SubdivisionModifier.js"></script> <!-- https://github.com/mrdoob/three.js/blob/master/examples/js/modifiers/SubdivisionModifier.js -->
<script src="js/TGALoader.js"></script>
<script src="js/jquery.min.js"></script>
<script src="shader-specs.js"></script>
<script src="game-setup.js"></script>
<script src="floor-is-lava.js"></script>
</body>
</html>