diff --git a/src/viewer/scene/PerformanceModel/lib/batching/batchingLayer.js b/src/viewer/scene/PerformanceModel/lib/batching/batchingLayer.js index 9c931b23db..ff4685e7b9 100644 --- a/src/viewer/scene/PerformanceModel/lib/batching/batchingLayer.js +++ b/src/viewer/scene/PerformanceModel/lib/batching/batchingLayer.js @@ -18,8 +18,6 @@ const tempMat4b = math.mat4(); const tempVec3a = math.vec4([0, 0, 0, 1]); const tempVec3b = math.vec4([0, 0, 0, 1]); -var currentBatchingLayer = null; - /** * @private */ @@ -136,13 +134,6 @@ class BatchingLayer { if (this._finalized) { throw "BatchingLayer full - check first with canCreatePortion()"; } - if (currentBatchingLayer !== null) { - if (currentBatchingLayer !== this) { - throw "Already packing another BatchingLayer"; - } - } else { - currentBatchingLayer = this; - } const buffer = this._buffer; const positionsIndex = buffer.lenPositions; const vertsIndex = positionsIndex / 3; @@ -350,8 +341,6 @@ class BatchingLayer { buffer.lenIndices = 0; buffer.lenEdgeIndices = 0; - currentBatchingLayer = null; - this._buffer = null; this._finalized = true; }