xxxxxxxxxx
60
let dia;
let distance;
function setup() {
createCanvas(800, 800);
}
function draw() {
background(220);
x = mouseX;
y = mouseY;
spd = 0.5;
scl = 1.5;
push();
fill("#eb6b6f");
translate(x, y);
//rotate(frameCount * spd); // rotates below stuff
noStroke();
noCursor();
// design a summer creature
ellipse(0, 0, 160, 80);
// eyes
fill("#7c3f58");
circle(-50, -40, 50);
circle(50, -40, 50);
fill("#f9a875");
circle(-50, -40, 30);
circle(50, -40, 30);
fill("pink");
// draw
shooters(0,0,-130,30); // (x , y point of where to translate as 'center',distance = distance between each circle, diameter = diameter of each circle.
shooters(0,0,230,30);
// mouth
//circle(0,20,20);
rotate(PI / 4)
rect(0,0,10,20);
rect(0,0,20,10);
pop();
// drawing side circles function!
function shooters(x, y, distance, dia) {
push();
fill("#f9a875");
translate(x, y);
for (let i = 0; i < 3; i++) {
circle(x + distance, y, dia);
distance -= 50; // changes where the center of the circle is for the next circle
}
pop();
}
}