       canvas.context().rect(0, 0, I.screen.width, I.screen.height)
       canvas.context().clip()
 
-      # TODO Turn this zSort into a per camera object stream filter
-      # This will also enable filters like clipping region tests
-      if I.zSort
-        objects.sort (a, b) ->
-          a.I.zIndex - b.I.zIndex
+      objects = filterObjects(objects)
 
       canvas.withTransform self.transform(), (canvas) ->
         self.trigger "beforeDraw", canvas

      # TODO: Easing
      I.scroll = object.center()

  self.attrAccessor "transform" 

  self.include(Bindable)

    cameraRotation: 0
    transform: Matrix()
    scroll: Point(0, 0)

  currentType = "centered"
  currentObject = null

  objectFilters = []

  filterObjects = (objects) ->
    for filter in objectFilters
      objects = filter(objects)

    return objects

  transformFilters = []

  filterTransform = (transform) ->
    for filter in transformFilters
      transform = filter(transform)

    return transform

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