xxxxxxxxxx
41
let bubble;
let bubble1;
function setup() {
createCanvas(600, 400);
bubble = new Bubble(200,200,20);
bubble1 = new Bubble(400,200,40);
bubble2 = new Bubble(300,100,50);
bubble3 = new Bubble(100,300,10);
bubble4 = new Bubble(500,200,80);
}
function draw() {
background(70,240,255);
//bubbles
bubble.move();
bubble.show();
bubble1.move();
bubble1.show();
bubble2.move();
bubble2.show();
bubble3.move();
bubble3.show();
bubble4.move();
bubble4.show();
//duck
noStroke();
//mouth
fill(255,126,0)
triangle(300,280,300,320,270,300);
//body
fill(255,200,0);
ellipse(400,370,250,100)
ellipse(330,300,90);
//eye
fill(0);
ellipse(310,290,15);
fill(255);
ellipse(306,288,2);
}