-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
66 lines (50 loc) · 1.73 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
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="life.css" />
<title>Conway's Game Of Life in HTML5</title>
<header class="shaded top left right">
<h1>Conway's Game Of Life</h1>
<p>
Implemented in plain JS & CSS.
No external libraries or images used.<br/>
Safari/Chrome required for 3D animation.
</p>
</header>
<div id="viewport"></div>
<div id="cyclecount" class="dynamic"></div>
<div id="controls" class="shaded bottom left right">
<div class="btn-group">
<button id="btn-start" class="two-state"
data-keycode="32"
data-action="ui.cb_start">
<div class="play">Play <span>Space</span></div>
<div class="pause">Pause <span>Space</span></div>
</button>
<button id="btn-step"
data-keycode="13"
data-action="ui.cb_step">
Step <span>Return</span>
</button>
<button id="btn-stop" disabled
data-keycode="27"
data-action="ui.cb_stop">
Reset <span>ESC</span>
</button>
</div>
<div class="param">
<label for="param-gridsize">Grid size</label>
<input id="param-gridsize" type="range" value="16" min="8" max="32" step="4" data-action="ui.cb_gridsize" />
<div class="dynamic">16×16</div>
</div>
<div class="param">
<label for="param-density">Density</label>
<input id="param-density" type="range" value="30" min="5" max="50" step="5" data-action="ui.cb_density" />
<div class="dynamic">30%</div>
</div>
<div class="param">
<label for="param-freq">Freq</label>
<input id="param-freq" type="range" value="1" min="1" max="4" step="1" data-action="ui.cb_freq" />
<div class="dynamic">1 Hz</div>
</div>
</div>
<script src="life.js" type="text/javascript"></script>