Created
February 17, 2016 21:46
-
-
Save sabotai/4974d27cd8b8abbc5e95 to your computer and use it in GitHub Desktop.
GD105 Spring 2016 Week 3
This file contains hidden or 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
PImage cage; | |
PImage bg; | |
int cageW, cageH; | |
int cageX, cageY; | |
void setup(){ | |
size(1280,720); | |
bg = loadImage("funny_giraffe_25.jpg"); | |
cage = loadImage("cagey.png"); | |
cageW = 150; | |
cageH = 150; | |
cageX = 0; | |
cageY = height/2; | |
} | |
void draw(){ | |
cageW = cageW + 5; | |
cageH = int( cageW * 0.5 ); | |
cageX = millis() / 40; | |
cageY = int( height/2 + (200 * sin(cageX)) ); | |
println("a message... like cageW is equal to... " + cageW); | |
//try using "tint(*, *, *, *);" | |
imageMode(CORNER); | |
image(bg, 0, 0, width, height); | |
imageMode(CENTER); | |
image(cage,cageX,cageY, cageW, cageH); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment