xxxxxxxxxx
function setup(){
createCanvas(windowWidth, windowHeight)
background(255)
}
function draw(){
fill(0)
//square(mouseX,mouseY,5,5)
pen(mouseX,mouseY,10,10)
}
function pen(x,y,r1,r2){
fill(random(255),random(255),random(255))
stroke(random(255),random(255),random(255))
square(x,y,r1,r2)
x1= x - r1
y1= y
x2= x + r1
y2= y
x3= x
y3= y + r2
if(mouseX >width/5){
triangle(x,y,r1,r2)
}else{
square(x,y,r1,r2)
}
}
function mousePressed(){
background(random(255),random(255),random(255))
}
function enteredpressed() {
seconds(30)
}