Browse Source

Raycaster: I don't think we need to return intersects there...

Mr.doob 11 years ago
parent
commit
1982817430
2 changed files with 7 additions and 7 deletions
  1. 5 5
      src/core/Raycaster.js
  2. 2 2
      src/objects/Sprite.js

+ 5 - 5
src/core/Raycaster.js

@@ -60,7 +60,7 @@
 			
 				if ( localRay.isIntersectionBox( geometry.boundingBox ) === false )  {
 				
-					return intersects;
+					return;
 					
 				}
 				
@@ -222,7 +222,7 @@
 
 			if ( raycaster.ray.isIntersectionSphere( sphere ) === false ) {
 
-				return intersects;
+				return;
 
 			}
 
@@ -235,7 +235,7 @@
 
 				if ( localRay.isIntersectionBox( geometry.boundingBox ) === false )  {
 
-					return intersects;
+					return;
 
 				}
 
@@ -245,7 +245,7 @@
 
 				var material = object.material;
 
-				if ( material === undefined ) return intersects;
+				if ( material === undefined ) return;
 
 				var attributes = geometry.attributes;
 
@@ -497,7 +497,7 @@
 			
 			if ( raycaster.ray.isIntersectionSphere( sphere ) === false ) {
 
-				return intersects;
+				return;
 
 			}
 			

+ 2 - 2
src/objects/Sprite.js

@@ -35,7 +35,7 @@ THREE.Sprite.prototype.raycast = ( function () {
 
 		if ( distance > this.scale.x ) {
 
-			return intersects;
+			return;
 
 		}
 
@@ -50,7 +50,7 @@ THREE.Sprite.prototype.raycast = ( function () {
 		
 	};
 
-} )();
+}() );
 
 THREE.Sprite.prototype.updateMatrix = function () {