Skip to content

Commit 8a59217

Browse files
committed
done enough
1 parent ee5b9aa commit 8a59217

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

main.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const getRandomInt = (rangeL, rangeH) =>{
1515
}
1616

1717
let totalCounts = 0;
18-
let countLimit = 6;
19-
let branches = getRandomInt(3, 8);
18+
let countLimit = 5;
19+
let branches = getRandomInt(2, 8);
2020

2121
let color = `hsl(${Math.random()*360}, 100%, 50%)`
2222
let randomizeButton = document.getElementById('randomize');
@@ -26,16 +26,16 @@ let randomizeButton = document.getElementById('randomize');
2626

2727

2828
const resetParamValues = () => {
29-
let scaleLen = .3+ Math.random()*0.5
29+
let scaleLen = .4+ Math.random()*0.5
3030
let winRatio = Math.min(window.innerWidth, window.innerHeight)/900;
3131
paramValues = {
3232
'lineWidth' : (6 + Math.random()*3)*((winRatio**0.5)*(winRatio<1)+(winRatio**0.8)*(winRatio>=1)) ,
3333
'scaleFactorLen' : scaleLen,
34-
'scaleFactorWidth' : (0.3+ Math.random()*0.4)/((1+scaleLen)),
34+
'scaleFactorWidth' : (0.5+ Math.random()*0.4)/((1+scaleLen)),
3535

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,
3939
'scaleFactorAngleRate' : 200*Math.random(),
4040
'color' : `hsl(${Math.random()*560}, 100%, 50%)`
4141
}
@@ -99,11 +99,11 @@ setInterval(incSize, 10)
9999
const randomize = () =>{
100100
ctx.clearRect(0, 0, window.width, window.height);
101101

102-
let newBranches = 3 +getRandomInt(0, 5);
102+
let newBranches = 2+ getRandomInt(0, 8);
103103
color = `hsl(${Math.random()*360}, 100%, 50%)`;
104104
offset = 3.14*(Math.random()>0.5);
105105
while (newBranches== branches){
106-
newBranches = 3 +getRandomInt(0, 5);
106+
newBranches = 2+ +getRandomInt(0, 8);
107107
}
108108
branches = newBranches;
109109
resetParamValues()

0 commit comments

Comments
 (0)