-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
223 lines (221 loc) · 7.28 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<link href="./css/style.css" rel="stylesheet" type="text/css" media="all">
<title>
Plant Generation
</title>
</head>
<body>
<div id="container">
<canvas id="canvas" width="1000" height="500">
</canvas>
</div>
<div id="controlsContainer">
<h1>
Plant Generation
</h1>
<div id="controls">
<div class="control">
<label for="c-seed">
Seed:
</label>
<input type="text" id="c-seed" />
</div>
<div class="control">
<label for="c-treeCount">
Tree Count:
</label>
<input type="number" id="c-treeCount" />
</div>
<div class="control">
<label for="c-baseWidth">
Base Width:
</label>
<input type="range" min="1" max="100" step="0.01" id="c-baseWidth" />
<input type="text" id="c-baseWidthValue" step="1" class="rangeValue">
</div>
<div class="control">
<label for="c-branchLimit" id="branchLimit">
Branch count limit:
</label>
<input type="number" id="c-branchLimit" />
</div>
<div class="control">
<label for="c-branchOverwidth">
Branch Overwidth:
</label>
<input type="range" min="0" max="1" step="0.01" id="c-branchOverwidth" />
<input type="text" id="c-branchOverwidthValue" class="rangeValue">
</div>
<div class="control">
<label for="c-lengthWidthRatio">
Length/Width Ratio:
</label>
<input type="range" min="0" max="20" step="0.1" id="c-lengthWidthRatio" />
<input type="text" id="c-lengthWidthRatioValue" step="1" class="rangeValue">
</div>
<div class="control">
<label for="c-lengthConstant">
Length Constant:
</label>
<input type="range" min="0" max="100" step="0.1" id="c-lengthConstant" />
<input type="text" id="c-lengthConstantValue" step="1" class="rangeValue">
</div>
<div class="control">
<label for="c-bendiness">
Bendiness:
</label>
<input type="range" min="0.01" max="0.7" step="0.01" id="c-bendiness" />
<input type="text" id="c-bendinessValue" step="0.1" class="rangeValue">
</div>
<div class="control">
<label for="c-angleSpan">
Angle Span:
</label>
<input type="range" min="0" max="180" step="0.01" id="c-angleSpan" />
<input type="text" id="c-angleSpanValue" step="1" class="rangeValue">
</div>
<div class="control">
<label for="c-lengthRandomness">
Length Randomness:
</label>
<input type="range" min="0" max="3" step="0.01" id="c-lengthRandomness" />
<input type="text" id="c-lengthRandomnessValue" step="0.01" class="rangeValue">
</div>
<div class="control">
<label for="c-spanRandomness">
Span Randomness:
</label>
<input type="range" min="0" max="180" step="0.01" id="c-spanRandomness" />
<input type="text" id="c-spanRandomnessValue" step="1" class="rangeValue">
</div>
<div class="control">
<label for="c-angleRandomness">
Angle Randomness:
</label>
<input type="range" min="0" max="180" step="0.01" id="c-angleRandomness" />
<input type="text" id="c-angleRandomnessValue" step="1" class="rangeValue">
</div>
<div class="control">
<label for="c-widthRandomness">
Width Randomness:
</label>
<input type="range" min="0" max="2" step="0.01" id="c-widthRandomness" />
<input type="text" id="c-widthRandomnessValue" step="0.1" class="rangeValue">
</div>
<div class="control">
<label for="c-branchCount">
Branch Count:
</label>
<input type="range" min="1" max="10" step="1" id="c-branchCount" />
<input type="number" id="c-branchCountValue" step="1" class="rangeValue">
</div>
<div class="control">
<label for="c-minWidth">
Minimum Width:
</label>
<input type="range" min="0.01" max="10" step="0.01" id="c-minWidth" />
<input type="text" id="c-minWidthValue" class="rangeValue">
</div>
<div class="control">
<label for="c-maxDepth">
Max branch depth:
</label>
<input type="range" min="1" max="50" step="1" id="c-maxDepth" />
<input type="text" id="c-maxDepthValue" class="rangeValue">
</div>
<div class="control">
<label for="c-stemAngle">
Stem angle:
</label>
<input type="range" min="0" max="1" step="0.01" id="c-stemAngle" />
<input type="text" id="c-stemAngleValue" class="rangeValue">
</div>
<div class="control">
<label for="c-stemWeight">
Stem weight:
</label>
<input type="range" min="0" max="1" step="0.01" id="c-stemWeight" />
<input type="text" id="c-stemWeightValue" class="rangeValue">
</div>
<div class="control">
<label for="c-gravity">
Gravity:
</label>
<input type="range" min="-2" max="2" step="0.01" id="c-gravity" />
<input type="text" id="c-gravityValue" class="rangeValue">
</div>
<div class="control">
<label for="c-elasticity">
Elasticity Module:
</label>
<input type="range" min="1" max="30" step="0.01" id="c-elasticity" />
<input type="text" id="c-elasticityValue" class="rangeValue">
</div>
<!-- <div class="control">
<label for="c-thinBranchStrength">
Thin branch strength:
</label>
<input type="range" min="0" max="2" step="0.01" id="c-thinBranchStrength" />
<input type="text" id="c-thinBranchStrengthValue" class="rangeValue">
</div> -->
<div class="control">
<label for="c-keepStructure">
Preserve Structure:
</label>
<input type="checkbox" id="c-keepStructure">
</div>
<div class="control">
<label for="c-animateWind">
Animate wind:
</label>
<input type="checkbox" id="c-animateWind">
</div>
<div class="control">
<label for="c-windSpeed">
Wind speed:
</label>
<input type="range" min="0" max="5" step="0.01" id="c-windSpeed" />
<input type="text" id="c-windSpeedValue" class="rangeValue">
</div>
<div class="control">
<label for="c-windDirection">
Wind direction:
</label>
<input type="range" min="0" max="360" step="0.01" id="c-windDirection" />
<input type="text" id="c-windDirectionValue" class="rangeValue">
</div>
<div class="control">
<label for="c-windTurbulence">
Wind turbulence:
</label>
<input type="range" min="0" max="1" step="0.01" id="c-windTurbulence" />
<input type="text" id="c-windTurbulenceValue" class="rangeValue">
</div>
<hr />
<!--h2>Leaves</h2>
<div class="control">
<label for="c-leafLength">
Leaf length:
</label>
<input type="range" min="0" max="2" step="0.01" id="c-leafLength" />
<input type="text" id="c-leafLengthValue" class="rangeValue">
</div-->
</div>
<div>
Branches: <span id="branchCount">0</span>
</div>
<div id="footer">
By <a href="http://github.com/warrengalyen">Warren Galyen</a>.<br />
Source on <a href="https://github.com/pg-laboratory/plants">GitHub</a>.
</div>
</div>
<script type="text/javascript" src="./js/lib/seedrandom.js"></script>
<script type="text/javascript" src="./js/conversions.js"></script>
<script type="text/javascript" src="./js/presets.js"></script>
<script type="text/javascript" src="./js/plantgen.js"></script>
<script type="text/javascript" src="./js/controls.js"></script>
</body>
</html>