-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
35 lines (33 loc) · 1.09 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
<html>
<head>
<title>Cave</title>
<script src="math.js"></script>
<script src="game.js"></script>
</head>
<body style="background-image: url('cave-bg.jpg'); margin: 0; padding: 0" onLoad="init()">
<div id="view">
<svg id="svg" width="99%" height="99%">
<defs>
<radialGradient id="thrustGradient">
<stop offset="0%" stop-color="white"/>
<stop offset="70%" stop-color="cyan"/>
<stop offset="100%" stop-color="black"/>
</radialGradient>
</defs>
<g id="viewport" style="">
<polygon id="cave" fill="black" stroke="gray"/>
<g id="sprites"/>
<circle r="15" id="thrust" fill="url(#thrustGradient)"/>
<polygon id="ship" stroke="white" fill="darkblue"/>
<circle id="shield" fill-opacity="0" stroke="white" stroke-dasharray="4 6"/>
<g id="debug"/>
</g>
<g id="console" fill="black">
<text x="10" y="15" stroke="lightgray">A: turn left, D: turn right,
Shfit: thrust, Space: shield, Enter: fire, P: pause</text>
<text id="msg" x="10" y="400" id="msg" stroke="white">Console</text>
</g>
</svg>
</div>
</body>
</html>