diff --git a/js/PointerCamera.js b/js/PointerCamera.js index 92241c5..e4ea4bb 100644 --- a/js/PointerCamera.js +++ b/js/PointerCamera.js @@ -604,6 +604,7 @@ PointerCamera.prototype.onMouseMove = function(event) { this.mouseMove.x = this.mouse.x - mouse.x; this.mouseMove.y = this.mouse.y - mouse.y; + this.mouseMoved = true; } } @@ -614,7 +615,7 @@ PointerCamera.prototype.onMouseMove = function(event) { */ PointerCamera.prototype.onMouseMovePointer = function(e) { - if (this.isLocked) { + if (this.isLocked()) { // Backup theta and phi this.previousTheta = this.theta; @@ -625,6 +626,7 @@ PointerCamera.prototype.onMouseMovePointer = function(e) { this.mouseMove.x *= -(this.sensitivity/5); this.mouseMove.y *= (this.sensitivity/5); + this.mouseMoved = true; } diff --git a/js/prototype/main.js b/js/prototype/main.js index c81a7cb..36b877b 100644 --- a/js/prototype/main.js +++ b/js/prototype/main.js @@ -17,7 +17,7 @@ var main_section = document.getElementById('main-section'); var container_size = { width: function() { return 1024; }, height: function() { return 768; } -} +}; var stats; @@ -50,7 +50,7 @@ window.onbeforeunload = function() { } -} +}; init(); @@ -79,7 +79,7 @@ function init() { renderer = new THREE.WebGLRenderer({alpha:true, antialias:true}); // Collidable objects to prevent camera from traversing objects - var collidableObjects = new Array(); + var collidableObjects = []; // Initialize renderer container = document.getElementById('container');