Browse Source

Updated builds.

Mr.doob 8 years ago
parent
commit
68d88cc794
3 changed files with 44 additions and 50 deletions
  1. 5 8
      build/three.js
  2. 34 34
      build/three.min.js
  3. 5 8
      build/three.module.js

+ 5 - 8
build/three.js

@@ -3627,6 +3627,8 @@
 
 				if ( z.lengthSq() === 0 ) {
 
+					// eye and target are in the same position
+
 					z.z = 1;
 
 				}
@@ -3636,15 +3638,10 @@
 
 				if ( x.lengthSq() === 0 ) {
 
-					var t = Math.PI / 2;
-					var c = Math.cos( t ) * z.y;
-					var s = Math.sin( t ) * z.y;
-
-					te[ 0 ] = 1; te[ 4 ] =   0; te[ 8 ] =  0;
-					te[ 1 ] = 0; te[ 5 ] =   c; te[ 9 ] =  s;
-					te[ 2 ] = 0; te[ 6 ] = - s; te[ 10 ] = c;
+					// eye and target are in the same vertical
 
-					return this;
+					z.z += 0.0001;
+					x.crossVectors( up, z );
 
 				}
 

File diff suppressed because it is too large
+ 34 - 34
build/three.min.js


+ 5 - 8
build/three.module.js

@@ -3621,6 +3621,8 @@ Object.assign( Matrix4.prototype, {
 
 			if ( z.lengthSq() === 0 ) {
 
+				// eye and target are in the same position
+
 				z.z = 1;
 
 			}
@@ -3630,15 +3632,10 @@ Object.assign( Matrix4.prototype, {
 
 			if ( x.lengthSq() === 0 ) {
 
-				var t = Math.PI / 2;
-				var c = Math.cos( t ) * z.y;
-				var s = Math.sin( t ) * z.y;
-
-				te[ 0 ] = 1; te[ 4 ] =   0; te[ 8 ] =  0;
-				te[ 1 ] = 0; te[ 5 ] =   c; te[ 9 ] =  s;
-				te[ 2 ] = 0; te[ 6 ] = - s; te[ 10 ] = c;
+				// eye and target are in the same vertical
 
-				return this;
+				z.z += 0.0001;
+				x.crossVectors( up, z );
 
 			}
 

Some files were not shown because too many files changed in this diff