xxxxxxxxxx
29
function setup() {
createCanvas(1000, 950);
frameRate(60);
let x = mouseX;
let y = mouseY;
}
function draw() {
if(mouseIsPressed){
myBrush(mouseX,mouseY);
}
if (keyIsPressed) {
background(255);
}
}
function myBrush(X,Y) {
let x = mouseX;
let y = mouseY;
noFill();
rect(x,y,40,15);
fill(0,0,0,random(1,125));
stroke(random(10,75));
strokeWeight(random(1,8))
rect(x,y+15,40,10);
}