Browse Source

Merge pull request #20916 from 1993heqiang/remove_redundant_brackets

remove redundant brackets
Mr.doob 4 years ago
parent
commit
52833c6b27
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/core/Object3D.js
  2. 2 2
      src/core/Raycaster.js

+ 1 - 1
src/core/Object3D.js

@@ -320,7 +320,7 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 
 		}
 		}
 
 
-		if ( ( object && object.isObject3D ) ) {
+		if ( object && object.isObject3D ) {
 
 
 			if ( object.parent !== null ) {
 			if ( object.parent !== null ) {
 
 

+ 2 - 2
src/core/Raycaster.js

@@ -72,13 +72,13 @@ Object.assign( Raycaster.prototype, {
 
 
 	setFromCamera: function ( coords, camera ) {
 	setFromCamera: function ( coords, camera ) {
 
 
-		if ( ( camera && camera.isPerspectiveCamera ) ) {
+		if ( camera && camera.isPerspectiveCamera ) {
 
 
 			this.ray.origin.setFromMatrixPosition( camera.matrixWorld );
 			this.ray.origin.setFromMatrixPosition( camera.matrixWorld );
 			this.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize();
 			this.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize();
 			this.camera = camera;
 			this.camera = camera;
 
 
-		} else if ( ( camera && camera.isOrthographicCamera ) ) {
+		} else if ( camera && camera.isOrthographicCamera ) {
 
 
 			this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera
 			this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera
 			this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );
 			this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );