Advertisement
xeromino

shake2

Mar 2nd, 2014
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. float x,y,n;
  2. PImage img;
  3.  
  4. void setup() {
  5.   img = loadImage("2.jpg");
  6.   size(img.width, img.height);
  7.   background(0);
  8.   noFill();
  9.   imageMode(CENTER);
  10. }
  11.  
  12. void draw() {
  13.  
  14.   x = width/2+ noise(n)*20;
  15.   y = height/2 + noise(n+20)*20;
  16.   tint(noise(n+50)*255,noise(n)*255,noise(n+20)*255, 150);
  17.   image(img, x-10, y-10);
  18.  
  19.   n += .5;
  20.  
  21.   if (frameCount>50 && frameCount<75) saveFrame("image-####.gif");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement