Skip to content

Instantly share code, notes, and snippets.

Avatar

Geoff Blair geoffb

View GitHub Profile
@mrdoob
mrdoob / gist:5245098
Created Mar 26, 2013
Avoiding huge delta times when switching tabs.
View gist:5245098
// firefox
document.addEventListener( 'visibilitychange', function ( event ) {
if ( document.hidden === false ) {
lastTime = performance.now();
}
You can’t perform that action at this time.