diff --git a/build/js/potree.js b/build/js/potree.js index 944926b0..23de91de 100644 --- a/build/js/potree.js +++ b/build/js/potree.js @@ -2338,6 +2338,7 @@ Potree.PointCloudOctree.prototype.update = function(camera, renderer){ for(var j = 0; j < this.visibleGeometry.length; j++){ if(this.visibleGeometry[j].node.name === child.name){ stack.push({node: child, weight: this.visibleGeometry[j].weight}); + break; } }; } diff --git a/src/PointCloudOctree.js b/src/PointCloudOctree.js index 87bf9d83..8ed81186 100644 --- a/src/PointCloudOctree.js +++ b/src/PointCloudOctree.js @@ -171,6 +171,7 @@ Potree.PointCloudOctree.prototype.update = function(camera, renderer){ for(var j = 0; j < this.visibleGeometry.length; j++){ if(this.visibleGeometry[j].node.name === child.name){ stack.push({node: child, weight: this.visibleGeometry[j].weight}); + break; } }; }