Your browser does not support the canvas tag.

previous        Show / Hide Source        Download        next
void setup(){
size(1200, 800);
}
void draw(){
//Creating the sky
noStroke();
fill(0,0,mouseY -10);
rect(0,0, 1200,800);

//Making the clouds
  //Cluster 1
  noStroke();
  fill(200);
  ellipse(mouseX*2 + 50, 80, 50, 25);
  fill(210);
  ellipse(mouseX*2 + 50, 69, 75, 45);
  fill(220);
  ellipse(mouseX*2 + 40, 90, 50, 25);

  //Cluster 2
  noStroke();
  fill(160);
  ellipse(mouseX, 190, 250, 140);
  fill(175);
  ellipse(mouseX, 190, 225, 110);
  fill(180);
  ellipse(mouseX, 205, 85, 30);
  fill(190);
  ellipse(mouseX, 210, 160, 60);
  fill(200);
  ellipse(mouseX, 190, 120, 65);
  fill(210);
  ellipse(mouseX, 185, 65, 40);
    //Flattening the bottom of the clouds
    fill(0, 0, mouseY - 10);
    rect(mouseX, 250,290, 90);


  //Building
  strokeWeight(5);
  stroke(120);
  fill(180);
  rectMode(CORNER);
  rect(800, 100, 600, 1000);
  fill(160);
  rectMode(CORNER);
  rect(800,50, 500, 50);
  rectMode(CORNER);
  rect(850, 0, 500, 50);

//Base Layer of Spider-Man
  
  //Neck
  noStroke();
  fill(135, 0, 0);
  quad(690, 210, 700, 207, 715, 240, 685, 245);
  
      //Torso
      fill(180, 0 , 0);
      ellipse(690, 240, 35, 17);
      quad(665, 255, 730, 240, 730, 320, 690, 330);
      quad(664, 255, 730, 245, 740, 220, 700, 225);
      ellipse(676, 266, 15, 30);
      fill(0, 0, 120);
      quad(730, 320, 690, 330, 710, 350, 720, 350);
      
      
        //right blue
        quad(715, 285, 730, 225, 730, 320, 720, 330);
        
          //left blue
          quad(660, 245, 685, 290, 700, 330, 690, 330);
        
      
  //Head
      noStroke();
      fill(210, 0 , 0);
      ellipse(660, 175, 45, 45);
      ellipseMode(CORNER);
      ellipse(665, 207, 15,15);
      quad(665, 215, 680, 236, 700, 222, 695, 180);
      
  //Eyes
      fill(0);
      ellipse(670, 203, 10,10);
      triangle(667, 215, 670, 206, 677, 213);
      triangle(678, 213, 680, 197, 670, 206);
      fill(255);
      triangle(668, 214, 670, 209, 678, 212);
      ellipse(670, 205, 8, 8);
      triangle(677, 210, 679, 199, 670, 207);
      
  //Arm on wall / Right arm
    noStroke();
    fill(0, 0, 140);
    quad(745, 218, 780, 208, 775, 225, 735, 245);
    fill(210, 0 ,0);
    quad(775, 208, 795, 180, 795, 202, 780, 225);
    rect(790, 170, 10, 30);
    fill(210 , 0 , 0 );
    ellipse(715, 215, 40, 30);
    fill(0, 0, 120);
    ellipse(719, 232, 32, 13);
    triangle(723, 240, 745, 243, 775, 218);
    fill(0,0, 155);
    ellipse(770, 206, 13, 20);

  //Arm off of wall / Left arm
    noStroke();
    fill(0, 0, 140);
    quad(646, 250, 636, 285, 647, 295, 675, 250);
    fill(210, 0, 0);
    quad(635, 288, 650, 335, 660, 332, 652, 283);
    fill(205, 0 , 0);
    ellipse(645, 235, 35, 25);
    fill(0,0,120);
    ellipse(634, 280, 20, 22);
    fill(205, 0, 0 );
    quad(650, 335, 660, 332, 666, 350, 650, 352);
    
    
  //Right Leg
    fill(0, 0, 115);
    ellipse(710, 333, 50, 15);
    fill(0, 0, 125);
    quad(729, 315, 719, 350, 775, 335, 775, 300);
    fill(0, 0, 135);
    ellipse(758, 320, 20, 35);
    fill(0, 0, 140);
    quad(765, 315, 764, 380, 774, 380, 790, 320);
    fill(0, 0, 145);
    ellipse(770, 298, 20, 35);
      //Right foot
        fill(190, 0, 0);
        ellipse(760, 374, 15, 20);
        quad(764, 380, 774, 375, 800, 382, 770, 394);
        ellipse(788, 373, 11, 13);
        quad(764, 380, 774, 381, 784, 340, 758, 341);
    
    
   //Left Leg
     fill(0, 0, 115);
     ellipse(685, 320, 38, 45);
     fill(0, 0, 130);
     ellipse(704, 336, 25, 34);
     fill(0, 0, 140);
     quad(725, 330, 705, 350, 740, 400, 747, 395);
     fill(0, 0, 150);
     ellipse(700, 320, 25, 30);
       //Left Foot
         fill(190, 0, 0);
         ellipse(735, 390, 15, 22);
         quad(745, 410, 770, 415, 770, 410, 744, 390);
         quad(740, 400, 747, 395, 738, 370, 721, 372);


    //Duplicate layer of spiderman to create venom when mouse is moved
  
  //Neck
  noStroke();
  fill(15, mouseY*sin(frameCount*.1));
  quad(690, 210, 700, 207, 715, 240, 685, 245);
  
      //Torso
      fill(30, mouseY*sin(frameCount*.1));
      ellipse(680, 240, 35, 17);
      quad(665, 255, 730, 240, 730, 320, 690, 330);
      quad(664, 255, 730, 245, 740, 220, 700, 225);
      ellipse(676, 266, 15, 30);
      fill(110, mouseY*sin(frameCount*.1));
      quad(730, 320, 690, 330, 710, 350, 720, 350);
      
      
        //right blue
        quad(715, 285, 730, 225, 730, 320, 720, 330);
        
          //left blue
          quad(660, 245, 685, 290, 700, 330, 690, 330);
        
      
  //Head
      noStroke();
      fill(30, mouseY*sin(frameCount*.1));
      ellipse(660, 175, 45, 45);
      ellipseMode(CORNER);
      ellipse(665, 207, 15,15);
      quad(665, 215, 680, 236, 700, 222, 695, 180);
      
  //Eyes
      fill(0);
      ellipse(670, 203, 10,10);
      triangle(667, 215, 670, 206, 677, 213);
      triangle(678, 213, 680, 197, 670, 206);
      fill(255);
      triangle(668, 214, 670, 209, 678, 212);
      ellipse(670, 205, 8, 8);
      triangle(677, 210, 679, 199, 670, 207);
      
  //Arm on wall / Right arm
    noStroke();
    fill(80, mouseY*sin(frameCount*.1));
    quad(745, 218, 780, 208, 775, 225, 735, 245);
    fill(30, mouseY*sin(frameCount*.1));
    quad(775, 208, 795, 180, 795, 202, 780, 225);
    rect(790, 170, 10, 30);
    fill(30, mouseY*sin(frameCount*.1));
    ellipse(715, 215, 40, 30);
    fill(60, mouseY*sin(frameCount*.1));
    ellipse(719, 232, 32, 13);
    triangle(723, 240, 745, 243, 775, 218);
    fill(85, mouseY*sin(frameCount*.1));
    ellipse(770, 206, 13, 20);

  //Arm off of wall / Left arm
    noStroke();
    fill(60, mouseY*sin(frameCount*.1));
    quad(646, 250, 636, 285, 647, 295, 675, 250);
    fill(30, mouseY*sin(frameCount*.1));
    quad(635, 288, 650, 335, 660, 332, 652, 283);
    fill(30, mouseY*sin(frameCount*.1));
    ellipse(645, 235, 35, 25);
    fill(60, mouseY*sin(frameCount*.1));
    ellipse(634, 280, 20, 22);
    fill(30, mouseY*sin(frameCount*.1));
    quad(650, 335, 660, 332, 666, 350, 650, 352);
    
    
  //Right Leg
    fill(45, mouseY*sin(frameCount*.1));
    ellipse(710, 333, 50, 15);
    fill(50, mouseY*sin(frameCount*.1));
    quad(729, 315, 719, 350, 775, 335, 775, 300);
    fill(55, mouseY*sin(frameCount*.1));
    ellipse(758, 320, 20, 35);
    fill(60, mouseY*sin(frameCount*.1));
    quad(765, 315, 764, 380, 774, 380, 790, 320);
    fill(65, mouseY*sin(frameCount*.1));
    ellipse(770, 298, 20, 35);
      //Right foot
        fill(30, mouseY*sin(frameCount*.1));
        ellipse(760, 374, 15, 20);
        quad(764, 380, 774, 375, 800, 382, 770, 394);
        ellipse(788, 373, 11, 13);
        quad(764, 380, 774, 381, 784, 340, 758, 341);
    
    
   //Left Leg
     fill(45, mouseY*sin(frameCount*.1));
     ellipse(685, 320, 38, 45);
     fill(50, mouseY*sin(frameCount*.1));
     ellipse(704, 336, 25, 34);
     fill(55, mouseY*sin(frameCount*.1));
     quad(725, 330, 705, 350, 740, 400, 747, 395);
     fill(60, mouseY*sin(frameCount*.1));
     ellipse(700, 320, 25, 30);
       //Left Foot
         fill(30, mouseY*sin(frameCount*.1));
         ellipse(735, 390, 15, 22);
         quad(745, 410, 770, 415, 770, 410, 744, 390);
         quad(740, 400, 747, 395, 738, 370, 721, 372);
  

    
}