xxxxxxxxxx
125
//let x;
let r;
let g;
let b;
let leftpup;
let rightpup;
function setup() {
createCanvas(400, 400);
background(0,255,255)
//lefteye
noStroke()
fill(0)
ellipse(120,150,75,100)
//righteye
noStroke()
fill(0)
ellipse(270,150,75,100)
//leftpup
noStroke()
fill(255,0,255)
ellipse(100,150,75/2,75)
//rightpup
noStroke()
fill(255,0,255)
ellipse(250,150,75/2,75)
}
function draw() {
r = random (255)
g = random(100,200)
b = random(100)
leftpup = random (100,100+75/2)
rightpup = random (300,200+75/2)
//mouth
noStroke()
fill(0)
rect(70, 242, 260, 130, 60)
//TOPROW
//toothTOP1
noStroke()
fill(255,0,255)
rect(90, 250, 55, 55, 10, 10, 20, 20)
//toothT0P2
fill(255,0,255)
rect(90+55, 250, 55, 55, 10, 10, 20, 20)
//toothT0P3
fill(255,0,255)
rect(90+55+55, 250, 55, 55, 10, 10, 20, 20)
//toothTOP4
fill(255,0,255)
rect(90+55+55+55, 250, 55, 55, 10, 10, 20, 20)
//BOTTOMROW
//toothTOP1
fill(255,0,255)
rect(90, 250+55, 55, 55, 20, 20, 10, 10)
//toothT0P2
fill(255,0,255)
rect(90+55, 250+55, 55, 55, 20, 20, 10, 10)
//toothT0P3
fill(255,0,255)
rect(90+55+55, 250+55, 55, 55, 20, 20, 10, 10)
//toothTOP4
fill(255,0,255)
rect(90+55+55+55, 250+55, 55, 55, 20, 20, 10, 10)
//lip
strokeWeight(20);
stroke(0);
noFill()
rect(75, 250, 248, 110, 60)
//console.log(x);
}
function mousePressed() {
r = random (255)
g = random(100,200)
b = random(100);background(r,g,b)
//lefteye
noStroke()
fill(0)
ellipse(120,150,75,100)
//leftpup
noStroke()
fill(255,0,255)
ellipse(leftpup,150,75/2,75)
//righteye
noStroke()
fill(0)
ellipse(270,150,75,100)
//rightpup
noStroke()
fill(255,0,255)
ellipse(rightpup,150,75/2,75)
}