Created
November 23, 2014 04:54
-
-
Save enjrolas/b22af5fd092493f01471 to your computer and use it in GitHub Desktop.
Blinking voxel
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
import L3D.*; | |
L3D cube; | |
void setup() | |
{ | |
size(displayWidth, displayHeight, P3D); | |
cube=new L3D(this); | |
cube.enableDrawing(); | |
cube.enableMulticastStreaming(); | |
} | |
void draw() | |
{ | |
background(0); | |
cube.background(0); | |
if ((frameCount%20)>10) | |
cube.setVoxel(3, 3, 3, color(255, 0, 0)); | |
translate(width/2, height/2); | |
rotateX(PI/8); | |
rotateY(-PI/8); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment