Your browser does not support the canvas tag.

previous        Show / Hide Source        Download        next
void setup(){
//set the size of the window
size (400,400);
}

void draw(){
  //set the mode for Circles
  ellipseMode(CENTER);
  //set no stroke for the shapes
    noStroke();
  
  //Change the background to Night
  background(0);
  
  //Fill then Set the tombstone
  fill(105,105,105);
  ellipse(205,200,90,130);
  
  //Fill then writing on tombstone
  fill(211,211,211);
  stroke(0);
  line(180,150,230,150);
  line(185,160,225,160);
  
  //Re-Intiate noStroke
  noStroke();
  
  //Fill then draw the stars, allow mouse X to make the stars appear to glow
  fill(255,255,0,70);
  ellipse(57,55,5,mouseX/40);
  ellipse(100,110,5,mouseX/40);
  ellipse(25,20,5,mouseX/40);
  ellipse(183,90,5,mouseX/40);
  ellipse(105,122,5,mouseX/40);
  ellipse(250,80,5,mouseX/40);
  ellipse(270,110,5,mouseX/40);
  ellipse(335,70,5,mouseX/40);
  ellipse(350,25,5,mouseX/40);
  ellipse(300,100,5,mouseX/40);
  
   
  //Fill then Set the ground
  fill(1,89,13);
  ellipse(200,400,600,400);
  
  
  //Fill and set Alpha then set the Ghost
  fill(255,255,255,200);
  ellipse(205,mouseY-30,70,100);
  fill(255,255,11,200);
  ellipse(190,mouseY-40,20,20);
  ellipse(220,mouseY-40,20,20);
  fill(0,0,0,200);
  ellipse(205,mouseY-30/9,30,40);
  
  
  
  //Fill then Set the coffin
  fill(139,69,19);
  rect(170,240,70,170);
  //fill(139,69,19,170);
  //rect(240,240,20,170);
  
  //Fill then Set the cross
  fill(255,215,0);
  rect(198,260,15,80);
  rect(180,280,50,15);
  
  //Fill then set the left flower
  fill(152,219,107);
  rect(98,340,15,90);
  fill(138,15,67);
  ellipse(105,350,30,30);
  ellipse(115,360,30,30);
  ellipse(95,360,30,30);
  
  //Fill then set the right flower
  fill(152,219,107);
  rect(298,340,15,90);
  fill(175,93,222);
  ellipse(305,350,30,30);
  ellipse(315,360,30,30);
  ellipse(295,360,30,30);
    
}
  
  //Show moon when key pressed
  void keyPressed() {
    //Allow moon to appear then disappear
    frameRate(1);
  //Fill then set the moon
  fill(255,255,0);
  ellipse(50,30,70,70);
  fill(0);
  ellipse(65,35,70,70);
  
  
  }
  
 //After key above released 
   void keyReleased() {
     //Make moon disappear
    frameRate(60);
  
  
  }