Should be better
This commit is contained in:
parent
1903cec01c
commit
b3d7d27437
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue