Created
November 15, 2011 18:47
-
-
Save atduskgreg/1367940 to your computer and use it in GitHub Desktop.
basic 3d rectangle in processing
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
float z; | |
void setup() | |
{ | |
size(500,500, P3D); | |
z = 0; | |
} | |
void draw() | |
{ | |
background(255); | |
translate(width/2, height/2, z); | |
rect(0, 0, 50, 50); | |
} | |
void mouseMoved(){ | |
z = map(mouseX, 0, width, 0, 500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment