From 3b44c4fd64fa8654becd70e1eb91bc026ffbe6f1 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Fri, 19 Jun 2015 16:21:16 +0200 Subject: [PATCH] Fixed size of container --- js/prototype/main.js | 25 +++++++++++++++---------- js/prototype/replay.js | 25 +++++++++++++++---------- js/prototype/sponza.js | 25 +++++++++++++++---------- 3 files changed, 45 insertions(+), 30 deletions(-) diff --git a/js/prototype/main.js b/js/prototype/main.js index 4d048bc..0add11a 100644 --- a/js/prototype/main.js +++ b/js/prototype/main.js @@ -2,17 +2,22 @@ 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 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; - } -}; + width: function() { return 1024; }, + height: function() { return 768; } +} // Let's be sure we avoid using global variables var onWindowResize = (function() { diff --git a/js/prototype/replay.js b/js/prototype/replay.js index 2c5033a..8b2f28b 100644 --- a/js/prototype/replay.js +++ b/js/prototype/replay.js @@ -2,17 +2,22 @@ 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 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; - } -}; + width: function() { return 1024; }, + height: function() { return 768; } +} var onWindowResize = (function() { diff --git a/js/prototype/sponza.js b/js/prototype/sponza.js index 7aa8dc2..7361fc1 100644 --- a/js/prototype/sponza.js +++ b/js/prototype/sponza.js @@ -2,17 +2,22 @@ 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 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; - } -}; + width: function() { return 1024; }, + height: function() { return 768; } +} // Let's be sure we avoid using global variables var onWindowResize = (function() {