Skip to content

Commit

Permalink
Fix error with loading multiple PerformanceModels concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Mar 6, 2019
1 parent bc05e73 commit 9700484
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/viewer/scene/PerformanceModel/lib/batching/batchingLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -350,8 +341,6 @@ class BatchingLayer {
buffer.lenIndices = 0;
buffer.lenEdgeIndices = 0;

currentBatchingLayer = null;

this._buffer = null;
this._finalized = true;
}
Expand Down

0 comments on commit 9700484

Please sign in to comment.