Corrected replay

This commit is contained in:
Thomas FORGIONE 2015-06-02 16:14:22 +02:00
parent dce76ba593
commit ef15df2905
1 changed files with 16 additions and 14 deletions

View File

@ -1,3 +1,19 @@
var isFullscreen = false;
var beenFullscreen = false;
var main_section = document.getElementById('main-section');
var container_size = {
width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;},
height: function() {
if (!isFullscreen)
return main_section.clientHeight
- document.getElementById('nav').offsetHeight
- document.getElementById('main-div').offsetHeight;
else
return screen.height;
}
};
var onWindowResize = (function() { var onWindowResize = (function() {
// Disable scrolling // Disable scrolling
@ -15,22 +31,8 @@ var stats;
var loader; var loader;
var coins = []; var coins = [];
var beenFullscreen = false;
var isFullscreen = false;
var previousTime; var previousTime;
var main_section = document.getElementById('main-section');
var container_size = {
width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;},
height: function() {
if (!isFullscreen)
return main_section.clientHeight
- document.getElementById('nav').offsetHeight
- document.getElementById('main-div').offsetHeight;
else
return screen.height;
}
};
init(); init();
animate(); animate();