Life-Canvas/life.html

36 lines
1.4 KiB
HTML
Raw Permalink Normal View History

2011-06-16 06:30:30 +00:00
<html>
<head>
<title>The Game of Life: HTML Canvas Demo</title>
<script language="javascript" src="life.js"></script>
2011-06-16 06:30:30 +00:00
</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>
2011-06-21 15:59:52 +00:00
<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) &lt;<a href="mailto:dan@mindstab.net">dan@mindstab.net</a>&gt;</small>
2011-06-21 15:49:05 +00:00
<input style="left:775px; position: absolute;" type="button" value="Clear" onClick="cells = gen_cells(); redraw();" />
2011-06-16 06:30:30 +00:00
<br/>
2011-06-21 15:49:05 +00:00
<canvas id="board" onClick="board_click(event);" width="800" height="400" style="/*width: 100%; height: 100%*/"></canvas>
2011-06-16 06:30:30 +00:00
</body>
</html>