     contacts
 
   draw: =>
-    for object in @objects
-      object.draw @display
-      object.drawDebug @display
+    for body in @bodies
+      body.draw @display
+      body.drawDebug @display
     @stats.update()
 
 class Display


  window.world = new World "physics"

  window.rect = new Rectangle 2, 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
    color: "#08F"

  world.addObject rect
  world.addObject rect2

class World
  constructor: (element) ->

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

    @bodies = []
    @paused = true

    _.extend @ctx,
