File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ var two = new Two({
44 autostart : true
55} ) . appendTo ( document . body ) ; ;
66
7- var rows = Math . floor ( two . height / 100 ) ;
8- var cols = Math . floor ( two . width / 100 ) ;
97var rows = Math . floor ( two . height / 150 ) ;
8+ var cols = Math . floor ( two . width / 150 ) ;
109var radius = Math . floor ( Math . max ( two . width , two . height ) / Math . max ( rows , cols ) ) / 2 ;
1110var shapes = makeFlowers ( ) ;
1211var container = two . makeGroup ( getBackground ( ) ) ;
@@ -29,10 +28,24 @@ for (var r = 0; r < rows; r++) {
2928 container . add ( shape ) ;
3029 }
3130}
32-
3331two . update ( ) ;
3432
35- if ( timeDelta ) {
33+ // var time = 0;
34+ // two.bind('update', function(frameCount, timeDelta) {
35+ // if (timeDelta) {
36+ // time += timeDelta;
37+ // }
38+ // if (time > 1000) {
39+ // for (var c in container.children) {
40+ // var child = container.children[c];
41+ // if (child.name !== 'background') {
42+ // child.rotation += child.step;
43+ // }
44+ // }
45+ // }
46+ //
47+ // });
48+
3649function getBackground ( ) {
3750 var background = two . makeRectangle ( two . width / 2 , two . height / 2 ,
3851 two . width , two . height ) ;
You can’t perform that action at this time.
0 commit comments