36 lines
1.4 KiB
HTML
36 lines
1.4 KiB
HTML
<html>
|
|
<head>
|
|
<title>The Game of Life: HTML Canvas Demo</title>
|
|
<script language="javascript" src="life.js"></script>
|
|
</head>
|
|
<body onResize="canvas_resize();">
|
|
Speed: <select id="speed" onChange="change_speed();">
|
|
<option value="1">1 Hz</option>
|
|
<option value="2">2 Hz</option>
|
|
<option value="4">4 Hz</option>
|
|
<option value="8">8 Hz</option>
|
|
<option value="16">16 Hz</option>
|
|
<option value="32">32 Hz</option>
|
|
<option value="64">64 Hz</option>
|
|
</select>
|
|
Density: <select id="density" onChange="canvas_resize();">
|
|
<option value="3">X-Small</option>
|
|
<option value="5">Small</option>
|
|
<option value="10">Medium</option>
|
|
<option value="15">Large</option>
|
|
<option value="20">X-Large</option>
|
|
</select>
|
|
Effects: <select id="effects" onChange="effects=parseInt(this.value); redraw();">
|
|
<option value="0">None (black and white)</option>
|
|
<option value="1">Color age (Rainbow)</option>
|
|
</select>
|
|
<input type="button" id="control-btn" onClick="control_click(); return false;" />
|
|
|
|
<small style="margin-left:20px">Dan Ballard (2011) <<a href="mailto:dan@mindstab.net">dan@mindstab.net</a>></small>
|
|
<input style="left:775px; position: absolute;" type="button" value="Clear" onClick="cells = gen_cells(); redraw();" />
|
|
<br/>
|
|
<canvas id="board" onClick="board_click(event);" width="800" height="400" style="/*width: 100%; height: 100%*/"></canvas>
|
|
</body>
|
|
</html>
|
|
|