File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ <h2>Biggest Streak: {{maxStreak}}</h2>
164164 if ( this . playing ) {
165165 update ( )
166166 } else {
167- cancelAnimationFrame ( loop )
167+ clearTimeout ( timeoutId )
168168 }
169169 }
170170 }
@@ -183,15 +183,15 @@ <h2>Biggest Streak: {{maxStreak}}</h2>
183183 }
184184 }
185185
186- var loop
186+ var timeoutId
187187 var lastFrame = null
188188 function update ( ) {
189189 var thisFrame = window . performance . now ( )
190190 if ( lastFrame ) {
191191 app . fps = Math . round ( fpsMeter . push ( 1000 / ( thisFrame - lastFrame ) ) )
192192 }
193193 app . servers = Object . freeze ( generateServers ( ) )
194- loop = setTimeout ( update , 0 ) // not using rAF because that limits us to 60fps!
194+ timeoutId = setTimeout ( update , 0 ) // not using rAF because that limits us to 60fps!
195195 lastFrame = thisFrame
196196 }
197197 </ script >
You can’t perform that action at this time.
0 commit comments