Browse Source

Editor: Simplified code. Thanks SET001@IRC.

Mr.doob 10 years ago
parent
commit
fa1e48b370
1 changed files with 2 additions and 8 deletions
  1. 2 8
      editor/js/Viewport.js

+ 2 - 8
editor/js/Viewport.js

@@ -85,19 +85,13 @@ var Viewport = function ( editor ) {
 
 	// events
 
-	var getIntersects = function ( point, object ) {
+	var getIntersects = function ( point, objects ) {
 
 		mouse.set( ( point.x * 2 ) - 1, - ( point.y * 2 ) + 1 );
 
 		raycaster.setFromCamera( mouse, camera );
 
-		if ( Array.isArray( object ) ) {
-
-			return raycaster.intersectObjects( object );
-
-		}
-
-		return raycaster.intersectObject( object );
+		return raycaster.intersectObjects( objects );
 
 	};