Thursday, February 4, 2016

randommm

import gifAnimation.*;
float trigger = 0;
PImage bg;

//Gif loopingGif1l;
Gif loopingGif1r;

float mouseAktuell;

public void setup() {
 size(698, 465, P3D);
  bg = loadImage("rrrrrr.png");
  frameRate(30);
  background(0);

 // create the GifAnimation object for playback
 loopingGif1r = new Gif(this, "animated-bubbling-fire.gif");
 loopingGif1r.loop();
 //loopingGif1l = new Gif(this, "12gespiegelt.gif");
// loopingGif1l.loop();
}

void draw() {
  trigger = random(5);

 //mouseAktuell=mouseX;
 if(trigger>4.9){
  image(bg, random(400),random(400));
 }
}

void keyPressed(){


   image(loopingGif1r, mouseX-130, mouseY-130);
        //mouseAktuell=mouseX;



   //image(loopingGif1l, mouseX, mouseY);
   // mouseAktuell=mouseX;
}

void keyReleased(){
background(0,0,0,10);
}




No comments:

Post a Comment