@thatopen/components 2.4.0-alpha.2 → 2.4.0-alpha.4

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
@@ -1738,8 +1738,14 @@ function Ba() {
1738
1738
  }
1739
1739
  class j {
1740
1740
  constructor() {
1741
+ /**
1742
+ * Whether this event is active or not. If not, it won't trigger.
1743
+ */
1744
+ C(this, "enabled", !0);
1741
1745
  /** Triggers all the callbacks assigned to this event. */
1742
1746
  C(this, "trigger", (i) => {
1747
+ if (!this.enabled)
1748
+ return;
1743
1749
  const t = this.handlers.slice(0);
1744
1750
  for (const e of t)
1745
1751
  e(i);
@@ -1767,8 +1773,14 @@ class j {
1767
1773
  }
1768
1774
  class Pe {
1769
1775
  constructor() {
1776
+ /**
1777
+ * Whether this event is active or not. If not, it won't trigger.
1778
+ */
1779
+ C(this, "enabled", !0);
1770
1780
  /** Triggers all the callbacks assigned to this event. */
1771
1781
  C(this, "trigger", async (i) => {
1782
+ if (!this.enabled)
1783
+ return;
1772
1784
  const t = this.handlers.slice(0);
1773
1785
  for (const e of t)
1774
1786
  await e(i);
@@ -2126,6 +2138,45 @@ class re extends Map {
2126
2138
  }
2127
2139
  class ph extends At {
2128
2140
  }
2141
+ class Ch {
2142
+ constructor() {
2143
+ /**
2144
+ * The list of events managed by this instance.
2145
+ */
2146
+ C(this, "list", /* @__PURE__ */ new Set());
2147
+ }
2148
+ /**
2149
+ * Adds events to this manager.
2150
+ * @param events the events to add.
2151
+ */
2152
+ add(i) {
2153
+ for (const t of i)
2154
+ this.list.add(t);
2155
+ }
2156
+ /**
2157
+ * Removes events from this manager.
2158
+ * @param events the events to remove.
2159
+ */
2160
+ remove(i) {
2161
+ for (const t of i)
2162
+ this.list.delete(t);
2163
+ }
2164
+ /**
2165
+ * Sets all the events managed by this instance as enabled or disabled.
2166
+ * @param active whether to turn on or off the events.
2167
+ */
2168
+ set(i) {
2169
+ for (const t of this.list)
2170
+ t.enabled = i;
2171
+ }
2172
+ /**
2173
+ * Resets all the events managed by this instance.
2174
+ */
2175
+ reset() {
2176
+ for (const i of this.list)
2177
+ i.reset();
2178
+ }
2179
+ }
2129
2180
  const ds = 0, za = 1, ka = new Q(), Ir = new Ee(), sn = new Dn(), dr = new Q(), ss = new ii();
2130
2181
  class Ha {
2131
2182
  constructor() {
@@ -2577,7 +2628,7 @@ function qa(c) {
2577
2628
  const yt = new D.Matrix4();
2578
2629
  return yt.multiply(tt), yt.multiply(St), yt.multiply(it), yt.multiply(ot), { center: G, halfSizes: et, rotation: W, transformation: yt };
2579
2630
  }
2580
- function Ch(c, i, t) {
2631
+ function Th(c, i, t) {
2581
2632
  const e = [
2582
2633
  c[0] - i[0],
2583
2634
  c[1] - i[1],
@@ -2868,7 +2919,7 @@ C(_t, "_lut", [
2868
2919
  "ff"
2869
2920
  ]);
2870
2921
  let oe = _t;
2871
- class Th extends At {
2922
+ class mh extends At {
2872
2923
  constructor(t, e) {
2873
2924
  super(t);
2874
2925
  /** {@link Disposable.onDisposed} */
@@ -3485,7 +3536,7 @@ class ec extends Ga {
3485
3536
  super.dispose(), this.components.get(Ye).list.delete(this.config.uuid);
3486
3537
  }
3487
3538
  }
3488
- class mh extends Ya {
3539
+ class Rh extends Ya {
3489
3540
  /**
3490
3541
  * Constructor for the SimpleRenderer class.
3491
3542
  *
@@ -5828,7 +5879,7 @@ void main() {
5828
5879
  this._postQuad.geometry.dispose(), this._postQuad.removeFromParent(), this._buffer = null, this.onDisposed.reset();
5829
5880
  }
5830
5881
  }
5831
- class Rh extends ec {
5882
+ class gh extends ec {
5832
5883
  constructor() {
5833
5884
  super(...arguments);
5834
5885
  C(this, "_distanceRenderer");
@@ -7889,7 +7940,7 @@ const Dr = /* @__PURE__ */ new Map([
7889
7940
  4292641817: "IFCUNITARYEQUIPMENT",
7890
7941
  3009204131: "IFCGRID"
7891
7942
  };
7892
- class gh {
7943
+ class Ah {
7893
7944
  getAll(i, t) {
7894
7945
  const e = {}, s = Object.keys(Pc).map((n) => parseInt(n, 10));
7895
7946
  for (let n = 0; n < s.length; n++) {
@@ -18242,6 +18293,7 @@ const xs = class xs extends At {
18242
18293
  this.webIfc.SetWasmPath(e, s), await this.webIfc.Init(), n && this.webIfc.SetLogLevel(n), this.webIfc.OpenModelFromCallback(t, this.settings.webIfc);
18243
18294
  }
18244
18295
  async streamAllGeometries() {
18296
+ console.log("Converting geometries to tiles...");
18245
18297
  const { minGeometrySize: t, minAssetsSize: e } = this.settings;
18246
18298
  this._spatialTree.setUp(this.webIfc);
18247
18299
  const s = this.webIfc.GetIfcEntityList(0), n = [[]], r = new Qt.FragmentsGroup();
@@ -20617,6 +20669,7 @@ export {
20617
20669
  we as DataSet,
20618
20670
  De as Disposer,
20619
20671
  j as Event,
20672
+ Ch as EventManager,
20620
20673
  zr as Exploder,
20621
20674
  Oc as FirstPersonMode,
20622
20675
  Tt as FragmentsManager,
@@ -20631,7 +20684,7 @@ export {
20631
20684
  lh as IDSSpecification,
20632
20685
  $r as IDSSpecifications,
20633
20686
  gs as IfcBasicQuery,
20634
- gh as IfcCategories,
20687
+ Ah as IfcCategories,
20635
20688
  ms as IfcCategoryMap,
20636
20689
  Pc as IfcElements,
20637
20690
  Gr as IfcFinder,
@@ -20659,19 +20712,19 @@ export {
20659
20712
  Lc as ProjectionManager,
20660
20713
  th as PropertiesStreamingSettings,
20661
20714
  ci as Raycasters,
20662
- Rh as ShadowedScene,
20715
+ gh as ShadowedScene,
20663
20716
  xi as SimpleCamera,
20664
20717
  Ec as SimpleGrid,
20665
20718
  dc as SimpleGridConfigManager,
20666
20719
  Vn as SimplePlane,
20667
20720
  Ic as SimpleRaycaster,
20668
- mh as SimpleRenderer,
20721
+ Rh as SimpleRenderer,
20669
20722
  ec as SimpleScene,
20670
20723
  tc as SimpleSceneConfigManager,
20671
20724
  Qa as SimpleWorld,
20672
20725
  Rs as Topic,
20673
20726
  oe as UUID,
20674
- Th as VertexPicker,
20727
+ mh as VertexPicker,
20675
20728
  To as Viewpoint,
20676
20729
  ie as Viewpoints,
20677
20730
  Ts as Worlds,
@@ -20679,7 +20732,7 @@ export {
20679
20732
  wc as ifcCategoryCase,
20680
20733
  Dc as ifcRelAttrsPosition,
20681
20734
  bc as ifcRelClassNames,
20682
- Ch as isPointInFrontOfPlane,
20735
+ Th as isPointInFrontOfPlane,
20683
20736
  qa as obbFromPoints,
20684
20737
  so as readPixelsAsync,
20685
20738
  Dr as relToAttributesMap