浏览代码

Update examples/js/Octree.js

sunxueqing 6 年之前
父节点
当前提交
ff604aacb8
共有 1 个文件被更改,包括 5 次插入0 次删除
  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;
 
 	};