Files
processing4/java/examples/Demos/Tests/RestartTest/RestartTest.pde
Casey Reas 3494890075
2012-08-31 03:10:40 +00:00

27 lines
437 B
Plaintext

PShape cube;
void setup() {
size(400, 400, P3D);
smooth();
cube = createShape(BOX, 100);
}
void draw() {
background(120);
lights();
translate(mouseX, mouseY);
rotateX(frameCount * 0.01f);
rotateY(frameCount * 0.01f);
shape(cube);
}
void keyPressed() {
// Changing the smooth configuration restarts the OpenGL surface.
// Automatically recreates all the current GL resources.
noSmooth();
}