       #TODO: This is a bad idea in case access is attempted during update
       objects: ->
         I.objects
-        
+
       objectAt: (x, y) ->
         targetObject = null
         bounds =

    intervalId = null

    queuedObjects = []
  
    update = ->
      I.objects = I.objects.select (object) ->
        object.update()
        
      I.objects = I.objects.concat(queuedObjects)
      queuedObjects = []
      
      self.trigger "update"

    draw = ->

          intervalId = setInterval(() ->
            step()
          , 1000 / I.FPS)

      stop: () ->
        clearInterval(intervalId)
        intervalId = null

      play: ->
        I.paused = false

      pause: ->
        I.paused = true

      paused: ->
        I.paused

      setFramerate: (newFPS) ->
        I.FPS = newFPS
        self.stop()
        self.start()

    self.attrAccessor "ambientLight"
    self.attrAccessor "backgroundColor"
    self.attrAccessor "cameraTransform"
