       }
       frames: [0]
     currentFrameIndex: 0
+    debugAnimation: true
     lastUpdate: new Date().getTime()
     useTimer: false
     transform: Matrix.IDENTITY

      I.currentFrameIndex = firstFrame
      I.width = firstSprite.width
      I.height = firstSprite.height 

  transform: ->
    I.transform

  before:  
    update: () ->       
      if I.useTimer
        time = new Date().getTime()

        updateFrame = (time - I.lastUpdate) >= I.activeAnimation.speed

        if updateFrame
          I.lastUpdate = time
          if I.activeAnimation.triggers && I.activeAnimation.triggers[I.currentFrameIndex]
            I.activeAnimation.triggers[I.currentFrameIndex].each (event) ->
              self.trigger(event)

          advanceFrame()
      else
        if I.activeAnimation.triggers && I.activeAnimation.triggers[I.currentFrameIndex]
          I.activeAnimation.triggers[I.currentFrameIndex].each (event) ->
            self.trigger(event)


      I.data.tileset.each (spriteData, i) ->
        I.spriteLookup[i] = Sprite.fromURL(spriteData.src)  
  else
    throw "No animation data provided. Use animationName to specify an animation to load from the project or pass in raw JSON to the data key."

  advanceFrame = ->
    frames = I.activeAnimation.frames
