xxxxxxxxxx
58
function setup() {
createCanvas(512, 512);
background(255,255,255)
//background grid
strokeWeight(2);
stroke(9,7,24);
fill(255,255,255);
rect(2,2,508,508);
noStroke();
let magenta = color(255,0,128);
fill(magenta);
for(let e=1; e<64; e++){
for(let i=1; i<64; i++){
let x = i*8 - 4;
let y = e*8 - 4;
rect(x,y,7,7);
}
}
}
//transperant squares
function mousePressed(){
let c1 = color(random(100,255),random(100,255),0,random (0,100));
let x = random(0,256);
let y = random(0,256);
fill(c1);
// rect(30,30,256,256);
rect(x,y,256,256);
// rect(x,y,100,100);
// rect(x,y,256,256);
// rect(x,y,256,256);
// rect(232,232,256,256);
}
//function draw() {
// background(220);
//}