-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
91 lines (86 loc) · 2.65 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sand Pile</title>
</head>
<body>
<div class="app">
<div class="left">
<div class="config">
<h3>Config</h3>
<label>
<span>Radius:</span>
<input id="radius" type="number"></input>
</label>
<label>
<span>Topple Threshold:</span>
<input id="toppleThreshold" type="number"></input>
</label>
<label>
<span>Max Cell Grains:</span>
<input id="maxCellGrains" type="number"></input>
</label>
<label>
<span>Cell Size:</span>
<input id="cellSize" type="number"></input>
</label>
<label>
<span>Pen Size:</span>
<input id="penSize" type="number"></input>
</label>
<label>
<span>Pen Weight:</span>
<input id="penWeight" type="number"></input>
</label>
<label>
<span>Cell Color:</span>
<input id="cellColor" type="color"></input>
</label>
<label>
<span>Cell Background Color:</span>
<input id="cellBackgroundColor" type="color"></input>
</label>
<button id="shareConfig">Share</button>
</div>
<div class="examples">
<h3>Examples</h3>
<button id="exampleCircle">Circle</button>
<button id="exampleFill">Fill</button>
<button id="exampleCheckerboard">Checkerboard</button>
<button id="exampleMandelbrot">Mandelbrot</button>
<label class="polygon">
<button id="examplePolygon">Polygon</button>
<span>Sides:</span>
<input id="examplePolygonSides" type="number" value="6" min="3" max="128"></input>
</label>
<button id="exampleNoise">Noise</button>
</div>
<div class="stats">
<h3>Stats</h3>
<div><canvas id="chart"></canvas></div>
<div>
<span>Iterations: </span>
<span id="iterations">0</span>
</div>
<div>
<span>Total sand grains: </span>
<span id="totalSand">0</span>
</div>
</div>
</div>
<div class="main">
<div class="controls">
<button id="start">Start ▶️</button>
<button id="stop" disabled>Stop ⏹️</button>
<button id="stepOnce">Step Once ⏯️</button>
<button id="stepAll">Step All ⏭️</button>
<button id="download">Download ⬇️</button>
</div>
<canvas id="canvas"></canvas>
</div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>