Skip to content

Instantly share code, notes, and snippets.

@runemadsen
Created March 10, 2014 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save runemadsen/9476119 to your computer and use it in GitHub Desktop.
Save runemadsen/9476119 to your computer and use it in GitHub Desktop.
void setup()
{
size(640, 360, P3D);
background(0);
smooth();
}
void draw()
{
background(0);
noStroke();
translate(200, 100, 0);
rotateY(radians(mouseX));
rotateX(radians(mouseY));
rect(0, 0, 200, 30);
rect(0, 50, 200, 30);
rect(0, 100, 200, 30);
rotateY(radians(90));
fill(255, 0, 0);
rect(0, 0, 200, 30);
rect(0, 50, 200, 30);
rect(0, 100, 200, 30);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment