From a51aade42b950ab7f6dc20c88cd10b6ac10b6ff0 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Fri, 22 May 2015 17:28:10 +0200 Subject: [PATCH] Improved initial position of replay camera --- js/prototype/ReplayCamera.js | 1 - js/prototype/replay.js | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/js/prototype/ReplayCamera.js b/js/prototype/ReplayCamera.js index 5653959..62bd030 100644 --- a/js/prototype/ReplayCamera.js +++ b/js/prototype/ReplayCamera.js @@ -19,7 +19,6 @@ var ReplayCamera = function() { xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { self.path = JSON.parse(xhr.responseText); - self.reset(); self.started = true; self.nextEvent(); } diff --git a/js/prototype/replay.js b/js/prototype/replay.js index 0b194f9..59ab5b6 100644 --- a/js/prototype/replay.js +++ b/js/prototype/replay.js @@ -18,13 +18,6 @@ var isFullscreen = false; var previousTime; var main_section = document.getElementById('main-section'); -var offset = function() { - return - document.getElementById('nav').offsetHeight - + document.getElementById('main-div').offsetHeight; -} - -console.log(document.getElementById('main-div').offsetHeight); var container_size = { width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;}, height: function() { @@ -37,8 +30,6 @@ var container_size = { } }; -console.log(container_size.width(), container_size.height()); - init(); animate(); @@ -81,6 +72,7 @@ function init() { // Initialize pointer camera var camera1 = new ReplayCamera(50, container_size.width() / container_size.height(), 0.01, 100000, container); scene.add(camera1); + camera1.reset(); // Initialize recommendations var otherCams = createBobombCameras(container_size.width(), container_size.height());