xxxxxxxxxx
//BUNNY TURNS INTO MOUSE
function setup() {
createCanvas(400, 400);
}
function draw() {
background(200, 250, 213);
if (mouseIsPressed) {
//face
noStroke();
fill(132, 153, 145);
circle(200, 200, 100);
//mouse body
noStroke();
fill(132, 153, 145);
ellipse(200, 300, 55, 100);
//mouse left ear
noStroke();
fill(132, 153, 145);
circle(135, 160, 80);
// mouse left ear
noStroke();
fill(132, 153, 145);
circle(268, 160, 80);
ellipse(190, 375, 5, 70);
ellipse(210, 375, 5, 70);
circle(210, 392, 15);
circle(190, 392, 15);
circle(150, 325, 15);
circle(247, 325, 15);
//mouse eyes
fill(0, 0, 0)
circle(180, 200, 20);
circle(220, 200, 20);
fill(132, 153, 145)
translate(width / 2, height / 2);
rotate(PI / 3.0);
ellipse(100, 20, 70, 5);
translate(width / 2, height / 2);
rotate(PI / 3.0);
ellipse(-175, 55, 70, 5);
}
else {
fill(250, 200, 249)
ellipse(170, 120, 30, 100);
ellipse(230, 120, 30, 100);
//bunny face
noStroke();
circle(200, 200, 100);
//bunny body
noStroke();
ellipse(200, 300, 55, 100);
ellipse(190, 375, 5, 70);
ellipse(210, 375, 5, 70);
circle(210, 392, 15);
circle(190, 392, 15);
circle(150, 325, 15);
circle(247, 325, 15);
//bunny eyes
fill(0, 0, 0)
circle(180, 200, 20);
circle(220, 200, 20);
fill (250, 200, 249)
translate(width / 2, height / 2);
rotate(PI / 3.0);
ellipse(100, 20, 70, 5);
translate(width / 2, height / 2);
rotate(PI / 3.0);
ellipse(-175, 55, 70, 5);
}
}