@@ -15,8 +15,8 @@ const getRandomInt = (rangeL, rangeH) =>{
15
15
}
16
16
17
17
let totalCounts = 0 ;
18
- let countLimit = 6 ;
19
- let branches = getRandomInt ( 3 , 8 ) ;
18
+ let countLimit = 5 ;
19
+ let branches = getRandomInt ( 2 , 8 ) ;
20
20
21
21
let color = `hsl(${ Math . random ( ) * 360 } , 100%, 50%)`
22
22
let randomizeButton = document . getElementById ( 'randomize' ) ;
@@ -26,16 +26,16 @@ let randomizeButton = document.getElementById('randomize');
26
26
27
27
28
28
const resetParamValues = ( ) => {
29
- let scaleLen = .3 + Math . random ( ) * 0.5
29
+ let scaleLen = .4 + Math . random ( ) * 0.5
30
30
let winRatio = Math . min ( window . innerWidth , window . innerHeight ) / 900 ;
31
31
paramValues = {
32
32
'lineWidth' : ( 6 + Math . random ( ) * 3 ) * ( ( winRatio ** 0.5 ) * ( winRatio < 1 ) + ( winRatio ** 0.8 ) * ( winRatio >= 1 ) ) ,
33
33
'scaleFactorLen' : scaleLen ,
34
- 'scaleFactorWidth' : ( 0.3 + Math . random ( ) * 0.4 ) / ( ( 1 + scaleLen ) ) ,
34
+ 'scaleFactorWidth' : ( 0.5 + Math . random ( ) * 0.4 ) / ( ( 1 + scaleLen ) ) ,
35
35
36
- 'angleRate' : 0.2 + Math . random ( ) * 5 ,
37
- 'divergence1' : Math . random ( ) * 3.14 ,
38
- 'divergence2' : Math . random ( ) * 3.14 ,
36
+ 'angleRate' : 0.5 + Math . random ( ) * 5 ,
37
+ 'divergence1' : 0.5 + Math . random ( ) * 3.14 ,
38
+ 'divergence2' : 0.5 + Math . random ( ) * 3.14 ,
39
39
'scaleFactorAngleRate' : 200 * Math . random ( ) ,
40
40
'color' : `hsl(${ Math . random ( ) * 560 } , 100%, 50%)`
41
41
}
@@ -99,11 +99,11 @@ setInterval(incSize, 10)
99
99
const randomize = ( ) => {
100
100
ctx . clearRect ( 0 , 0 , window . width , window . height ) ;
101
101
102
- let newBranches = 3 + getRandomInt ( 0 , 5 ) ;
102
+ let newBranches = 2 + getRandomInt ( 0 , 8 ) ;
103
103
color = `hsl(${ Math . random ( ) * 360 } , 100%, 50%)` ;
104
104
offset = 3.14 * ( Math . random ( ) > 0.5 ) ;
105
105
while ( newBranches == branches ) {
106
- newBranches = 3 + getRandomInt ( 0 , 5 ) ;
106
+ newBranches = 2 + + getRandomInt ( 0 , 8 ) ;
107
107
}
108
108
branches = newBranches ;
109
109
resetParamValues ( )
0 commit comments