|
|
@@ -39,10 +39,10 @@ window.onload = function()
|
|
39
|
39
|
this.g = Math.round(Math.random()*255);
|
|
40
|
40
|
this.b = Math.round(Math.random()*255);*/
|
|
41
|
41
|
|
|
42
|
|
- this.randomColor = randomInt(0,colorsArray.colors.length-1);
|
|
43
|
|
- this.r = colorsArray.colors[this.randomColor].red;
|
|
44
|
|
- this.g = colorsArray.colors[this.randomColor].green;
|
|
45
|
|
- this.b = colorsArray.colors[this.randomColor].blue;
|
|
|
42
|
+ this.randomColor = randomInt(0,colorsArray.length-1);
|
|
|
43
|
+ this.r = colorsArray[this.randomColor].red;
|
|
|
44
|
+ this.g = colorsArray[this.randomColor].green;
|
|
|
45
|
+ this.b = colorsArray[this.randomColor].blue;
|
|
46
|
46
|
|
|
47
|
47
|
console.log(colorsArray);
|
|
48
|
48
|
|
|
|
@@ -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
|
+}
|