 
   window.world = new World "physics"
 
-  window.rect = new Rectangle 2, 2,
+  window.rect = new Rectangle 5, 2,
     position: [0, -1]
-    inverseMass: 1/4
     inverseMass: 0
-    velocity: [0, 0.0001]
     # angularVelocity: Math.PI/4
     color: "#F00"
 
   window.rect2 = new Rectangle 1, 1,
     position: [0,0.5]
-    angle: 0.2
     inverseMass: 1/1
-    # velocity: [0, -1.5]
     # angularVelocity: -Math.PI/2
+    acceleration: [0, -2]
     color: "#08F"
 
-  world.addObject rect
-  world.addObject rect2
+  world.addBody rect
+  world.addBody rect2
+
+window.debug = (msgs...) ->
+  # console.log msgs...
 
 class World
   constructor: (element) ->

        if e.keyCode is 32 # space
          @paused = !@paused

  addObject: (object) ->
    @objects.push object

  removeObject: (object) ->
    @objects = _without(@objects, object)

  update: =>
    return if @paused

    dt = @ctx.dt / 1000

    for object in @objects
      object.reset()
      object.resetDebug()
      object.integrate dt for object in @objects

    @contacts = @narrowPhaseCollisions @broadPhaseCollisions()


    @stats = Utils.drawStats()
    @display = new Display @ctx, [0, 0], 50

    @bodies = []
    @paused = true

    _.extend @ctx,
