Browse Source

Update examples/js/Octree.js

sunxueqing 6 years ago
parent
commit
ff604aacb8
1 changed files with 5 additions and 0 deletions
  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;
 
 	};