Skip to content

Commit

Permalink
Merge pull request #6554 from likangning93/staticBatchCleanup
Browse files Browse the repository at this point in the history
cleanup for Static*Batch.js files
  • Loading branch information
Hannah authored May 7, 2018
2 parents 8d6858f + 29a253e commit 8a5c805
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
22 changes: 2 additions & 20 deletions Source/DataSources/StaticGeometryColorBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,24 +295,6 @@ define([
return BoundingSphereState.DONE;
};

Batch.prototype.removeAllPrimitives = function() {
var primitives = this.primitives;

var primitive = this.primitive;
if (defined(primitive)) {
primitives.remove(primitive);
this.primitive = undefined;
this.geometry.removeAll();
this.updaters.removeAll();
}

var oldPrimitive = this.oldPrimitive;
if (defined(oldPrimitive)) {
primitives.remove(oldPrimitive);
this.oldPrimitive = undefined;
}
};

Batch.prototype.destroy = function() {
var primitive = this.primitive;
var primitives = this.primitives;
Expand All @@ -323,7 +305,7 @@ define([
if (defined(oldPrimitive)) {
primitives.remove(oldPrimitive);
}
if(defined(this.removeMaterialSubscription)) {
if (defined(this.removeMaterialSubscription)) {
this.removeMaterialSubscription();
}
};
Expand Down Expand Up @@ -452,7 +434,7 @@ define([
var length = items.length;
for (var i = 0; i < length; i++) {
var item = items[i];
if(item.contains(updater)){
if (item.contains(updater)){
return item.getBoundingSphere(updater, result);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/DataSources/StaticGeometryPerMaterialBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ define([
var length = items.length;
for (var i = 0; i < length; i++) {
var item = items[i];
if(item.contains(updater)){
if (item.contains(updater)){
return item.getBoundingSphere(updater, result);
}
}
Expand Down
4 changes: 2 additions & 2 deletions Source/DataSources/StaticOutlineGeometryBatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ define([
var solidBatchesLength = solidBatches.length;
for (i = 0; i < solidBatchesLength; i++) {
var solidBatch = solidBatches[i];
if(solidBatch.contains(updater)){
if (solidBatch.contains(updater)){
return solidBatch.getBoundingSphere(updater, result);
}
}
Expand All @@ -384,7 +384,7 @@ define([
var translucentBatchesLength = translucentBatches.length;
for (i = 0; i < translucentBatchesLength; i++) {
var translucentBatch = translucentBatches[i];
if(translucentBatch.contains(updater)){
if (translucentBatch.contains(updater)){
return translucentBatch.getBoundingSphere(updater, result);
}
}
Expand Down

0 comments on commit 8a5c805

Please sign in to comment.