From 4cbc92dded0477369c90f749f4f8d18aef5ec612 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 16 Jan 2015 09:58:10 +0800 Subject: [PATCH] add break --- build/js/potree.js | 1 + src/PointCloudOctree.js | 1 + 2 files changed, 2 insertions(+) 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; } }; }