Skip to content

Commit ff604aa

Browse files
author
sunxueqing
committed
Update examples/js/Octree.js
1 parent 3ef52bb commit ff604aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/js/Octree.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,6 +2131,11 @@
21312131

21322132
}
21332133

2134+
// we should sort it, the elements in it aren't arranged by distance.
2135+
intersects.sort( function( a, b ) {
2136+
return a.distance - b.distance;
2137+
} );
2138+
21342139
return intersects;
21352140

21362141
};

0 commit comments

Comments
 (0)