MCPcopy Create free account
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / randomize

Function randomize

assets/js/svg-generator.js:256–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254
255//Randomize
256function 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}

Callers 1

datguiFunction · 0.85

Calls 3

datguiFunction · 0.85
destroyMethod · 0.80
funcFunction · 0.70

Tested by

no test coverage detected