Permalink
Browse files

Process up to 100 frames without a break

  • Loading branch information...
sickill committed Apr 11, 2012
1 parent 442f668 commit 4138deffd644090227c5e6e25412e18ffdd22b9e
Showing with 4 additions and 1 deletion.
  1. +4 −1 app/assets/javascripts/player/movie.js.coffee
@@ -13,6 +13,7 @@ class AsciiIo.Movie
@playing = false
@lastFrameTime = undefined
@timeElapsedBeforePause = undefined
+ @framesProcessed = 0
isLoaded: ->
@model.get('escaped_stdout_data') != undefined
@@ -133,9 +134,11 @@ class AsciiIo.Movie
if frame = @timing()[@frameNo]
[delay, count] = frame
- if delay <= @MIN_DELAY
+ if delay <= @MIN_DELAY and @framesProcessed < 100
+ @framesProcessed += 1
@processFrame()
else
+ @framesProcessed = 0
realDelay = delay * 1000 * (1.0 / @options.speed)
@processFrameWithDelay(realDelay)

0 comments on commit 4138def

Please sign in to comment.