@thatopen/components 2.0.0-alpha.1 → 2.0.0-alpha.2

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
@@ -5319,7 +5319,7 @@ const be = class be extends nt {
5319
5319
  * has to be `true` for this to apply.
5320
5320
  */
5321
5321
  f(this, "toleranceOrthogonalY", 0.7);
5322
- f(this, "list", []);
5322
+ f(this, "planes", []);
5323
5323
  f(this, "PlaneType");
5324
5324
  /** The material used in all the clipping planes. */
5325
5325
  f(this, "_material", new L.MeshBasicMaterial({
@@ -5346,7 +5346,7 @@ const be = class be extends nt {
5346
5346
  /** {@link Component.enabled} */
5347
5347
  set enabled(t) {
5348
5348
  this._enabled = t;
5349
- for (const e of this.list)
5349
+ for (const e of this.planes)
5350
5350
  e.enabled = t;
5351
5351
  this.updateMaterialsAndPlanes();
5352
5352
  }
@@ -5357,7 +5357,7 @@ const be = class be extends nt {
5357
5357
  /** {@link Hideable.visible } */
5358
5358
  set visible(t) {
5359
5359
  this._visible = t;
5360
- for (const e of this.list)
5360
+ for (const e of this.planes)
5361
5361
  e.visible = t;
5362
5362
  }
5363
5363
  /** The material of the clipping plane representation. */
@@ -5367,7 +5367,7 @@ const be = class be extends nt {
5367
5367
  /** The material of the clipping plane representation. */
5368
5368
  set material(t) {
5369
5369
  this._material = t;
5370
- for (const e of this.list)
5370
+ for (const e of this.planes)
5371
5371
  e.planeMaterial = t;
5372
5372
  }
5373
5373
  /** The size of the geometric representation of the clippings planes. */
@@ -5377,7 +5377,7 @@ const be = class be extends nt {
5377
5377
  /** The size of the geometric representation of the clippings planes. */
5378
5378
  set size(t) {
5379
5379
  this._size = t;
5380
- for (const e of this.list)
5380
+ for (const e of this.planes)
5381
5381
  e.size = t;
5382
5382
  }
5383
5383
  endCreation() {
@@ -5387,9 +5387,9 @@ const be = class be extends nt {
5387
5387
  /** {@link Disposable.dispose} */
5388
5388
  dispose() {
5389
5389
  this._enabled = !1;
5390
- for (const t of this.list)
5390
+ for (const t of this.planes)
5391
5391
  t.dispose();
5392
- this.list.length = 0, this._material.dispose(), this.onBeforeCreate.reset(), this.onBeforeCancel.reset(), this.onBeforeDelete.reset(), this.onBeforeDrag.reset(), this.onAfterCreate.reset(), this.onAfterCancel.reset(), this.onAfterDelete.reset(), this.onAfterDrag.reset(), this.onDisposed.trigger(be.uuid), this.onDisposed.reset();
5392
+ this.planes.length = 0, this._material.dispose(), this.onBeforeCreate.reset(), this.onBeforeCancel.reset(), this.onBeforeDelete.reset(), this.onBeforeDrag.reset(), this.onAfterCreate.reset(), this.onAfterCancel.reset(), this.onAfterDelete.reset(), this.onAfterDrag.reset(), this.onDisposed.trigger(be.uuid), this.onDisposed.reset();
5393
5393
  }
5394
5394
  /** {@link Createable.create} */
5395
5395
  create(t) {
@@ -5423,15 +5423,15 @@ const be = class be extends nt {
5423
5423
  }
5424
5424
  /** Deletes all the existing clipping planes. */
5425
5425
  deleteAll() {
5426
- for (; this.list.length > 0; ) {
5427
- const t = this.list[0];
5426
+ for (; this.planes.length > 0; ) {
5427
+ const t = this.planes[0];
5428
5428
  this.delete(t.world, t);
5429
5429
  }
5430
5430
  }
5431
5431
  deletePlane(t) {
5432
- const e = this.list.indexOf(t);
5432
+ const e = this.planes.indexOf(t);
5433
5433
  if (e !== -1) {
5434
- if (this.list.splice(e, 1), !t.world.renderer)
5434
+ if (this.planes.splice(e, 1), !t.world.renderer)
5435
5435
  throw new Error("Renderer not found for this plane's world!");
5436
5436
  t.world.renderer.setPlane(!1, t.three), t.dispose(), this.updateMaterialsAndPlanes(), this.onAfterDelete.trigger(t);
5437
5437
  }
@@ -5440,12 +5440,12 @@ const be = class be extends nt {
5440
5440
  const i = this.components.get(ms).get(t), o = this.getAllPlaneMeshes(), n = i.castRay(o);
5441
5441
  if (n) {
5442
5442
  const r = n.object;
5443
- return this.list.find((a) => a.meshes.includes(r));
5443
+ return this.planes.find((a) => a.meshes.includes(r));
5444
5444
  }
5445
5445
  }
5446
5446
  getAllPlaneMeshes() {
5447
5447
  const t = [];
5448
- for (const e of this.list)
5448
+ for (const e of this.planes)
5449
5449
  t.push(...e.meshes);
5450
5450
  return t;
5451
5451
  }
@@ -5474,7 +5474,7 @@ const be = class be extends nt {
5474
5474
  }
5475
5475
  newPlane(t, e, i) {
5476
5476
  const o = this.newPlaneInstance(t, e, i);
5477
- return o.onDraggingStarted.add(this._onStartDragging), o.onDraggingEnded.add(this._onEndDragging), this.list.push(o), this.onAfterCreate.trigger(o), o;
5477
+ return o.onDraggingStarted.add(this._onStartDragging), o.onDraggingEnded.add(this._onEndDragging), this.planes.push(o), this.onAfterCreate.trigger(o), o;
5478
5478
  }
5479
5479
  newPlaneInstance(t, e, i) {
5480
5480
  return new this.PlaneType(
@@ -8191,7 +8191,6 @@ class yn {
8191
8191
  const Ge = class Ge extends nt {
8192
8192
  constructor(t) {
8193
8193
  super(t);
8194
- f(this, "onIfcLoaded", new U());
8195
8194
  f(this, "onIfcStartedLoading", new U());
8196
8195
  f(this, "onSetup", new U());
8197
8196
  /** {@link Disposable.onDisposed} */
@@ -8213,7 +8212,7 @@ const Ge = class Ge extends nt {
8213
8212
  this.components.add(Ge.uuid, this), this.settings.excludedCategories.add(b.IFCOPENINGELEMENT);
8214
8213
  }
8215
8214
  dispose() {
8216
- this.onIfcLoaded.reset(), this.webIfc = null, this.onDisposed.trigger(Ge.uuid), this.onDisposed.reset();
8215
+ this.webIfc = null, this.onDisposed.trigger(Ge.uuid), this.onDisposed.reset();
8217
8216
  }
8218
8217
  async setup(t) {
8219
8218
  this.settings = { ...this.settings, ...t }, this.settings.autoSetWasm && await this.autoSetWasm(), this.onSetup.trigger();
@@ -8222,12 +8221,12 @@ const Ge = class Ge extends nt {
8222
8221
  const i = performance.now();
8223
8222
  this.onIfcStartedLoading.trigger(), await this.readIfcFile(t);
8224
8223
  const o = await this.getAllGeometries(), n = await this._propertyExporter.export(this.webIfc, 0);
8225
- o.setLocalProperties(n), this.cleanUp(), console.log(`Streaming the IFC took ${performance.now() - i} ms!`);
8224
+ o.setLocalProperties(n), this.cleanUp();
8226
8225
  const r = this.components.get(At);
8227
8226
  r.groups.set(o.uuid, o);
8228
8227
  for (const a of o.items)
8229
8228
  r.list.set(a.id, a), a.mesh.uuid = a.id, a.group = o;
8230
- return e && r.coordinate([o]), this.onIfcLoaded.trigger(o), o;
8229
+ return r.onFragmentsLoaded.trigger(o), e && r.coordinate([o]), console.log(`Streaming the IFC took ${performance.now() - i} ms!`), o;
8231
8230
  }
8232
8231
  async readIfcFile(t) {
8233
8232
  const { path: e, absolute: i, logLevel: o } = this.settings.wasm;