Your browser does not support the canvas tag.

previous        Show / Hide Source        Download        next
void setup () {
  size(400, 400);
  noStroke ();
}
void draw () {//BACKGROUND

background(102, 255, 255);


//grass
rectMode(CORNER);
fill(7, 242, 77);
rect(-1, 340, 401, 340);


//sun
ellipseMode(CENTER);
fill(255, 223, 9);
ellipse(360, 40, 150, 150);


//flagpole
rectMode(CORNER);
fill(155, 154, 148);
rect(100, 100, 20, 300);


//flagpole top
ellipseMode(CENTER);
fill(155, 154, 148);

ellipse(110, 90, 30, 30);

//FLAG

//flag(White sections)
rectMode(CORNER);
fill(255, 255, 255);
rect( 120, +pmouseY-height+400+90, 120, 80);
//120, 100, 120, 80

//flag(Red sections)
rectMode(CORNER);
fill(255, 0, 0);

rect(121, +pmouseY-height+430+90, 119, 20);
fill(255, 0, 0);
rect(171, +pmouseY-height+400+90, 20, 79);

}