• fullscreen
  • image_draft_2.pde
  • PImage well;
    PImage tree;
    PImage fish;
    PImage lion;
    
    int x = 600;
    int y = 300;
    
    float a = 300;
    float b = 150;
    
    void setup() {
      size(600, 300);
      smooth();
      frameRate(20);
      imageMode(CENTER);
      rectMode(CENTER);
    }
     
    void draw() {
      background(0);
      well = loadImage("1.png");
      image(well,width/2,height/2,x,y);
     
     if(x <= 2000) {
       x += 300; y+=300;
     } else {
       fill(0);
       rect(width/2,height/2,width,height);
     }
      
      if(x >= 2000 && a >= width - width * 2.4) {
        tree = loadImage("2.png");
        image(tree,a,b,600,300);
        a -= 100;
      } 
        
    
    fish = loadImage("3.png");
    image(fish,a+width,b,600,300);
    
    lion = loadImage("4.png");
    image(lion,a+width * 2,b,600,300);
    
      }
      
    
    
    
    

    code

    tweaks (1)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    griffin lb

    workshop5

    Add to Faves Me Likey@!
    You must login/register to add this sketch to your favorites.

    You need to login/register to comment.