瀏覽代碼

Updated builds.

Mr.doob 2 年之前
父節點
當前提交
6097db981a
共有 4 個文件被更改,包括 8 次插入15 次删除
  1. 3 5
      build/three.cjs
  2. 3 5
      build/three.js
  3. 0 0
      build/three.min.js
  4. 2 5
      build/three.module.js

+ 3 - 5
build/three.cjs

@@ -4632,11 +4632,9 @@ class Ray {
 			tymax = (box.min.y - origin.y) * invdiry;
 		}
 
-		if (tmin > tymax || tymin > tmax) return null; // These lines also handle the case where tmin or tmax is NaN
-		// (result of 0 * Infinity). x !== x returns true if x is NaN
-
-		if (tymin > tmin || tmin !== tmin) tmin = tymin;
-		if (tymax < tmax || tmax !== tmax) tmax = tymax;
+		if (tmin > tymax || tymin > tmax) return null;
+		if (tymin > tmin || isNaN(tmin)) tmin = tymin;
+		if (tymax < tmax || isNaN(tmax)) tmax = tymax;
 
 		if (invdirz >= 0) {
 			tzmin = (box.min.z - origin.z) * invdirz;

+ 3 - 5
build/three.js

@@ -4634,11 +4634,9 @@
 				tymax = (box.min.y - origin.y) * invdiry;
 			}
 
-			if (tmin > tymax || tymin > tmax) return null; // These lines also handle the case where tmin or tmax is NaN
-			// (result of 0 * Infinity). x !== x returns true if x is NaN
-
-			if (tymin > tmin || tmin !== tmin) tmin = tymin;
-			if (tymax < tmax || tmax !== tmax) tmax = tymax;
+			if (tmin > tymax || tymin > tmax) return null;
+			if (tymin > tmin || isNaN(tmin)) tmin = tymin;
+			if (tymax < tmax || isNaN(tmax)) tmax = tymax;
 
 			if (invdirz >= 0) {
 				tzmin = (box.min.z - origin.z) * invdirz;

文件差異過大導致無法顯示
+ 0 - 0
build/three.min.js


+ 2 - 5
build/three.module.js

@@ -6056,12 +6056,9 @@ class Ray {
 
 		if ( ( tmin > tymax ) || ( tymin > tmax ) ) return null;
 
-		// These lines also handle the case where tmin or tmax is NaN
-		// (result of 0 * Infinity). x !== x returns true if x is NaN
+		if ( tymin > tmin || isNaN( tmin ) ) tmin = tymin;
 
-		if ( tymin > tmin || tmin !== tmin ) tmin = tymin;
-
-		if ( tymax < tmax || tmax !== tmax ) tmax = tymax;
+		if ( tymax < tmax || isNaN( tmax ) ) tmax = tymax;
 
 		if ( invdirz >= 0 ) {
 

部分文件因文件數量過多而無法顯示