Skip to content

Instantly share code, notes, and snippets.

@terryjbates
Created October 6, 2012 22:57
Show Gist options
  • Save terryjbates/3846434 to your computer and use it in GitHub Desktop.
Save terryjbates/3846434 to your computer and use it in GitHub Desktop.
Processing Tutorial at VIA-PGH
int xPos = 10;
int yPos = 10;
void setup() {
size(400,400);
// background(100,50,100);
}
void draw() {
// see a little bit of last square due to transparency
fill(100,50,100, 15);
rect(0,0, width, height);
//int yPos =
fill(200);
noStroke();
rect(xPos,yPos,20,30);
rect(xPos-30,100,20,30);
//follow the mouse
rect(mouseX, mouseY,20,30);
//fill(#620E0E);
//ellipse(60,20,100,20);
xPos = xPos + 1;
if (xPos > 400) {
xPos=0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment