       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

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

  currentType = "centered"
  currentObject = null

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

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

    objectFilterChain: (fn) ->
      objectFilters.push fn

    transformFilterChain: (fn) ->
      transformFilters.push fn

  self.attrAccessor "transform" 

  self.include(Bindable)
