P5JS – LA 2 – 2.2
This lesson was a little vague to me, but that was because it seemed quite simple, so I just went with it. I created the emoji en when changing the x or y the emoji will still look the same, just at another position. This is the code I made and image:
var x;
var y;
function setup() {
createCanvas(500, 500);
x = 200
y = 300
}
function draw() {
background(150);
fill(225);
ellipse(x, y, 200, 200);
//mouth//
fill(0);
rect(x-30, y+30, 60, 20);
//eye 1//
fill(0);
ellipse(x-30, y-20, 20, 20);
//eye 2//
fill(0);
ellipse(x+30, y-20, 20, 20);
}