Browse Source

Updated builds.

Mr.doob 4 years ago
parent
commit
3a8fc4030d
3 changed files with 29 additions and 25 deletions
  1. 24 9
      build/three.js
  2. 0 0
      build/three.min.js
  3. 5 16
      build/three.module.js

+ 24 - 9
build/three.js

@@ -34352,10 +34352,18 @@
 	});
 
 	function Raycaster(origin, direction, near, far) {
+		if (near === void 0) {
+			near = 0;
+		}
+
+		if (far === void 0) {
+			far = Infinity;
+		}
+
 		this.ray = new Ray(origin, direction); // direction is assumed to be normalized (for accurate distance calculations)
 
-		this.near = near || 0;
-		this.far = far || Infinity;
+		this.near = near;
+		this.far = far;
 		this.camera = null;
 		this.layers = new Layers();
 		this.params = {
@@ -34416,20 +34424,27 @@
 				console.error('THREE.Raycaster: Unsupported camera type: ' + camera.type);
 			}
 		},
-		intersectObject: function intersectObject(object, recursive, optionalTarget) {
-			var intersects = optionalTarget || [];
+		intersectObject: function intersectObject(object, recursive, intersects) {
+			if (recursive === void 0) {
+				recursive = false;
+			}
+
+			if (intersects === void 0) {
+				intersects = [];
+			}
 
 			_intersectObject(object, this, intersects, recursive);
 
 			intersects.sort(ascSort);
 			return intersects;
 		},
-		intersectObjects: function intersectObjects(objects, recursive, optionalTarget) {
-			var intersects = optionalTarget || [];
+		intersectObjects: function intersectObjects(objects, recursive, intersects) {
+			if (recursive === void 0) {
+				recursive = false;
+			}
 
-			if (Array.isArray(objects) === false) {
-				console.warn('THREE.Raycaster.intersectObjects: objects is not an Array.');
-				return intersects;
+			if (intersects === void 0) {
+				intersects = [];
 			}
 
 			for (var i = 0, l = objects.length; i < l; i++) {

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


+ 5 - 16
build/three.module.js

@@ -44146,13 +44146,13 @@ Object.assign( GLBufferAttribute.prototype, {
 
 } );
 
-function Raycaster( origin, direction, near, far ) {
+function Raycaster( origin, direction, near = 0, far = Infinity ) {
 
 	this.ray = new Ray( origin, direction );
 	// direction is assumed to be normalized (for accurate distance calculations)
 
-	this.near = near || 0;
-	this.far = far || Infinity;
+	this.near = near;
+	this.far = far;
 	this.camera = null;
 	this.layers = new Layers();
 
@@ -44237,9 +44237,7 @@ Object.assign( Raycaster.prototype, {
 
 	},
 
-	intersectObject: function ( object, recursive, optionalTarget ) {
-
-		const intersects = optionalTarget || [];
+	intersectObject: function ( object, recursive = false, intersects = [] ) {
 
 		intersectObject( object, this, intersects, recursive );
 
@@ -44249,16 +44247,7 @@ Object.assign( Raycaster.prototype, {
 
 	},
 
-	intersectObjects: function ( objects, recursive, optionalTarget ) {
-
-		const intersects = optionalTarget || [];
-
-		if ( Array.isArray( objects ) === false ) {
-
-			console.warn( 'THREE.Raycaster.intersectObjects: objects is not an Array.' );
-			return intersects;
-
-		}
+	intersectObjects: function ( objects, recursive = false, intersects = [] ) {
 
 		for ( let i = 0, l = objects.length; i < l; i ++ ) {
 

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