Skip to content

Commit

Permalink
Raycaster: Improve readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Feb 28, 2024
1 parent 4654223 commit 71c1f51
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/Raycaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Raycaster {

intersectObject( object, recursive = true, intersects = [] ) {

intersectObject( object, this, intersects, recursive );
intersect( object, this, intersects, recursive );

intersects.sort( ascSort );

Expand All @@ -81,7 +81,7 @@ class Raycaster {

for ( let i = 0, l = objects.length; i < l; i ++ ) {

intersectObject( objects[ i ], this, intersects, recursive );
intersect( objects[ i ], this, intersects, recursive );

}

Expand All @@ -99,7 +99,7 @@ function ascSort( a, b ) {

}

function intersectObject( object, raycaster, intersects, recursive ) {
function intersect( object, raycaster, intersects, recursive ) {

if ( object.layers.test( raycaster.layers ) ) {

Expand All @@ -113,7 +113,7 @@ function intersectObject( object, raycaster, intersects, recursive ) {

for ( let i = 0, l = children.length; i < l; i ++ ) {

intersectObject( children[ i ], raycaster, intersects, true );
intersect( children[ i ], raycaster, intersects, true );

}

Expand Down

0 comments on commit 71c1f51

Please sign in to comment.