forked from jakesgordon/bin-packing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (76 loc) · 2.38 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
<!DOCTYPE HTML>
<html>
<head>
<meta charset='utf-8' />
<title>Bin Packing Algorithm</title>
<link href='css/demo.css' rel='stylesheet' type='text/css' media='screen' />
</head>
<body>
<h1>Bin Packing Algorithm</h1>
<div id="settings">
<div class='examples'>
<label for='examples'>Examples: </label>
<select id='examples'>
<option value='simple'> simple </option>
<option value='square'> square </option>
<option value='tall'> tall </option>
<option value='wide'> wide </option>
<option value='tallwide'> tall and wide </option>
<option value='power2'> powers of 2 </option>
<option value='oddeven'> odd and even </option>
<option value='complex'> complex </option>
</select>
</div>
<div class='blocks'>
<label for='blocks'>Blocks: <span class='example'><b>W</b>x<b>H</b>[x<b>N</b>]</span></label>
<textarea id='blocks' rows=12></textarea>
</div>
<div class='size'>
<label for='size'>size: </label>
<select id='size'>
<option>500x500</option>
<option>800x600</option>
<option selected>automatic</option>
</select>
</div>
<div class='sort'>
<label for='sort'>sort: </label>
<select id='sort'>
<option>none</option>
<option>width</option>
<option>height</option>
<option selected>maxside</option>
<option>area</option>
<option>random</option>
</select>
</div>
<div class='color'>
<label for='color'>color: </label>
<select id='color'>
<option>pastel</option>
<option>basic</option>
<option>gray</option>
<option>vintage</option>
<option>solarized</option>
<option>none</option>
</select>
</div>
<div class="ratio">
Filled: <span id='ratio'>0</span>%
</div>
<div id="nofit" class="nofit">
</div>
</div>
<div id="packing">
<canvas id="canvas">
<div id="unsupported">
Sorry, this example cannot be run because your browser does not support the <canvas> element
</div>
</canvas>
</div>
<script src='js/jquery.js'> </script>
<script src='js/packer.js'> </script>
<script src='js/packer.growing.js'></script>
<script src='js/demo.js'> </script>
</body>
</html>