PFont font; int clickX,clickY; float rotX, rotY; GlyphSwarm[] digits; int timer; //------------- void setup(){ size(300,300,P3D); framerate(30); font = loadFont("trebuchet.vlw"); textFont(font,20); textMode(MODEL); fill(128); stroke(128,40); digits = new GlyphSwarm[8]; for(int i=0;i= 1f){ rotX = desiredRotX; rotY = desiredRotY; rotZ = desiredRotZ; } } } //-------------------------------------------------------------- //-------------------------------------------------------------- //-------------------------------------------------------------- class Colon extends GlyphSwarm{ Colon(){ super(0); } //------------- void visualize(){ pushMatrix(); fill(0,192); text(":",-2,10,100); popMatrix(); } } //-------------------------------------------------------------- //-------------------------------------------------------------- //-------------------------------------------------------------- class Glyph{ float rotX, rotY, rotZ; String glyph; boolean active; //------------- Glyph( String s ){ glyph = s; active = false; } //------------- void setAngle(float rotX, float rotY, float rotZ){ this.rotX = rotX; this.rotY = rotY; this.rotZ = rotZ; } //------------- void visualize(float rX, float rY, float rZ){ fill(0,64); if(active) fill(0,192); pushMatrix(); rotateZ( rotZ+rZ ); rotateY( rotY+rY ); rotateX( rotX+rX ); line(0,0,60,0,0,90); text(glyph,-5,10,100); popMatrix(); } }