Improved initial position of replay camera

This commit is contained in:
Thomas FORGIONE 2015-05-22 17:28:10 +02:00
parent d385c9ee22
commit a51aade42b
2 changed files with 1 additions and 10 deletions

View File

@ -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();
}

View File

@ -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());