diff --git a/src/plugins/LASLoaderPlugin/LASLoaderPlugin.js b/src/plugins/LASLoaderPlugin/LASLoaderPlugin.js index b7a5719dc..d52a7d00d 100644 --- a/src/plugins/LASLoaderPlugin/LASLoaderPlugin.js +++ b/src/plugins/LASLoaderPlugin/LASLoaderPlugin.js @@ -339,6 +339,7 @@ class LASLoaderPlugin extends Plugin { } const sceneModel = new SceneModel(this.viewer.scene, utils.apply(params, { + maxGeometryBatchSize: MAX_VERTICES, isModel: true })); diff --git a/src/viewer/scene/model/vbo/batching/points/VBOBatchingPointsLayer.js b/src/viewer/scene/model/vbo/batching/points/VBOBatchingPointsLayer.js index d2d81883a..fd7b8226e 100644 --- a/src/viewer/scene/model/vbo/batching/points/VBOBatchingPointsLayer.js +++ b/src/viewer/scene/model/vbo/batching/points/VBOBatchingPointsLayer.js @@ -45,7 +45,7 @@ export class VBOBatchingPointsLayer { this._renderers = getRenderers(cfg.model.scene); - const maxGeometryBatchSize = Math.min(5000000, cfg.maxGeometryBatchSize || window.Infinity); + const maxGeometryBatchSize = cfg.maxGeometryBatchSize || 5000000; const attribute = function() { const portions = [ ]; @@ -161,7 +161,7 @@ export class VBOBatchingPointsLayer { if (this._finalized) { throw "Already finalized"; } - return (this._buffer.vertsIndex + (lenPositions / 3)) < this._buffer.maxVerts; + return (this._buffer.vertsIndex + (lenPositions / 3)) <= this._buffer.maxVerts; } /**