-
Notifications
You must be signed in to change notification settings - Fork 34
/
index.html
56 lines (56 loc) · 1.71 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
<!DOCTYPE html>
<html>
<head>
<title>WebGL Game of Life</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="gol.css"/>
<script src="lib/igloo-0.1.0.js"></script>
<script src="lib/jquery-2.1.1.min.js"></script>
<script src="js/gol.js"></script>
</head>
<body>
<h1>WebGL Game of Life</h1>
<!-- Canvas dimensions must be powers of two. -->
<canvas id="life" width="1024" height="512"></canvas>
<div class="description">
<p>
This Game of Life simulation is running entirely on your
graphics card. The simulation state swaps back and forth
between two texture buffers in the GPU's memory.
</p>
<h2>Controls</h2>
<ul>
<li>
<span class="input">Left-click</span>
<span class="result">draw live cells</span>
</li>
<li>
<span class="input">Middle/right-click</span>
<span class="result">draw dead cells</span>
</li>
<li>
<span class="input">[SPACE]</span>
<span class="result">toggle pause/play</span>
</li>
<li>
<span class="input">[r]</span>
<span class="result">reset to random state</span>
</li>
<li>
<span class="input">[DEL]</span>
<span class="result">clear the simulation state</span>
</li>
<li>
<span class="input">s</span>
<span class="result">snapshot the simulation state</span>
</li>
<li>
<span class="input">shift+s</span>
<span class="result">restore from snapshot</span>
</li>
</ul>
</div>
<div class="fps">
</div>
</body>
</html>