|
@@ -17,7 +17,7 @@ window.onload = function()
|
17
|
17
|
canvas.width = W;
|
18
|
18
|
canvas.height = H;
|
19
|
19
|
|
20
|
|
- //console.log("my color request: "+colorsArray);
|
|
20
|
+ console.log("my color request: "+colorsArray);
|
21
|
21
|
|
22
|
22
|
/*===============Box class=================================*/
|
23
|
23
|
function Box(_x, _y)
|
|
@@ -35,9 +35,9 @@ window.onload = function()
|
35
|
35
|
this.height = 20;
|
36
|
36
|
|
37
|
37
|
//random colors for our box
|
38
|
|
- /*this.r = Math.round(Math.random()*255);
|
|
38
|
+ this.r = Math.round(Math.random()*255);
|
39
|
39
|
this.g = Math.round(Math.random()*255);
|
40
|
|
- this.b = Math.round(Math.random()*255);*/
|
|
40
|
+ this.b = Math.round(Math.random()*255);
|
41
|
41
|
|
42
|
42
|
this.randomColor = randomInt(0,colorsArray.colors.length-1);
|
43
|
43
|
this.r = colorsArray.colors[this.randomColor].red;
|
|
@@ -136,4 +136,4 @@ window.onload = function()
|
136
|
136
|
//set interval so we can draw then update our drawing
|
137
|
137
|
// every 30 milisecond
|
138
|
138
|
setInterval(draw,30);
|
139
|
|
-}
|
|
139
|
+}
|