@roomle/web-sdk 4.2.0 → 4.3.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.
Files changed (92) hide show
  1. package/lib/ConfiguratorKernel.wasm +0 -0
  2. package/lib/{GaussianBlurNode-DEczNsyD.mjs → GaussianBlurNode-Bjszve7N.mjs} +15 -15
  3. package/lib/{GaussianBlurNode-DEczNsyD.mjs.map → GaussianBlurNode-Bjszve7N.mjs.map} +1 -1
  4. package/lib/RoomleCore.js +3 -3
  5. package/lib/RoomleCore.wasm +0 -0
  6. package/lib/RoomleToolsCore.wasm +0 -0
  7. package/lib/{api-B6sLiuiL.mjs → api-C430uhWG.mjs} +2 -2
  8. package/lib/{api-B6sLiuiL.mjs.map → api-C430uhWG.mjs.map} +1 -1
  9. package/lib/asset-loader.worker-eqHzNAwa.mjs.map +1 -1
  10. package/lib/{banana-for-scale-C-grIlTK.mjs → banana-for-scale-DGYmxeBG.mjs} +3 -3
  11. package/lib/{banana-for-scale-C-grIlTK.mjs.map → banana-for-scale-DGYmxeBG.mjs.map} +1 -1
  12. package/lib/budgeteer.sw-BUMElkO1.mjs.map +1 -1
  13. package/lib/{common-utils-6T8eGlhX.mjs → common-utils-CyQUubmw.mjs} +29 -15
  14. package/lib/{common-utils-6T8eGlhX.mjs.map → common-utils-CyQUubmw.mjs.map} +1 -1
  15. package/lib/{component-dimensioning-DJuokZnv.mjs → component-dimensioning-BXN285kw.mjs} +4 -4
  16. package/lib/{component-dimensioning-DJuokZnv.mjs.map → component-dimensioning-BXN285kw.mjs.map} +1 -1
  17. package/lib/{component-raycast-helper-SZg14d7A.mjs → component-raycast-helper-CADFRMLS.mjs} +3 -3
  18. package/lib/{component-raycast-helper-SZg14d7A.mjs.map → component-raycast-helper-CADFRMLS.mjs.map} +1 -1
  19. package/lib/configurator-9ICb3RBz.mjs +2 -0
  20. package/lib/{configurator-Cbof6AET.mjs → configurator-CUiTTJmW.mjs} +4 -4
  21. package/lib/{configurator-Cbof6AET.mjs.map → configurator-CUiTTJmW.mjs.map} +1 -1
  22. package/lib/{decorate-CX1ZGuFY.mjs → decorate-CjaqqbUP.mjs} +12 -9
  23. package/lib/decorate-CjaqqbUP.mjs.map +1 -0
  24. package/lib/dimensioning-helper-0s61LK9R.mjs +2 -0
  25. package/lib/{dimensioning-helper-BwvR76_I.mjs → dimensioning-helper-Cgao7A18.mjs} +2 -2
  26. package/lib/{dimensioning-helper-BwvR76_I.mjs.map → dimensioning-helper-Cgao7A18.mjs.map} +1 -1
  27. package/lib/{glb-viewer-DmVh1uJg.mjs → glb-viewer-DB5c3Qk5.mjs} +6 -6
  28. package/lib/{glb-viewer-DmVh1uJg.mjs.map → glb-viewer-DB5c3Qk5.mjs.map} +1 -1
  29. package/lib/glb-viewer-_gIYHXT9.mjs +2 -0
  30. package/lib/{highlight-coordinator-Qonmfsu1.mjs → highlight-coordinator-RCfVwPHC.mjs} +2 -2
  31. package/lib/{highlight-coordinator-Qonmfsu1.mjs.map → highlight-coordinator-RCfVwPHC.mjs.map} +1 -1
  32. package/lib/{homag-intelligence-CzD_RMQo.mjs → homag-intelligence-8eBT714O.mjs} +8 -5
  33. package/lib/{homag-intelligence-CzD_RMQo.mjs.map → homag-intelligence-8eBT714O.mjs.map} +1 -1
  34. package/lib/{imos-ix-poc-export-helper-Q6-OXziY.mjs → imos-ix-poc-export-helper-DRQK_p2h.mjs} +2 -2
  35. package/lib/{imos-ix-poc-export-helper-Q6-OXziY.mjs.map → imos-ix-poc-export-helper-DRQK_p2h.mjs.map} +1 -1
  36. package/lib/{material-viewer-BkSh-aG7.mjs → material-viewer-CfZwcbei.mjs} +6 -6
  37. package/lib/{material-viewer-BkSh-aG7.mjs.map → material-viewer-CfZwcbei.mjs.map} +1 -1
  38. package/lib/{packages-BGVMQMZK.mjs → packages-0GadOkxt.mjs} +5 -5
  39. package/lib/{packages-BGVMQMZK.mjs.map → packages-0GadOkxt.mjs.map} +1 -1
  40. package/lib/{planner-DFa8uJOF.mjs → planner-CyQKj8Ok.mjs} +3 -3
  41. package/lib/{planner-DFa8uJOF.mjs.map → planner-CyQKj8Ok.mjs.map} +1 -1
  42. package/lib/planner-D63FNjtX.mjs +2 -0
  43. package/lib/{plugin-system-CqXT37-v.mjs → plugin-system-vlnG8j2T.mjs} +3 -3
  44. package/lib/{plugin-system-CqXT37-v.mjs.map → plugin-system-vlnG8j2T.mjs.map} +1 -1
  45. package/lib/{roomle-headless-setup-7xnQlZl3.mjs → roomle-headless-setup-DbO_rLjK.mjs} +54 -40
  46. package/lib/roomle-headless-setup-DbO_rLjK.mjs.map +1 -0
  47. package/lib/roomle-headless.d.ts +167 -126
  48. package/lib/roomle-headless.js +289 -358
  49. package/lib/roomle-headless.js.map +1 -1
  50. package/lib/roomle-renderer-FUqNfNIf.mjs.map +1 -1
  51. package/lib/{roomle-sdk-B73VmWod.mjs → roomle-sdk-CpgzRTKP.mjs} +2855 -2713
  52. package/lib/roomle-sdk-CpgzRTKP.mjs.map +1 -0
  53. package/lib/roomle-sdk.d.ts +121 -15
  54. package/lib/roomle-sdk.js +7 -7
  55. package/lib/{roomle-webgpu-renderer-Dzuy_Y39.mjs → roomle-webgpu-renderer-Lt55gNj5.mjs} +370 -303
  56. package/lib/roomle-webgpu-renderer-Lt55gNj5.mjs.map +1 -0
  57. package/lib/{scene-renderer-DR7EFd-8.mjs → scene-renderer-CSBoi_8w.mjs} +5 -5
  58. package/lib/{scene-renderer-DR7EFd-8.mjs.map → scene-renderer-CSBoi_8w.mjs.map} +1 -1
  59. package/lib/{script-loader-BlsGBrYo.mjs → script-loader-BmScoq7Y.mjs} +3 -3
  60. package/lib/{script-loader-BlsGBrYo.mjs.map → script-loader-BmScoq7Y.mjs.map} +1 -1
  61. package/lib/{shading-settings-Bnt9v9xJ.mjs → shading-settings-CRNmMpcn.mjs} +2 -2
  62. package/lib/{shading-settings-Bnt9v9xJ.mjs.map → shading-settings-CRNmMpcn.mjs.map} +1 -1
  63. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  64. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +34 -8
  65. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js +5 -1
  66. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
  67. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  68. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +3 -3
  69. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  70. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  71. package/lib/{stats-helper-vEwFkDIt.mjs → stats-helper-P4jYV8as.mjs} +3 -3
  72. package/lib/{stats-helper-vEwFkDIt.mjs.map → stats-helper-P4jYV8as.mjs.map} +1 -1
  73. package/lib/three.tsl-BnL9nfJa.mjs +2 -0
  74. package/lib/{three.tsl-BElp7_oF.mjs → three.tsl-Dew9p5yF.mjs} +46 -48
  75. package/lib/{three.tsl-BElp7_oF.mjs.map → three.tsl-Dew9p5yF.mjs.map} +1 -1
  76. package/lib/{threejs-utils-C9zED_Tu.mjs → threejs-utils-DKJ0uer7.mjs} +92 -88
  77. package/lib/threejs-utils-DKJ0uer7.mjs.map +1 -0
  78. package/lib/{tools-core-DKYMilYC.mjs → tools-core-CAEfSB8I.mjs} +3 -3
  79. package/lib/{tools-core-DKYMilYC.mjs.map → tools-core-CAEfSB8I.mjs.map} +1 -1
  80. package/lib/{webgpu-BMwlJflc.mjs → webgpu-B0rxiqW-.mjs} +313 -313
  81. package/lib/{webgpu-BMwlJflc.mjs.map → webgpu-B0rxiqW-.mjs.map} +1 -1
  82. package/package.json +2 -2
  83. package/lib/configurator-BFd5022u.mjs +0 -2
  84. package/lib/decorate-CX1ZGuFY.mjs.map +0 -1
  85. package/lib/dimensioning-helper-yMfkA1IY.mjs +0 -2
  86. package/lib/glb-viewer-DlH5_aTU.mjs +0 -2
  87. package/lib/planner-CSKuhBke.mjs +0 -2
  88. package/lib/roomle-headless-setup-7xnQlZl3.mjs.map +0 -1
  89. package/lib/roomle-sdk-B73VmWod.mjs.map +0 -1
  90. package/lib/roomle-webgpu-renderer-Dzuy_Y39.mjs.map +0 -1
  91. package/lib/three.tsl-BtDRDR0q.mjs +0 -2
  92. package/lib/threejs-utils-C9zED_Tu.mjs.map +0 -1
@@ -1,14 +1,15 @@
1
1
  import { Br as e, Ci as t, Gn as n, Hr as r, Ln as i, Mr as a, V as o, _n as s, cn as c, dt as l, f as u, gn as d, ln as f, si as p, sn as m, w as h } from "./three.core-0KaTx8dm.mjs";
2
2
  import { r as g } from "./three.module-dym6j3lO.mjs";
3
3
  import { a as _ } from "./kernel-utils-voLUOj-0.mjs";
4
- import { V as v, b as y } from "./common-utils-6T8eGlhX.mjs";
4
+ import { U as v, b as y } from "./common-utils-CyQUubmw.mjs";
5
5
  //#region packages/typings/planner.ts
6
6
  var ee = {
7
7
  CONFIGURATOR: 0,
8
8
  PLANNER: 1
9
9
  }, te = {
10
10
  FLOOR: 0,
11
- ROOM: 1
11
+ ROOM: 1,
12
+ PLAN: 2
12
13
  }, ne = [
13
14
  "startInteraction",
14
15
  "resumeInteraction",
@@ -26,19 +27,22 @@ var ee = {
26
27
  DEFAULT: 0,
27
28
  DOCKING: 1,
28
29
  COLLISION: 2
30
+ }, ae = {
31
+ FLOOR: 0,
32
+ ELEVATION: 1
29
33
  }, b = /* @__PURE__ */ function(e) {
30
34
  return e[e.StandAloneWall = 0] = "StandAloneWall", e[e.OuterWallLeft = 1] = "OuterWallLeft", e[e.OuterWallRight = 2] = "OuterWallRight", e[e.InnerWall = 3] = "InnerWall", e;
31
- }({}), ae = {
35
+ }({}), oe = {
32
36
  DEFAULT: 0,
33
37
  TERRAIN: 1
34
- }, oe = {
38
+ }, se = {
35
39
  DEFAULT: 0,
36
40
  CONSTRUCTION: 1
37
- }, se = {
41
+ }, ce = {
38
42
  WALL: 0,
39
43
  EDGE: 1,
40
44
  CONSTRUCTION: 2
41
- }, ce = {
45
+ }, le = {
42
46
  OBJECT: 0,
43
47
  DOOR: 1,
44
48
  WINDOW: 2,
@@ -48,13 +52,13 @@ var ee = {
48
52
  return Math.PI / 180 * e;
49
53
  }, S = function(e) {
50
54
  return 180 / Math.PI * e;
51
- }, le = function(e) {
55
+ }, ue = function(e) {
52
56
  return e >= 0 ? -180 + (e + 180) % 360 : 180 - (-e + 180) % 360;
53
- }, ue = function(e, t, n, r, i, a) {
57
+ }, C = function(e, t, n, r, i, a) {
54
58
  e = Math.sqrt(e * e + n * n);
55
59
  let o = i / a || 1, s = 2 * Math.atan(Math.tan(r * Math.PI / 180 / 2) * o) * 180 / Math.PI, c = x(r), l = t / 2 / Math.tan(c / 2), u = e / (2 * Math.atan(Math.PI * s / 360));
56
60
  return Math.max(l, u);
57
- }, C = function(e) {
61
+ }, w = function(e) {
58
62
  return Math.round(e * 1e3) / 1e3;
59
63
  }, de = function(e, t) {
60
64
  return Math.abs(e.y - t.y) + Math.abs(e.x - t.x);
@@ -63,7 +67,7 @@ var ee = {
63
67
  }, pe = function(e) {
64
68
  let t = S(e);
65
69
  return t < 0 && (t = 180 + (180 + t)), t;
66
- }, w = /* @__PURE__ */ function(e) {
70
+ }, T = /* @__PURE__ */ function(e) {
67
71
  return e[e.NODE = 0] = "NODE", e[e.WALL = 1] = "WALL", e[e.OBJECT = 2] = "OBJECT", e[e.FLOOR = 3] = "FLOOR", e[e.TEXT = 4] = "TEXT", e[e.MEASURE = 5] = "MEASURE", e[e.IMAGE = 6] = "IMAGE", e[e.CEILING = 7] = "CEILING", e;
68
72
  }({}), me = {
69
73
  LEFT: 0,
@@ -77,14 +81,14 @@ var ee = {
77
81
  WALL: 0,
78
82
  ROOM_CONTOUR: 1,
79
83
  CONTOUR: 2
80
- }, T = class {
84
+ }, E = class {
81
85
  static createMeshPhysicalMaterial(e) {
82
86
  return new d(e);
83
87
  }
84
88
  static createMeshStandardMaterial(e) {
85
89
  return new s(e);
86
90
  }
87
- }, E = Object.freeze({
91
+ }, D = Object.freeze({
88
92
  Linear: Object.freeze({
89
93
  None: function(e) {
90
94
  return e;
@@ -203,13 +207,13 @@ var ee = {
203
207
  }),
204
208
  Bounce: Object.freeze({
205
209
  In: function(e) {
206
- return 1 - E.Bounce.Out(1 - e);
210
+ return 1 - D.Bounce.Out(1 - e);
207
211
  },
208
212
  Out: function(e) {
209
213
  return e < 1 / 2.75 ? 7.5625 * e * e : e < 2 / 2.75 ? 7.5625 * (e -= 1.5 / 2.75) * e + .75 : e < 2.5 / 2.75 ? 7.5625 * (e -= 2.25 / 2.75) * e + .9375 : 7.5625 * (e -= 2.625 / 2.75) * e + .984375;
210
214
  },
211
215
  InOut: function(e) {
212
- return e < .5 ? E.Bounce.In(e * 2) * .5 : E.Bounce.Out(e * 2 - 1) * .5 + .5;
216
+ return e < .5 ? D.Bounce.In(e * 2) * .5 : D.Bounce.Out(e * 2 - 1) * .5 + .5;
213
217
  }
214
218
  }),
215
219
  generatePow: function(e) {
@@ -225,9 +229,9 @@ var ee = {
225
229
  }
226
230
  };
227
231
  }
228
- }), D = function() {
232
+ }), O = function() {
229
233
  return performance.now();
230
- }, O = function() {
234
+ }, k = function() {
231
235
  function e() {
232
236
  var e = [...arguments];
233
237
  this._tweens = {}, this._tweensAddedDuringUpdate = {}, this.add.apply(this, e);
@@ -255,7 +259,7 @@ var ee = {
255
259
  return !e.isPlaying();
256
260
  });
257
261
  }, e.prototype.update = function(e, t) {
258
- e === void 0 && (e = D()), t === void 0 && (t = !0);
262
+ e === void 0 && (e = O()), t === void 0 && (t = !0);
259
263
  var n = Object.keys(this._tweens);
260
264
  if (n.length !== 0) for (; n.length > 0;) {
261
265
  this._tweensAddedDuringUpdate = {};
@@ -266,17 +270,17 @@ var ee = {
266
270
  n = Object.keys(this._tweensAddedDuringUpdate);
267
271
  }
268
272
  }, e;
269
- }(), k = {
273
+ }(), A = {
270
274
  Linear: function(e, t) {
271
- var n = e.length - 1, r = n * t, i = Math.floor(r), a = k.Utils.Linear;
275
+ var n = e.length - 1, r = n * t, i = Math.floor(r), a = A.Utils.Linear;
272
276
  return t < 0 ? a(e[0], e[1], r) : t > 1 ? a(e[n], e[n - 1], n - r) : a(e[i], e[i + 1 > n ? n : i + 1], r - i);
273
277
  },
274
278
  Bezier: function(e, t) {
275
- for (var n = 0, r = e.length - 1, i = Math.pow, a = k.Utils.Bernstein, o = 0; o <= r; o++) n += i(1 - t, r - o) * i(t, o) * e[o] * a(r, o);
279
+ for (var n = 0, r = e.length - 1, i = Math.pow, a = A.Utils.Bernstein, o = 0; o <= r; o++) n += i(1 - t, r - o) * i(t, o) * e[o] * a(r, o);
276
280
  return n;
277
281
  },
278
282
  CatmullRom: function(e, t) {
279
- var n = e.length - 1, r = n * t, i = Math.floor(r), a = k.Utils.CatmullRom;
283
+ var n = e.length - 1, r = n * t, i = Math.floor(r), a = A.Utils.CatmullRom;
280
284
  return e[0] === e[n] ? (t < 0 && (i = Math.floor(r = n * (1 + t))), a(e[(i - 1 + n) % n], e[i], e[(i + 1) % n], e[(i + 2) % n], r - i)) : t < 0 ? e[0] - (a(e[0], e[0], e[1], e[1], -r) - e[0]) : t > 1 ? e[n] - (a(e[n], e[n], e[n - 1], e[n - 1], r - n) - e[n]) : a(e[i ? i - 1 : 0], e[i], e[n < i + 1 ? n : i + 1], e[n < i + 2 ? n : i + 2], r - i);
281
285
  },
282
286
  Utils: {
@@ -284,7 +288,7 @@ var ee = {
284
288
  return (t - e) * n + e;
285
289
  },
286
290
  Bernstein: function(e, t) {
287
- var n = k.Utils.Factorial;
291
+ var n = A.Utils.Factorial;
288
292
  return n(e) / n(t) / n(e - t);
289
293
  },
290
294
  Factorial: (function() {
@@ -301,14 +305,14 @@ var ee = {
301
305
  return (2 * t - 2 * n + a + o) * c + (-3 * t + 3 * n - 2 * a - o) * s + a * i + t;
302
306
  }
303
307
  }
304
- }, A = function() {
308
+ }, j = function() {
305
309
  function e() {}
306
310
  return e.nextId = function() {
307
311
  return e._nextId++;
308
312
  }, e._nextId = 0, e;
309
- }(), j = new O(), M = function() {
313
+ }(), M = new k(), N = function() {
310
314
  function e(e, t) {
311
- this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = E.Linear.None, this._interpolationFunction = k.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = A.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1, this._object = e, typeof t == "object" ? (this._group = t, t.add(this)) : t === !0 && (this._group = j, j.add(this));
315
+ this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = D.Linear.None, this._interpolationFunction = A.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = j.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1, this._object = e, typeof t == "object" ? (this._group = t, t.add(this)) : t === !0 && (this._group = M, M.add(this));
312
316
  }
313
317
  return e.prototype.getId = function() {
314
318
  return this._id;
@@ -326,7 +330,7 @@ var ee = {
326
330
  }, e.prototype.dynamic = function(e) {
327
331
  return e === void 0 && (e = !1), this._isDynamic = e, this;
328
332
  }, e.prototype.start = function(e, t) {
329
- if (e === void 0 && (e = D()), t === void 0 && (t = !1), this._isPlaying) return this;
333
+ if (e === void 0 && (e = O()), t === void 0 && (t = !1), this._isPlaying) return this;
330
334
  if (this._repeat = this._initialRepeat, this._reversed) for (var n in this._reversed = !1, this._valuesStartRepeat) this._swapEndStartRepeatValues(n), this._valuesStart[n] = this._valuesStartRepeat[n];
331
335
  if (this._isPlaying = !0, this._isPaused = !1, this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._isChainStopped = !1, this._startTime = e, this._startTime += this._delayTime, !this._propertiesAreSetUp || t) {
332
336
  if (this._propertiesAreSetUp = !0, !this._isDynamic) {
@@ -376,9 +380,9 @@ var ee = {
376
380
  }, e.prototype.end = function() {
377
381
  return this._goToEnd = !0, this.update(this._startTime + this._duration), this;
378
382
  }, e.prototype.pause = function(e) {
379
- return e === void 0 && (e = D()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = e, this);
383
+ return e === void 0 && (e = O()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = e, this);
380
384
  }, e.prototype.resume = function(e) {
381
- return e === void 0 && (e = D()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this);
385
+ return e === void 0 && (e = O()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this);
382
386
  }, e.prototype.stopChainedTweens = function() {
383
387
  for (var e = 0, t = this._chainedTweens.length; e < t; e++) this._chainedTweens[e].stop();
384
388
  return this;
@@ -396,9 +400,9 @@ var ee = {
396
400
  }, e.prototype.yoyo = function(e) {
397
401
  return e === void 0 && (e = !1), this._yoyo = e, this;
398
402
  }, e.prototype.easing = function(e) {
399
- return e === void 0 && (e = E.Linear.None), this._easingFunction = e, this;
403
+ return e === void 0 && (e = D.Linear.None), this._easingFunction = e, this;
400
404
  }, e.prototype.interpolation = function(e) {
401
- return e === void 0 && (e = k.Linear), this._interpolationFunction = e, this;
405
+ return e === void 0 && (e = A.Linear), this._interpolationFunction = e, this;
402
406
  }, e.prototype.chain = function() {
403
407
  return this._chainedTweens = [...arguments], this;
404
408
  }, e.prototype.onStart = function(e) {
@@ -415,7 +419,7 @@ var ee = {
415
419
  return this._onStopCallback = e, this;
416
420
  }, e.prototype.update = function(t, n) {
417
421
  var r = this;
418
- if (t === void 0 && (t = D()), n === void 0 && (n = e.autoStartOnUpdate), this._isPaused) return !0;
422
+ if (t === void 0 && (t = O()), n === void 0 && (n = e.autoStartOnUpdate), this._isPaused) return !0;
419
423
  var i;
420
424
  if (!this._goToEnd && !this._isPlaying) if (n) this.start(t, !0);
421
425
  else return !1;
@@ -448,31 +452,31 @@ var ee = {
448
452
  typeof n == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(n) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = t;
449
453
  }, e.autoStartOnUpdate = !1, e;
450
454
  }();
451
- A.nextId;
452
- var N = j;
453
- N.getAll.bind(N), N.removeAll.bind(N), N.add.bind(N), N.remove.bind(N), N.update.bind(N);
455
+ j.nextId;
456
+ var P = M;
457
+ P.getAll.bind(P), P.removeAll.bind(P), P.add.bind(P), P.remove.bind(P), P.update.bind(P);
454
458
  //#endregion
455
459
  //#region packages/common-core/src/utils/threejs-utils.ts
456
- var P = null;
460
+ var F = null;
457
461
  globalThis.window !== void 0 && import("./dat.gui.module-B2PXSbre.mjs").then((e) => {
458
- P = e.GUI;
462
+ F = e.GUI;
459
463
  }).catch(() => {});
460
- var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se = .9, Ce = (e) => e instanceof g ? e.capabilities.maxSamples : 16, we = (e) => e instanceof g ? e.capabilities.maxTextures : 16, Te = (e) => e instanceof g ? e.capabilities.getMaxAnisotropy() : 16, Ee = (e, n, r, i) => {
464
+ var I = .4, ve = "#DDDDDD", ye = .4, be = "#7B7B7B", xe = "#B1B1B1", Se = .8, Ce = .9, we = (e) => e instanceof g ? e.capabilities.maxSamples : 16, Te = (e) => e instanceof g ? e.capabilities.maxTextures : 16, Ee = (e) => e instanceof g ? e.capabilities.getMaxAnisotropy() : 16, De = (e, n, r, i) => {
461
465
  if (!e || !n || r === 0 || i === 0) return new t();
462
466
  let a = e.clone(), o = r / 2, s = i / 2;
463
467
  return a.project(n), a.x = Math.floor(a.x * o + o), a.y = Math.floor(-(a.y * s) + s), a.z = e.distanceTo(n.position), a;
464
- }, De = (e, n) => {
468
+ }, Oe = (e, n) => {
465
469
  n ||= new t(0, 0, 0);
466
470
  let r = new t(e.size.x / 1e3, e.size.z / 1e3, e.size.y / 1e3), i = new t(e.origin.x / 1e3, e.origin.z / 1e3, e.origin.y / -1e3);
467
471
  return new u(new t(0, 0, -r.z).add(i).sub(n), new t(r.x, r.y, 0).add(i).add(n));
468
- }, Oe = (e) => (e.from /= 1e3, e.to /= 1e3, e), ke = (e, t) => {
469
- let n = C(e.x), r = C(e.y), i = C(e.z), a = C(t.x), o = C(t.y), s = C(t.z);
472
+ }, ke = (e) => (e.from /= 1e3, e.to /= 1e3, e), Ae = (e, t) => {
473
+ let n = w(e.x), r = w(e.y), i = w(e.z), a = w(t.x), o = w(t.y), s = w(t.z);
470
474
  return n === a && r === o && i === s;
471
- }, Ae = (e, t) => {
472
- let n = C(e.w), r = C(e.x), i = C(e.y), a = C(e.z), o = C(t.w), s = C(t.x), c = C(t.y), l = C(t.z);
473
- return n === o && r === s && i === c && a === l;
474
475
  }, je = (e, t) => {
475
- let n = C(e.x), r = C(e.y), i = C(t.x), a = C(t.y);
476
+ let n = w(e.w), r = w(e.x), i = w(e.y), a = w(e.z), o = w(t.w), s = w(t.x), c = w(t.y), l = w(t.z);
477
+ return n === o && r === s && i === c && a === l;
478
+ }, Me = (e, t) => {
479
+ let n = w(e.x), r = w(e.y), i = w(t.x), a = w(t.y);
476
480
  return n === i && r === a;
477
481
  }, L = null, R = () => {
478
482
  if (L) return L;
@@ -483,20 +487,20 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
483
487
  }
484
488
  let t = new o(e, 1, 1, n);
485
489
  return t.needsUpdate = !0, t;
486
- }, Me = (e) => z(null, e), z = (e, t) => {
487
- e ||= Fe(), e.name = t.id ? t.id.toString() : "";
490
+ }, Ne = (e) => z(null, e), z = (e, t) => {
491
+ e ||= Ie(), e.name = t.id ? t.id.toString() : "";
488
492
  let n = t.shading.version === "2" || t.shading.version?.startsWith("2.");
489
- return e = n ? Pe(e, t) : Ne(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (L ||= R(), e.map = L), e;
490
- }, Ne = (e, t) => {
493
+ return e = n ? Fe(e, t) : Pe(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (L ||= R(), e.map = L), e;
494
+ }, Pe = (e, t) => {
491
495
  t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = y(t.shading.metallic, .5));
492
496
  let n = !1;
493
497
  return t.shading.transmission && t.shading.transmission > 0 ? (e.opacity = 1 - t.shading.transmission, e.transparent = !0, e.depthWrite = !1, e.metalness = 0, n = !0) : t.shading.alpha !== void 0 && t.shading.alpha < 1 && (e.transparent = t.shading.alpha < 1, e.opacity = t.shading.alpha, e.depthWrite = t.shading.alpha >= 1, e.metalness = .5 * Math.max(0, t.shading.alpha), n = !0), e.aoMapIntensity = y(t.shading.occlusion, 1), e.roughness = y(t.shading.roughness, .5), e.alphaTest = y(t.shading.alphaCutoff, 0), B(e.color, t.shading.basecolor), n || t.shading.doubleSided ? e.side = 2 : e.side = 0, e;
494
- }, Pe = (e, t) => {
498
+ }, Fe = (e, t) => {
495
499
  let n = !1, r = t.shading.transmission && t.shading.transmission > 0;
496
500
  t.shading.alpha !== void 0 && t.shading.alpha < 1 ? (e.transparent = !0, e.opacity = t.shading.alpha, e.depthWrite = !1, n = !0) : (e.transparent = !1, e.opacity = 1, e.depthWrite = !0), e.alphaTest = t.shading.alphaCutoff ?? 0, B(e.color, t.shading.basecolor), e.transmission = t.shading.transmission ?? 0, e.ior = Math.max(1, Math.min(2.33, t.shading.transmissionIOR ?? 1.5)), e.metalness = t.shading.metallic ?? 0, B(e.specularColor, t.shading.specularColor), e.specularIntensity = t.shading.specularity ?? 1, e.roughness = t.shading.roughness ?? 0, e.aoMapIntensity = t.shading.occlusion ?? 1, B(e.emissive, t.shading.emissiveColor), e.emissiveIntensity = t.shading.emissiveIntensity ?? 1, e.clearcoat = t.shading.clearcoatIntensity ?? 0, e.clearcoatRoughness = t.shading.clearcoatRoughness ?? 0, e.clearcoatNormalScale.setScalar(t.shading.clearcoatNormalScale ?? 1), B(e.sheenColor, t.shading.sheenColor), e.sheen = t.shading.sheenIntensity ?? 1, e.sheenRoughness = t.shading.sheenRoughness ?? 1, e.thickness = t.shading.thicknessFactor ?? 0;
497
501
  let i = t.shading.attenuationDistance;
498
502
  return r && i === 0 ? console.warn("invalid attenuation configuration for transmissive material -- Skipping attenuation color and distance configuration in material.") : (B(e.attenuationColor, t.shading.attenuationColor), i != null && (e.attenuationDistance = i)), e.side = n || t.shading.doubleSided ? 2 : 0, e;
499
- }, Fe = () => T.createMeshPhysicalMaterial({}), Ie = (e, t = 1) => t === 2 ? Re(e) : Le(e), Le = (e) => {
503
+ }, Ie = () => E.createMeshPhysicalMaterial({}), Le = (e, t = 1) => t === 2 ? ze(e) : Re(e), Re = (e) => {
500
504
  let t = {
501
505
  alpha: e.opacity,
502
506
  metallic: e.reflectivity,
@@ -507,7 +511,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
507
511
  transmission: e.transmission
508
512
  };
509
513
  return e.metalness === 1 ? t.metallic = 1 : t.metallic = e.reflectivity, t;
510
- }, Re = (e) => ({
514
+ }, ze = (e) => ({
511
515
  version: "2.0.0",
512
516
  alpha: e.opacity,
513
517
  alphaCutoff: e.alphaTest,
@@ -543,7 +547,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
543
547
  g: t.g,
544
548
  b: t.b
545
549
  };
546
- }, H = null, ze = (e, t, n, r, i, a, o = 16) => {
550
+ }, H = null, Be = (e, t, n, r, i, a, o = 16) => {
547
551
  H || (H = new p(), H.crossOrigin = "");
548
552
  let s = H;
549
553
  return new Promise((c, l) => {
@@ -570,20 +574,20 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
570
574
  console.warn("ORM maps are not supported on devices with only " + s + " texture units");
571
575
  return;
572
576
  }
573
- e.repeat.set(i, o), Be(e, t, n), t.mapping === v.RGBA && (n.transparent = !0, n.userData.materialVersion === 1 && n.name.includes("glow") && (n.emissiveIntensity = .5, n.emissive = new h(16777215), n.emissiveMap = n.map)), n.needsUpdate = !0;
574
- }, Be = (t, n, r) => {
577
+ e.repeat.set(i, o), Ve(e, t, n), t.mapping === v.RGBA && (n.transparent = !0, n.userData.materialVersion === 1 && n.name.includes("glow") && (n.emissiveIntensity = .5, n.emissive = new h(16777215), n.emissiveMap = n.map)), n.needsUpdate = !0;
578
+ }, Ve = (t, n, r) => {
575
579
  n.mapping === v.XYZ ? (r.normalMap = t, r.map === R() && (r.map = null)) : n.mapping === v.ORM ? (r.aoMap = t, r.roughnessMap = t, r.metalnessMap = t) : n.mapping === v.EMRGB ? r.emissiveMap = t : n.mapping === v.CCRG ? (r.clearcoatMap = t, r.clearcoatRoughnessMap = t) : n.mapping === v.CCXYZ ? r.clearcoatNormalMap = t : n.mapping === v.SHRGBA ? (r.sheenColorMap = t, r.sheenRoughnessMap = t) : n.mapping === v.SPRGBA ? (r.specularColorMap = t, r.specularIntensityMap = t) : n.mapping === v.TTRG ? (r.transmissionMap = t, r.thicknessMap = t) : (t.colorSpace = e, r.map = t);
576
- }, Ve = (e = !0) => {
580
+ }, He = (e = !0) => {
577
581
  if (!window.__RML_WEBGL_GUI__) {
578
- if (!P) return null;
582
+ if (!F) return null;
579
583
  try {
580
- window.__RML_WEBGL_GUI__ = new P({ autoPlace: e });
584
+ window.__RML_WEBGL_GUI__ = new F({ autoPlace: e });
581
585
  } catch {
582
586
  return null;
583
587
  }
584
588
  }
585
589
  return window.__RML_WEBGL_GUI__ ?? null;
586
- }, He = (e, t) => {
590
+ }, Ue = (e, t) => {
587
591
  let n = !1;
588
592
  for (let r of t) {
589
593
  let t = r.getKernelObject(), i;
@@ -596,12 +600,12 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
596
600
  a !== r.getContainer().visible && (n = !0), a ? r.setContainerVisibility(!0) : r.isSelected || r.setContainerVisibility(!1);
597
601
  }
598
602
  return n;
599
- }, Ue = (e, t, n = !0) => {
603
+ }, We = (e, t, n = !0) => {
600
604
  if (!e.userData.tween) if (t) if (e.transparent = !0, !n) e.opacity = .2;
601
605
  else {
602
606
  let t = { opacity: 1 };
603
607
  e.userData.tween = !0;
604
- let n = new M(t).to({ opacity: .2 }, 400).easing(E.Sinusoidal.In).onUpdate(() => {
608
+ let n = new N(t).to({ opacity: .2 }, 400).easing(D.Sinusoidal.In).onUpdate(() => {
605
609
  e.opacity = t.opacity;
606
610
  }).onComplete(() => {
607
611
  e.userData.tween = !1, window.TWEEN?.remove(n);
@@ -612,16 +616,16 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
612
616
  else {
613
617
  let t = { opacity: .2 };
614
618
  e.userData.tween = !0;
615
- let n = new M(t).to({ opacity: 1 }, 400).easing(E.Sinusoidal.In).onUpdate(() => {
619
+ let n = new N(t).to({ opacity: 1 }, 400).easing(D.Sinusoidal.In).onUpdate(() => {
616
620
  e.opacity = t.opacity;
617
621
  }).onComplete(() => {
618
622
  e.transparent = !1, e.userData.tween = !1, window.TWEEN?.remove(n);
619
623
  }).start();
620
624
  window.TWEEN?.add(n);
621
625
  }
622
- }, We = (e, t, n, r, i, a) => {
623
- let o = Ge(n, r), s = i.clone().multiply(r).multiply(t), c = o.clone().invert(), l = c.clone().multiply(n), u = c.clone().multiply(r), d = { t: 0 }, f = new M(d).to({ t: 1 }, 400).easing(E.Quadratic.InOut).onUpdate(() => {
624
- let n = Ke(l, u, d.t);
626
+ }, Ge = (e, t, n, r, i, a) => {
627
+ let o = Ke(n, r), s = i.clone().multiply(r).multiply(t), c = o.clone().invert(), l = c.clone().multiply(n), u = c.clone().multiply(r), d = { t: 0 }, f = new N(d).to({ t: 1 }, 400).easing(D.Quadratic.InOut).onUpdate(() => {
628
+ let n = qe(l, u, d.t);
625
629
  G(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
626
630
  }).onComplete(() => {
627
631
  G(e, s), a && a(), window.TWEEN?.remove(f);
@@ -629,7 +633,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
629
633
  window.TWEEN?.remove(f);
630
634
  }).start();
631
635
  return window.TWEEN?.add(f), f;
632
- }, Ge = (e, n) => {
636
+ }, Ke = (e, n) => {
633
637
  let r = e.clone().invert().clone().multiply(n), a = new t(), o = new i();
634
638
  r.decompose(a, o, new t());
635
639
  let s = W(o), c = s.axis;
@@ -646,7 +650,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
646
650
  };
647
651
  }, G = (e, t) => {
648
652
  e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
649
- }, Ke = (e, n, r) => {
653
+ }, qe = (e, n, r) => {
650
654
  let a = new t(), o = new i(), s = new t();
651
655
  e.decompose(a, o, s);
652
656
  let c = new t(), l = new i(), u = new t();
@@ -661,20 +665,20 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
661
665
  }
662
666
  let h = new t().lerpVectors(s, u, r), g = new m();
663
667
  return g.compose(d, f, h), g;
664
- }, qe = (e) => {
668
+ }, Je = (e) => {
665
669
  let t = new h();
666
670
  return t.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), t;
667
671
  }, K = (e, t) => {
668
672
  t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
669
- }, Je = (e, t) => new Promise((n) => {
673
+ }, Ye = (e, t) => new Promise((n) => {
670
674
  e.traverse((e) => {
671
675
  if (e instanceof c) {
672
676
  let r = e.material;
673
677
  e.userData.tween && e.userData.tween.stop();
674
678
  let i = { opacity: r.opacity };
675
679
  t.transparent && (r.transparent = t.transparent);
676
- let a = new M(i);
677
- a.toJSON = () => void 0, e.userData.tween = a, window.TWEEN?.add(a.to(t, 250).easing(E.Linear.None).onUpdate(() => {
680
+ let a = new N(i);
681
+ a.toJSON = () => void 0, e.userData.tween = a, window.TWEEN?.add(a.to(t, 250).easing(D.Linear.None).onUpdate(() => {
678
682
  r.opacity = i.opacity;
679
683
  }).onStop(() => {
680
684
  K(r, t), e.userData.tween = void 0;
@@ -683,7 +687,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
683
687
  }).start());
684
688
  }
685
689
  });
686
- }), Ye = (e) => {
690
+ }), Xe = (e) => {
687
691
  e.traverse((e) => {
688
692
  if (e instanceof c) {
689
693
  let t = e.material;
@@ -696,7 +700,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
696
700
  transparent: t.transparent
697
701
  };
698
702
  t.transparent = n.transparent, t.opacity = n.opacity;
699
- let i = new M(n).to(r, 500).easing(E.Linear.None).onUpdate(() => {
703
+ let i = new N(n).to(r, 500).easing(D.Linear.None).onUpdate(() => {
700
704
  t.opacity = n.opacity;
701
705
  }).onComplete(() => {
702
706
  t.transparent = r.transparent, window.TWEEN?.remove(i);
@@ -704,10 +708,10 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
704
708
  window.TWEEN?.add(i);
705
709
  }
706
710
  });
707
- }, Xe = (e, n) => {
711
+ }, Ze = (e, n) => {
708
712
  let r = new u().setFromObject(e), i = r.getSize(new t()), a = Math.min(i.x, i.y, i.z), o = !0;
709
713
  return a > 5 && (console.warn("GLB seems to be too big (" + a + ")", n), o = !1), r.min.y < -.01 && (console.warn("GLB seems to be under the floor (" + r.min.y + "): ", n), o = !1), o;
710
- }, Ze = (e) => {
714
+ }, Qe = (e) => {
711
715
  e.type === "Mesh" ? J(e) : q(e);
712
716
  }, q = (e) => {
713
717
  !e || !e.children || e.children.length === 0 || e.children.forEach((e) => {
@@ -735,16 +739,16 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
735
739
  e && e.dispose();
736
740
  }, X = (e) => {
737
741
  e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
738
- }, Z, Qe = () => (Z || (Z = new f(), Z.visible = !1), Z), Q, $e = (e) => (Q ||= T.createMeshStandardMaterial({
742
+ }, Z, $e = () => (Z || (Z = new f(), Z.visible = !1), Z), Q, et = (e) => (Q ||= E.createMeshStandardMaterial({
739
743
  color: e || "#FF0000",
740
744
  transparent: !0,
741
745
  opacity: .5,
742
746
  visible: !0,
743
747
  polygonOffset: !0,
744
748
  polygonOffsetFactor: -1
745
- }), Q), et = (e) => e.x === 0 && e.y === 0 && e.z === 0, tt = (e) => Number.isFinite(e.x) && Number.isFinite(e.y) && Number.isFinite(e.z), nt = (e, t) => {
749
+ }), Q), tt = (e) => e.x === 0 && e.y === 0 && e.z === 0, $ = (e) => Number.isFinite(e.x) && Number.isFinite(e.y) && Number.isFinite(e.z), nt = (e, t) => {
746
750
  let n = "";
747
- return !e && e !== "" ? null : (e.materialId && e.materialId !== "" ? n = e.materialId : e.catalogItemId && e.catalogItemId !== "" ? n = e.catalogItemId : e.rgbValue > 0 ? n = "rgb" + JSON.stringify(e.rgbValue) : e.length > 0 ? n = e : t && t.value === w.WALL ? n = "default_wall_material_" + e.getSourceType().value : t && t.value === w.CEILING && (n = "default_ceiling_material_" + e.getSourceType().value), n);
751
+ return !e && e !== "" ? null : (e.materialId && e.materialId !== "" ? n = e.materialId : e.catalogItemId && e.catalogItemId !== "" ? n = e.catalogItemId : e.rgbValue > 0 ? n = "rgb" + JSON.stringify(e.rgbValue) : e.length > 0 ? n = e : t && t.value === T.WALL ? n = "default_wall_material_" + e.getSourceType().value : t && t.value === T.CEILING && (n = "default_ceiling_material_" + e.getSourceType().value), n);
748
752
  }, rt = (e) => {
749
753
  let n = e.getWorldDirection(new t()).clone();
750
754
  n.y = 0, n.lengthSq() < .01 && (n = new t(0, 1, 0), n.applyQuaternion(e.quaternion), n.y = 0), n.normalize();
@@ -754,16 +758,16 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
754
758
  if (!e || !t) return 0;
755
759
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
756
760
  return r && n || !r && !n ? 0 : n === !0 ? 1 : -1;
757
- }, $ = (e, t) => {
761
+ }, at = (e, t) => {
758
762
  if (!e || !t) return 0;
759
763
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
760
764
  if (r && n) return 0;
761
765
  if (!r && !n) {
762
- let n = at(e, t);
766
+ let n = ot(e, t);
763
767
  return n === .5 ? 0 : n > .5 ? -1 : 1;
764
768
  }
765
769
  return n === !0 ? 1 : -1;
766
- }, at = (e, n) => {
770
+ }, ot = (e, n) => {
767
771
  let r = new u();
768
772
  if (r.copy(e).intersect(n), r.isEmpty()) return 0;
769
773
  let i = (e) => {
@@ -771,34 +775,34 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
771
775
  return e.getSize(n), n.x * n.y * n.z;
772
776
  }, a = i(e), o = i(r);
773
777
  return a === 0 ? 0 : o / a;
774
- }, ot = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, st = (e, n, r, i = 1) => {
778
+ }, st = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, ct = (e, n, r, i = 1) => {
775
779
  let a = n > r, o = a ? 15 : 0, s = a ? 0 : 10, c = e.getSize(new t()), l = e.getCenter(new t()), d = c.x > 2 * o ? c.x / 2 : o, f = c.z > 2 * s ? c.z / 2 : s;
776
780
  return d *= i, f *= i, new u(new t(l.x - d, l.y, l.z - f), new t(l.x + d, l.y, l.z + f));
777
- }, ct = (e) => {
781
+ }, lt = (e) => {
778
782
  let { x: t, y: n } = e;
779
783
  return {
780
784
  x: t,
781
785
  y: n
782
786
  };
783
- }, lt = (e) => {
787
+ }, ut = (e) => {
784
788
  let { x: t, y: n, z: r } = e;
785
789
  return {
786
790
  x: t,
787
791
  y: n,
788
792
  z: r
789
793
  };
790
- }, ut = (e, n, r) => new t().setFromSphericalCoords(e, Math.PI * (1 - r), Math.PI * 2 * (1 - n)), dt = (e) => {
794
+ }, dt = (e, n, r) => new t().setFromSphericalCoords(e, Math.PI * (1 - r), Math.PI * 2 * (1 - n)), ft = (e) => {
791
795
  let t = new r();
792
796
  return e.environment && (t.environment = e.environment.clone()), e.userData.environmentDefinition && (t.userData.environmentDefinition = e.userData.environmentDefinition.clone()), t.userData.shadowFromEnvironment = e.userData.shadowFromEnvironment, t;
793
- }, ft = (e, n) => {
797
+ }, pt = (e, n) => {
794
798
  let r = new l(), i = new m().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse);
795
799
  r.setFromProjectionMatrix(i);
796
800
  let a = n.getCenter(new t());
797
801
  return r.containsPoint(a);
798
- }, pt = (e) => {
802
+ }, mt = (e) => {
799
803
  e.lights_fragment_begin = "\n vec3 geometryPosition = - vViewPosition;\n vec3 geometryNormal = normal;\n vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n vec3 geometryClearcoatNormal = vec3( 0.0 );\n #ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n #endif\n\n // OPTIMIZATION: Early exit for transparent/invisible materials\n #ifdef USE_ALPHATEST\n if ( diffuseColor.a < alphaTest ) discard;\n #endif\n\n // OPTIMIZATION: Cache expensive calculations\n float NdotV = saturate( dot( geometryNormal, geometryViewDir ) );\n\n #ifdef USE_IRIDESCENCE\n float dotNVi = NdotV; // Reuse calculated value\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n // OPTIMIZATION: Skip iridescence calculations if effect is minimal\n if ( material.iridescence > 0.01 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n #endif\n\n IncidentLight directLight;\n\n // OPTIMIZATION: Early exit if material has no metalness or roughness variation\n #ifdef USE_ROUGHNESSMAP\n bool hasRoughnessVariation = true;\n #else\n bool hasRoughnessVariation = false;\n #endif\n\n #ifdef USE_METALNESSMAP\n bool hasMetalnessVariation = true;\n #else\n bool hasMetalnessVariation = false;\n #endif\n\n #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n\n // OPTIMIZATION: Enhanced visibility and distance checks\n #if defined( RE_Direct )\n if ( directLight.visible ) {\n // OPTIMIZATION: Skip lights with negligible contribution based on color intensity\n float lightIntensity = dot( directLight.color, vec3( 0.299, 0.587, 0.114 ) );\n if ( lightIntensity > 0.001 ) {\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n }\n #endif\n }\n #pragma unroll_loop_end\n #endif\n\n #if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n\n // OPTIMIZATION: Enhanced visibility checks for spot lights\n #if defined( RE_Direct )\n if ( directLight.visible ) {\n // OPTIMIZATION: Skip spot light map calculation if light contribution is minimal\n float lightIntensity = dot( directLight.color, vec3( 0.299, 0.587, 0.114 ) );\n if ( lightIntensity > 0.001 ) {\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n if ( inSpotLightMap ) {\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = directLight.color * spotColor.rgb;\n }\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n }\n #endif\n }\n #pragma unroll_loop_end\n #endif\n\n #if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n\n // OPTIMIZATION: Skip very dim directional lights\n #if defined( RE_Direct )\n float lightIntensity = dot( directLight.color, vec3( 0.299, 0.587, 0.114 ) );\n if ( directLight.visible && lightIntensity > 0.001 ) {\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #endif\n }\n #pragma unroll_loop_end\n #endif\n\n #if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n // OPTIMIZATION: Simple rect area light processing - Three.js handles distance internally\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n #endif\n\n // OPTIMIZATION: Streamlined indirect lighting with early exits\n #if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n // OPTIMIZATION: Skip light probe calculation if ambient is sufficient\n float ambientIntensity = dot( irradiance, vec3( 0.299, 0.587, 0.114 ) );\n\n #if defined( USE_LIGHT_PROBES )\n if ( ambientIntensity < 0.9 ) {\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n }\n #endif\n\n #if ( NUM_HEMI_LIGHTS > 0 )\n if ( ambientIntensity < 0.9 ) {\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n vec3 hemiContribution = getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n // OPTIMIZATION: Skip negligible hemisphere light contributions\n if ( dot( hemiContribution, vec3( 0.299, 0.587, 0.114 ) ) > 0.001 ) {\n irradiance += hemiContribution;\n }\n }\n #pragma unroll_loop_end\n }\n #endif\n #endif\n\n #if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n #endif", e.lights_pars_begin = e.lights_pars_begin.replace("light.color = pointLight.color;", "\n light.color = pointLight.color * step( lightDistance, pointLight.distance );\n ");
800
804
  };
801
805
  //#endregion
802
- export { O as $, we as A, je as B, qe as C, b as Ct, Ie as D, nt as E, ft as F, Ue as G, Ae as H, ot as I, Je as J, ct as K, De as L, Ve as M, rt as N, Te as O, He as P, E as Q, Oe as R, $ as S, ne as St, st as T, z as U, ke as V, G as W, et as X, tt as Y, ut as Z, X as _, oe as _t, be as a, w as at, Ye as b, ie as bt, U as c, de as ct, Xe as d, pe as dt, M as et, it as f, S as ft, Y as g, re as gt, Ze as h, ae as ht, ye as i, he as it, Ee as j, Ce as k, ze as l, ue as lt, Me as m, se as mt, Se as n, _e as nt, F as o, me as ot, dt as p, x as pt, lt as q, ve as r, ge as rt, I as s, fe as st, xe as t, T as tt, We as u, le as ut, J as v, ce as vt, $e as w, Qe as x, ee as xt, q as y, te as yt, pt as z };
806
+ export { k as $, Te as A, Me as B, Je as C, ne as Ct, Le as D, nt as E, pt as F, We as G, je as H, st as I, Ye as J, lt as K, Oe as L, He as M, rt as N, Ee as O, Ue as P, D as Q, ke as R, at as S, ee as St, ct as T, z as U, Ae as V, G as W, tt as X, $ as Y, dt as Z, X as _, se as _t, xe as a, T as at, Xe as b, ae as bt, U as c, de as ct, Ze as d, pe as dt, N as et, it as f, S as ft, Y as g, re as gt, Qe as h, oe as ht, be as i, he as it, De as j, we as k, Be as l, C as lt, Ne as m, ce as mt, Ce as n, _e as nt, I as o, me as ot, ft as p, x as pt, ut as q, ye as r, ge as rt, ve as s, fe as st, Se as t, E as tt, Ge as u, ue as ut, J as v, le as vt, et as w, b as wt, $e as x, ie as xt, q as y, te as yt, mt as z };
803
807
 
804
- //# sourceMappingURL=threejs-utils-C9zED_Tu.mjs.map
808
+ //# sourceMappingURL=threejs-utils-DKJ0uer7.mjs.map