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>
164
164
if ( this . playing ) {
165
165
update ( )
166
166
} else {
167
- cancelAnimationFrame ( loop )
167
+ clearTimeout ( timeoutId )
168
168
}
169
169
}
170
170
}
@@ -183,15 +183,15 @@ <h2>Biggest Streak: {{maxStreak}}</h2>
183
183
}
184
184
}
185
185
186
- var loop
186
+ var timeoutId
187
187
var lastFrame = null
188
188
function update ( ) {
189
189
var thisFrame = window . performance . now ( )
190
190
if ( lastFrame ) {
191
191
app . fps = Math . round ( fpsMeter . push ( 1000 / ( thisFrame - lastFrame ) ) )
192
192
}
193
193
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!
195
195
lastFrame = thisFrame
196
196
}
197
197
</ script >
You can’t perform that action at this time.
0 commit comments