Should be better

This commit is contained in:
Thomas FORGIONE 2015-05-13 09:33:49 +02:00
parent 1903cec01c
commit b3d7d27437
1 changed files with 3 additions and 3 deletions

View File

@ -197,7 +197,6 @@ function stopFullscreen() {
} }
function render() { function render() {
var currentTime = Date.now() - previousTime;
cameraSelecter.update(); cameraSelecter.update();
// Update recommendations (set raycastable if shown) // Update recommendations (set raycastable if shown)
@ -216,12 +215,13 @@ function render() {
coins.forEach(function(coin) { coin.update(); }); coins.forEach(function(coin) { coin.update(); });
// Update main camera // Update main camera
cameras.updateMainCamera(currentTime); var currentTime = Date.now() - previousTime;
cameras.updateMainCamera(isNaN(currentTime) ? 20 : currentTime);
previousTime = Date.now();
// Update the recommendations // Update the recommendations
cameras.update(cameras.mainCamera()); cameras.update(cameras.mainCamera());
previousTime = Date.now();
// Set current position of camera // Set current position of camera
cameras.look(); cameras.look();