Skip to content

Commit

Permalink
Merge pull request #4045 from AnalyticalGraphicsInc/entity-terrain-sl…
Browse files Browse the repository at this point in the history
…ow-unload

Sped up deleting of custom data from a QuadtreeTile.
  • Loading branch information
mramato authored Jun 26, 2016
2 parents a0b9639 + b14bee0 commit 56914bd
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Source/Scene/QuadtreeTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,10 @@ define([
var rectangle;

if (defined(added) && defined(removed)) {
// level zero tile
for (i = 0; i < removed.length; ++i) {
data = removed[i];
for (var j = 0; j < customData.length; ++j) {
if (customData[j] === data) {
customData.splice(j, 1);
break;
}
}
}
customData = customData.filter(function(value) {
return removed.indexOf(value) === -1;
});
this._customData = customData;

rectangle = this._rectangle;
for (i = 0; i < added.length; ++i) {
Expand Down

0 comments on commit 56914bd

Please sign in to comment.