import shiffman.box2d.*; import org.jbox2d.collision.shapes.*; import org.jbox2d.common.*; import org.jbox2d.dynamics.*; Box2DProcessing box2d; // the "world" Box ground, block1; void setup() { size(800,500); //smooth(); // Initialize and create the Box2D world box2d = new Box2DProcessing(this); box2d.createWorld(); box2d.setGravity(0,-10); // set gravity ground = new Box(width/2,height-10,width/2,8,1); // 1 means static block1 = new Box(width/2,height/2,10,10,0); // 0 means dynamic block1.setColor(255,0,0); } void draw() { background(255); // step through time! box2d.step(); ground.display(); block1.display(); line(block1.getX(),block1.getY(),mouseX,mouseY); }