 
   return self
 
+
+Object.extend(Camera, oldCamera)

  transformFilters = []

  focusOn = (object) ->
    objectCenter = object.center()

    centerOffset = objectCenter.subtract(I.screen.width / 2, I.screen.height / 2)

    deadzone = I.deadzone.scale(1 / (2 * I.zoom))

    centerRect = Rectangle
      x: centerOffset.x - deadzone.x
      y: centerOffset.y - deadzone.y
      width: 2 * deadzone.x
      height: 2 * deadzone.y

    I.scroll = Point(
      I.scroll.x.clamp(centerRect.left, centerRect.right)
      I.scroll.y.clamp(centerRect.top, centerRect.bottom)
    )

    I.scroll.x = I.scroll.x.clamp(I.cameraBounds.left, I.cameraBounds.right - I.screen.width)
    I.scroll.y = I.scroll.y.clamp(I.cameraBounds.top, I.cameraBounds.bottom - I.screen.height)

  followTypes =
    centered: (object) ->              


      objects.invoke "trigger", "overlay", canvas

  self.include(Bounded)

  # The order of theses includes is important for
  # the way in wich they modify the camera view transform
  self.include(Camera.ZSort)
  self.include(Camera.Zoom)
  self.include(Camera.Rotate)
