@thatopen/components 2.1.18 → 2.1.19

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
@@ -3083,7 +3083,7 @@ const Fs = class Fs {
3083
3083
  /**
3084
3084
  * The version of the @thatopen/components library.
3085
3085
  */
3086
- I(Fs, "release", "2.1.18");
3086
+ I(Fs, "release", "2.1.19");
3087
3087
  let pi = Fs;
3088
3088
  class Fr {
3089
3089
  constructor(s) {
@@ -9596,6 +9596,8 @@ class Pi {
9596
9596
  });
9597
9597
  /** List of categories that won't be converted to fragments. */
9598
9598
  I(this, "excludedCategories", /* @__PURE__ */ new Set());
9599
+ /** Exclusive list of categories that will be converted to fragments. If this contains any category, any other categories will be ignored. */
9600
+ I(this, "includedCategories", /* @__PURE__ */ new Set());
9599
9601
  /** Whether to save the absolute location of all IFC items. */
9600
9602
  I(this, "saveLocations", !1);
9601
9603
  /** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
@@ -9873,14 +9875,19 @@ const Ge = class Ge extends et {
9873
9875
  };
9874
9876
  const i = [];
9875
9877
  for (const n of t) {
9876
- if (!this.webIfc.IsIfcElement(n) && n !== U.IFCSPACE || this.settings.excludedCategories.has(n))
9878
+ if (!this.webIfc.IsIfcElement(n) && n !== U.IFCSPACE)
9877
9879
  continue;
9878
- const r = this.webIfc.GetLineIDsWithType(0, n), a = r.size();
9879
- for (let c = 0; c < a; c++) {
9880
- const h = r.get(c);
9881
- i.push(h);
9882
- const d = this._spatialTree.itemsByFloor[h] || 0;
9883
- e.data.set(h, [[], [d, n]]);
9880
+ const r = this.settings.includedCategories;
9881
+ if (r.size > 0 && !r.has(n))
9882
+ continue;
9883
+ if (this.settings.excludedCategories.has(n))
9884
+ continue;
9885
+ const a = this.webIfc.GetLineIDsWithType(0, n), c = a.size();
9886
+ for (let h = 0; h < c; h++) {
9887
+ const d = a.get(h);
9888
+ i.push(d);
9889
+ const E = this._spatialTree.itemsByFloor[d] || 0;
9890
+ e.data.set(d, [[], [E, n]]);
9884
9891
  }
9885
9892
  }
9886
9893
  this._spatialTree.cleanUp(), this.webIfc.StreamMeshes(0, i, (n) => {