Corrected bug
This commit is contained in:
parent
06e672bb22
commit
ff56af77b8
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue