Created
December 7, 2018 15:54
-
-
Save Jolievw/d7a97854991aac2fbe68d494b04f270b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count = 0; | |
int position = 1; | |
PImage sky; | |
void setup() { | |
fullScreen(); | |
//size(800,600); | |
frameRate(20); | |
} | |
void draw() { | |
count++; | |
if (count > 36) { | |
sky = loadImage("img.jpg"); | |
//image(sky, 0, (height/4*position)-height/4); | |
PImage crop = sky.get(0,0,width,height/24); | |
image(crop, 0, (height/24*position)-height/24); | |
position++; | |
if (position > 24) { | |
position = 1; | |
} | |
count = 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment