Explorar el Código

Merge remote-tracking branch 'Pitel/patch-1' into dev

Mr.doob hace 14 años
padre
commit
10e42ba87a
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      src/extras/cameras/FirstPersonCamera.js

+ 3 - 3
src/extras/cameras/FirstPersonCamera.js

@@ -49,7 +49,7 @@ THREE.FirstPersonCamera = function ( parameters ) {
 
 
 	this.constrainVertical = false;
 	this.constrainVertical = false;
 	this.verticalMin = 0;
 	this.verticalMin = 0;
-	this.verticalMax = 3.14;
+	this.verticalMax = Math.PI;
 
 
 	this.domElement = document;
 	this.domElement = document;
 
 
@@ -272,7 +272,7 @@ THREE.FirstPersonCamera = function ( parameters ) {
 
 
 		if ( this.constrainVertical ) {
 		if ( this.constrainVertical ) {
 
 
-			verticalLookRatio = 3.14 / ( this.verticalMax - this.verticalMin );
+			verticalLookRatio = Math.PI / ( this.verticalMax - this.verticalMin );
 
 
 		}
 		}
 
 
@@ -286,7 +286,7 @@ THREE.FirstPersonCamera = function ( parameters ) {
 
 
 		if ( this.constrainVertical ) {
 		if ( this.constrainVertical ) {
 
 
-			this.phi = map_linear( this.phi, 0, 3.14, this.verticalMin, this.verticalMax );
+			this.phi = map_linear( this.phi, 0, Math.PI, this.verticalMin, this.verticalMax );
 
 
 		}
 		}