xxxxxxxxxx
63
function setup() {
createCanvas (1000, 1000);
background(17, 180, 17);
//this is a comment
ellipse(244, 208, 200, 210);
ellipse(199, 175, 24, 19);
ellipse(199, 174, 6, 6);
ellipse(280, 175, 24, 19);
ellipse(279, 175, 6, 6);
arc(240, 247, 70, 80, 0, radians(169), CHORD)
line(230, 216, 243, 187)
line(244, 211, 230, 216)
line(189, 120, 190, 100);
fill (54)
arc(234, 120, 140, 50, 390, radians(0), CHORD);
noFill();
fill(255);
rect(210,315,80,50)
rect(50,400,80,50)
rect(350,400,80,50)
noFill(0);
fill(255,204,0)
rect(130,365,220,178)
noFill(0);
fill(54);
rect(132,543,100,100)
rect(250,543,100,100)
noFill(0);
fill(255);
rect(270,643,70,180)
rect(137,643,70,180)
noFill(0);
fill(255,0,0);
rect(137,816,70,30)
rect(270,816,70,30)
}
let x = 370;
let direction = 3;
function draw() {
fill(255)
ellipse(x, 836, 50);
x = x + direction;
if (x > width || x < 0) { // || means logical OR
noLoop();
direction = -direction;
}
}
// function draw() {
// print(mouseX, mouseY);
// }