@@ -76,7 +76,7 @@ function show (arr) {
76
76
77
77
78
78
79
- let N = 1e6
79
+ let N = 10001
80
80
let ratio = window . innerWidth / window . innerHeight
81
81
let range = [ - 10 * ratio , - 10 , 10 * ratio , 10 ]
82
82
let colors = palettes [ Math . floor ( Math . random ( ) * palettes . length ) ]
@@ -96,17 +96,17 @@ scatter(Array(passes).fill(null).map((x, i) => {
96
96
// positions: [0,0, .1,.1, .2,.2, .3,.3, .4,.4, .5,.5, .6,.6, .7,.7, .8,.8, .9,.9, 1,1],
97
97
// positions: [0,0, 1,1, -1,-1, 1,-1, -1,1, 0,1, 0,-1, 1,0, -1,0],
98
98
99
- // size: Array(pos.length).fill(100).map(x => Math.random() * 5 + 5),
100
- size : 10 ,
101
- // color: Array(pos.length).fill(0).map(() => colors[Math.floor(Math.random() * colors.length)]),
102
- color : 'rgba(0, 0, 0, .5)' ,
99
+ size : Array ( pos . length ) . fill ( 100 ) . map ( x => Math . random ( ) * 5 + 5 ) ,
100
+ // size: 10,
101
+ color : Array ( pos . length ) . fill ( 0 ) . map ( ( ) => colors [ Math . floor ( Math . random ( ) * colors . length ) ] ) ,
102
+ // color: 'rgba(0, 0, 0, .5)',
103
103
104
104
// marker: markers[i],
105
105
// marker: Array(pos.length).fill(0).map(() => markers[Math.floor(Math.random() * markers.length)]),
106
106
107
107
range : range ,
108
- borderSize : 1 ,
109
- borderColor : [ [ .5 , .5 , .5 , 1 ] ] ,
108
+ // borderSize: 1,
109
+ // borderColor: [[.5,.5,.5,1]],
110
110
snap : true ,
111
111
precise : true ,
112
112
@@ -165,6 +165,12 @@ function generate(N) {
165
165
positions [ i ] = random ( )
166
166
}
167
167
168
+
169
+ // for (var i = 0; i < N; i++) {
170
+ // positions[i * 2] = i;
171
+ // positions[i * 2 + 1] = Math.random();
172
+ // }
173
+
168
174
return positions
169
175
}
170
176
0 commit comments