| 254 | |
| 255 | //Randomize |
| 256 | function randomize(){ |
| 257 | settings = { |
| 258 | frequency: parseInt(5 + Math.random() * 45), |
| 259 | straightness: parseInt(20 + Math.random()* 300), |
| 260 | height: parseInt(Math.random() * 200), |
| 261 | hueStartColor: parseInt(Math.random() * 360), |
| 262 | saturationStartColor: 74, |
| 263 | lightnessStartColor: 67, |
| 264 | hueEndColor: parseInt(Math.random() * 360), |
| 265 | saturationEndColor: 90, |
| 266 | lightnessEndColor: 14, |
| 267 | smoothness: 1 + parseInt(Math.random() * 9), |
| 268 | angle: parseInt(-20 + Math.random() * 40), |
| 269 | fill: Math.random() * 1 > 0.3 ? true : false, |
| 270 | crazyness: Math.random() * 1 > 0.9 ? true : false |
| 271 | } |
| 272 | func(); |
| 273 | gui.destroy(); |
| 274 | datgui(); |
| 275 | } |