Explorar o código

Merge pull request #15402 from HypnosNova/dev

the octree intersectOctreeObjects
Mr.doob %!s(int64=6) %!d(string=hai) anos
pai
achega
96ca78e52f
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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;
 
 	};