import saito.objloader.*; import processing.opengl.*; OBJModel model; float rotX; float rotY; void setup() { size(400, 400, OPENGL); model = new OBJModel(this, "crystaphyll.obj"); } void draw() { background(51); noStroke(); lights(); pushMatrix(); translate(width/2, height/2, 0); pointLight(255, 255, 255, 0, -200, 200); rotateX(rotY); rotateY(rotX); scale(20.0); model.drawMode(POLYGON); model.draw(); popMatrix(); } void keyPressed() { if(key == 'a') model.enableTexture(); else if(key=='b') model.disableTexture(); } void mouseDragged() { rotX += (mouseX - pmouseX) * 0.01; rotY -= (mouseY - pmouseY) * 0.01; }