@thatopen/components 2.4.0-alpha.14 → 2.4.0-alpha.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -24666,14 +24666,21 @@ const _IfcGeometryTiler = class _IfcGeometryTiler extends Component {
24666
24666
  this._assets = [];
24667
24667
  }
24668
24668
  async streamGeometries() {
24669
- let buffer = this._streamSerializer.export(this._geometries);
24670
- let data = {};
24671
- for (const [id, { boundingBox: boundingBox2, hasHoles }] of this._geometries) {
24672
- data[id] = { boundingBox: boundingBox2, hasHoles };
24673
- }
24674
- await this.onGeometryStreamed.trigger({ data, buffer });
24675
- data = null;
24676
- buffer = null;
24669
+ const exportMap = /* @__PURE__ */ new Map();
24670
+ for (const [id, value] of this._geometries) {
24671
+ exportMap.set(id, value);
24672
+ if (exportMap.size > this.settings.minGeometrySize) {
24673
+ let buffer = this._streamSerializer.export(exportMap);
24674
+ let data = {};
24675
+ for (const [id2, { boundingBox: boundingBox2, hasHoles }] of this._geometries) {
24676
+ data[id2] = { boundingBox: boundingBox2, hasHoles };
24677
+ }
24678
+ await this.onGeometryStreamed.trigger({ data, buffer });
24679
+ data = null;
24680
+ buffer = null;
24681
+ exportMap.clear();
24682
+ }
24683
+ }
24677
24684
  this._geometries.clear();
24678
24685
  this._geometryCount = 0;
24679
24686
  }