Browse Source

Merge pull request #15402 from HypnosNova/dev

the octree intersectOctreeObjects
Mr.doob 6 năm trước cách đây
mục cha
commit
96ca78e52f
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      examples/js/Octree.js

+ 5 - 0
examples/js/Octree.js

@@ -2131,6 +2131,11 @@
 
 		}
 
+		// we should sort it, the elements in it aren't arranged by distance.
+		intersects.sort( function( a, b ) {
+			return a.distance - b.distance;
+		} );
+
 		return intersects;
 
 	};