FSOSS 2010/processing.js/box1

From CDOT Wiki
Revision as of 14:04, 26 October 2010 by Asalga (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
/*
  FSOSS 2010
  Andor Salga
  Example of box
*/
import processing.opengl.*;

void setup()
{
  size(400, 400, OPENGL);
}

void draw()
{
  background(#336699);
 
  // center in the canvas
  translate(width/2, height/2, 150);
 
  rotateY(radians(45));
 
  rotateX( frameCount/250.0f );
 
  box(50);
}

Run me