Skip to content

Commit fac3ada

Browse files
committed
removed offset
1 parent 0ecea40 commit fac3ada

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

js/secrets.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,6 @@ function setup() {
2424
var cols = Math.floor(width / size);
2525
var radius = Math.floor(Math.max(width, height) / Math.max(rows - 1, cols - 1)) / 2;
2626

27-
for (var r = 0; r < rows; r++) {
28-
// even rows have an offset of 0.5
29-
var even = !!(r % 2);
30-
var vi = r / (rows - 1);
31-
for (var c = 0; c < cols; c++) {
32-
var k = c;
33-
if (even) {
34-
k += 0.5;
35-
// we skip the final col on even rows to avoid overflow
36-
if (c >= cols - 1) {
37-
continue;
38-
}
39-
}
40-
var hi = k /(cols - 1);
4127
var shape = pickFlower(shapes);
4228
shape.translation.set(hi * two.width, vi * two.height);
4329
flowers.push(shape);

0 commit comments

Comments
 (0)