@thatopen/components 2.2.10 → 2.2.11

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
@@ -3114,7 +3114,7 @@ const ui = class ui {
3114
3114
  /**
3115
3115
  * The version of the @thatopen/components library.
3116
3116
  */
3117
- _(ui, "release", "2.2.10");
3117
+ _(ui, "release", "2.2.11");
3118
3118
  let an = ui;
3119
3119
  class La extends An {
3120
3120
  constructor() {
@@ -9173,24 +9173,26 @@ const Ss = class Ss extends St {
9173
9173
  * const group = await ifcLoader.load(ifcData);
9174
9174
  * ```
9175
9175
  */
9176
- async load(t, e = !0) {
9177
- const i = performance.now();
9176
+ async load(t, e = !0, i = "") {
9177
+ const n = performance.now();
9178
9178
  this.onIfcStartedLoading.trigger(), await this.readIfcFile(t);
9179
- const n = await this.getAllGeometries(), o = await this.components.get(hn).export(this.webIfc, 0);
9180
- n.setLocalProperties(o);
9181
- const a = this.components.get(_t);
9182
- a.groups.set(n.uuid, n);
9183
- for (const l of n.items)
9184
- a.list.set(l.id, l), l.mesh.uuid = l.id, l.group = n;
9185
- a.onFragmentsLoaded.trigger(n), e && a.coordinate([n]);
9186
- for (const [l] of n.data) {
9187
- const h = o[l];
9188
- if (!h || !h.GlobalId)
9179
+ const r = await this.getAllGeometries();
9180
+ r.name = i;
9181
+ const a = await this.components.get(hn).export(this.webIfc, 0);
9182
+ r.setLocalProperties(a);
9183
+ const l = this.components.get(_t);
9184
+ l.groups.set(r.uuid, r);
9185
+ for (const h of r.items)
9186
+ l.list.set(h.id, h), h.mesh.uuid = h.id, h.group = r;
9187
+ l.onFragmentsLoaded.trigger(r), e && l.coordinate([r]);
9188
+ for (const [h] of r.data) {
9189
+ const d = a[h];
9190
+ if (!d || !d.GlobalId)
9189
9191
  continue;
9190
- const d = h.GlobalId.value || h.GlobalId;
9191
- n.globalToExpressIDs.set(d, l);
9192
+ const u = d.GlobalId.value || d.GlobalId;
9193
+ r.globalToExpressIDs.set(u, h);
9192
9194
  }
9193
- return Gr.get(n, this.webIfc), this.cleanUp(), console.log(`Streaming the IFC took ${performance.now() - i} ms!`), n;
9195
+ return Gr.get(r, this.webIfc), this.cleanUp(), console.log(`Streaming the IFC took ${performance.now() - n} ms!`), r;
9194
9196
  }
9195
9197
  /**
9196
9198
  * Reads an IFC file and initializes the Web-IFC library.