Skip to content

Commit a8cf7e5

Browse files
committed
removed background of secret's two canvas
1 parent a51d114 commit a8cf7e5

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

js/secrets.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
var two = new Two({
33
fullscreen: true,
44
autostart: true
5-
}).appendTo(document.body);;
5+
}).appendTo(document.body);
6+
document.body.style.background = 'black';
67

78
var rows = Math.floor(two.height / 150);
89
var cols = Math.floor(two.width / 150);
910
var radius = Math.floor(Math.max(two.width, two.height) / Math.max(rows, cols)) / 2;
1011
var shapes = makeFlowers();
11-
var container = two.makeGroup(getBackground());
12+
var container = two.makeGroup();
13+
1214
for (var r = 0; r < rows; r++) {
1315
// even rows have an offset of 0.5
1416
var even = !!(r % 2);
@@ -46,14 +48,6 @@ two.update();
4648
//
4749
// });
4850

49-
function getBackground() {
50-
var background = two.makeRectangle(two.width / 2, two.height / 2,
51-
two.width, two.height);
52-
background.noStroke();
53-
background.fill = 'black';
54-
background.name = 'background';
55-
return background
56-
}
5751

5852
function roseMath(v, k, t) {
5953
v.x = radius * Math.cos(k * t) * Math.cos(t);

0 commit comments

Comments
 (0)