From 638111c3b1a0bdfdebe9acb2c8e50b8351e88056 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Mon, 15 Jun 2015 08:46:35 +0200 Subject: [PATCH] Added default time in Camera.js --- js/Camera.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/Camera.js b/js/Camera.js index b129a5d..d1bf1ca 100644 --- a/js/Camera.js +++ b/js/Camera.js @@ -13,6 +13,9 @@ Camera.prototype = Object.create(THREE.PerspectiveCamera.prototype); // Update function Camera.prototype.update = function(time) { + if (time === undefined) { + time = 20; + } this.theta += 0.01 * time / 20; this.position.x = Camera.DISTANCE_X*Math.cos(this.theta); this.position.y = Camera.DISTANCE_X*Math.sin(this.theta);