       @s.lineTo(20*i,640)
       @s.stroke()
     @field.world.ClearForces()
+
+  click: ->
+    iris.field.shoot(event.clientX / 20, event.clientY / 20, 12) # should be customizable
 }
 
 window.onload = ->

      wallFixture.shape.SetAsBox(0.5,8)
      wallBody = new b2BodyDef
      wallBody.type = b2Body.b2_staticBody
      wallBody.position.Set(2.5,15)
      @world.CreateBody(wallBody).CreateFixture(wallFixture)
      wallBody.position.Set(21.5,15)

    debugDraw.SetFlags b2DebugDraw.e_shapeBit | b2DebugDraw.e_jointBit
    @field.world.SetDebugDraw debugDraw
    @field.init()
    document.getElementById("screen").onmousedown = @click
    console.log "Iris ready"
    window.setInterval(update, 1000/30)

  update : ->
    @field.world.Step(1/30, 10, 10) # should be customizable
    b = iris.field.world.GetBodyList()
    while(b)
      if b.GetType() == 1
        pos = b.GetPosition()
        b.SetPosition(new b2Vec2(pos.x, pos.y + 0.01)) # should be customizable
      b = b.GetNext()

    @field.world.DrawDebugData()
    # grid
    @s.lineWidth = 1
