   # Update each object in the list because a tick of time has gone by.
   tickObjects: (elapsedMS) ->
     object.tick(elapsedMS) for object in @objects
+
+  renderFrame: () ->
+    fpsFilter = 10
+    thisFrameFPS = 1000 / ((@now=new Date) - @lastUpdate)
+    @fps += (thisFrameFPS - @fps) / fpsFilter
+    @lastUpdate = @now
     view.render() for view in @views
 
   # Stop the scene time from advancing


class Scene
  constructor: (@game, @tickRateMS=500) ->
    @objects = []
    @views = []
    @lastTime = 0
    @polyfillAnimationFrames()

  removeIt: (property,object) ->
    _.filter @[property], (obj) ->

      if elapsed >= self.tickRateMS
        self.lastTime = time
        self.tickObjects(elapsed)
      self.renderFrame()
      window.requestAnimationFrame _frameCallback
    _frameCallback 0

