     @canvas = document.createElement 'canvas'
     width = @frames[0].naturalWidth
     height = @frames[0].naturalHeight
+    console.log 'frames',@frames.length
     @canvas.width = width
     @canvas.height = height
     width2 = width // 2



  drawFrame:->
    if @currentFrame+1>=@frames.length
      @currentFrame = 0
    if @currentFrame<=@fadeOut or @currentFrame+@fadeOut == @frames.length
      @ctx.globalAlpha = 0.5
    else
      @ctx.globalAlpha = 1
    frame = @frames[@currentFrame++]
    @ctx.drawImage frame,0,0

  animate:->
    if @playing

  animPath:''
  frames:[]
  currentFrame:0
  fadeOut:50


  constructor: (ytid) ->
