Quellcode durchsuchen

Matrix4.lookAt(): Added comments.

Mr.doob vor 8 Jahren
Ursprung
Commit
be57a9cf15
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      src/math/Matrix4.js

+ 4 - 0
src/math/Matrix4.js

@@ -326,6 +326,8 @@ Object.assign( Matrix4.prototype, {
 
 			if ( z.lengthSq() === 0 ) {
 
+				// eye and target are in the same position
+
 				z.z = 1;
 
 			}
@@ -335,6 +337,8 @@ Object.assign( Matrix4.prototype, {
 
 			if ( x.lengthSq() === 0 ) {
 
+				// eye and target are in the same vertical
+
 				z.z += 0.0001;
 				x.crossVectors( up, z );