xxxxxxxxxx
//set variables
let obj1;
let container = [];
let num = 100;
let h=100
let t=10
let r=67
let g= 78
let b=100
function setup() {
createCanvas(600, 600);
background(40);
noLoop();
for(let i = 0; i < 100; i++) {
let rsize = random(30, 100);
let prop = random(0,1)
let ob = new tv(rsize, door);
container.push(ob);
container[i].x = random(0, width - container[i].fw);
container[i].y = random(0, height - container[i].fh - container[i].fh / 2);
container[i].flatCl = color(random(255),random(255),random(255),random(255));
}
}
function draw() {
for (let i = 0; i < 100; i++ ) {
container[i].display();
}
fill(169)
stroke(0,0,0)
strokeWeight(20)
rect(120,h*2,h*4,h*3);
fill(0,0,0)
//rect(h+t*3.5,h*3.5,h*3.5,h);
noStroke();
fill(0,0,0)
rect(280,10,14,180)
rect(315,60,10,130)
fill(255,0,0)
circle(520,480,13)
fill(0,255,0)
circle(520,450,13)
//make loop of old television screen display
for (x = 137; x <= 500; x += 25)
for (y = 230; y <= 480; y += 20) {
noStroke();
fill(r,g,b );
//set random function
circle(x, y, random(1, 13));
rect(x+5,y+5,random(1,10));
//triangle(x+6,y+7,x+10,y+11,random(1,12))
push();
}
}
//do function key
function keyPressed() {
if (key == 't') {
background (r,g,b)
//color = random(3, 30);
//image(myImage,0,10);
r = random(0, 255);
g = random(0, 255);
b = random(0, 255);
draw();
}
}