@roomle/web-sdk 5.1.0-alpha.2 → 5.1.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.
Files changed (113) hide show
  1. package/lib/{BufferGeometry-Cd2ewNVQ.mjs → BufferGeometry-Bl5whHAB.mjs} +1 -1
  2. package/lib/{BufferGeometry-Cd2ewNVQ.mjs.map → BufferGeometry-Bl5whHAB.mjs.map} +1 -1
  3. package/lib/ConfiguratorKernel.js +2 -2
  4. package/lib/ConfiguratorKernel.wasm +0 -0
  5. package/lib/{GLTFExporter-n80QLoDf.mjs → GLTFExporter-yQ7mMauu.mjs} +1 -1
  6. package/lib/{GLTFExporter-n80QLoDf.mjs.map → GLTFExporter-yQ7mMauu.mjs.map} +1 -1
  7. package/lib/{GaussianBlurNode-Cwy3kx8H.mjs → GaussianBlurNode-DNBEf5-n.mjs} +14 -14
  8. package/lib/{GaussianBlurNode-Cwy3kx8H.mjs.map → GaussianBlurNode-DNBEf5-n.mjs.map} +1 -1
  9. package/lib/{PointLightHelper-DlPLsDNy.mjs → PointLightHelper-CuPSBuDU.mjs} +2 -2
  10. package/lib/{PointLightHelper-DlPLsDNy.mjs.map → PointLightHelper-CuPSBuDU.mjs.map} +1 -1
  11. package/lib/RoomleCore.wasm +0 -0
  12. package/lib/RoomleToolsCore.wasm +0 -0
  13. package/lib/{SpotLightHelper-YWHbVXAF.mjs → SpotLightHelper-m-Rh8vGU.mjs} +2 -2
  14. package/lib/{SpotLightHelper-YWHbVXAF.mjs.map → SpotLightHelper-m-Rh8vGU.mjs.map} +1 -1
  15. package/lib/{USDZExporter-Bm-c5e_n.mjs → USDZExporter-MdkuT226.mjs} +1 -1
  16. package/lib/{USDZExporter-Bm-c5e_n.mjs.map → USDZExporter-MdkuT226.mjs.map} +1 -1
  17. package/lib/{api-B5wIZIHt.mjs → api-Bznmr-xZ.mjs} +2 -2
  18. package/lib/{api-B5wIZIHt.mjs.map → api-Bznmr-xZ.mjs.map} +1 -1
  19. package/lib/{asset-loader.worker-CE4O0JU-.mjs → asset-loader.worker-CzI1oyTY.mjs} +1 -1
  20. package/lib/asset-loader.worker-CzI1oyTY.mjs.map +1 -0
  21. package/lib/{banana-for-scale-D0bw51dn.mjs → banana-for-scale-DpKXNBt_.mjs} +2 -2
  22. package/lib/{banana-for-scale-D0bw51dn.mjs.map → banana-for-scale-DpKXNBt_.mjs.map} +1 -1
  23. package/lib/{budgeteer.sw-yR2xApHT.mjs → budgeteer.sw-D80jTmYa.mjs} +1 -1
  24. package/lib/budgeteer.sw-D80jTmYa.mjs.map +1 -0
  25. package/lib/{component-dimensioning-VIUcXV7r.mjs → component-dimensioning-BaUqwqYJ.mjs} +4 -4
  26. package/lib/{component-dimensioning-VIUcXV7r.mjs.map → component-dimensioning-BaUqwqYJ.mjs.map} +1 -1
  27. package/lib/{component-raycast-helper-CEAdBcdx.mjs → component-raycast-helper-4i8b4E5B.mjs} +3 -3
  28. package/lib/{component-raycast-helper-CEAdBcdx.mjs.map → component-raycast-helper-4i8b4E5B.mjs.map} +1 -1
  29. package/lib/configurator-BYQdWEvf.mjs +2 -0
  30. package/lib/{configurator-CxlLvBCx.mjs → configurator-CDw_c6tB.mjs} +4 -4
  31. package/lib/{configurator-CxlLvBCx.mjs.map → configurator-CDw_c6tB.mjs.map} +1 -1
  32. package/lib/{continuous-drawing-helper-Dr1r-5N2.mjs → continuous-drawing-helper-DqHIR_qF.mjs} +1 -1
  33. package/lib/{continuous-drawing-helper-Dr1r-5N2.mjs.map → continuous-drawing-helper-DqHIR_qF.mjs.map} +1 -1
  34. package/lib/{dimensioning-helper-ChQDwSjn.mjs → dimensioning-helper-CGPjS2hW.mjs} +2 -2
  35. package/lib/{dimensioning-helper-ChQDwSjn.mjs.map → dimensioning-helper-CGPjS2hW.mjs.map} +1 -1
  36. package/lib/dimensioning-helper-VndKlIXS.mjs +2 -0
  37. package/lib/{glb-viewer-27e6wfY4.mjs → glb-viewer-B-Zr743e.mjs} +4 -4
  38. package/lib/{glb-viewer-27e6wfY4.mjs.map → glb-viewer-B-Zr743e.mjs.map} +1 -1
  39. package/lib/glb-viewer-Bd5Xn6Oq.mjs +2 -0
  40. package/lib/{highlight-coordinator-C05kDjj5.mjs → highlight-coordinator-4gkjde82.mjs} +2 -2
  41. package/lib/{highlight-coordinator-C05kDjj5.mjs.map → highlight-coordinator-4gkjde82.mjs.map} +1 -1
  42. package/lib/{homag-intelligence-BRQ1WoQo.mjs → homag-intelligence-D7S7r-Gc.mjs} +3 -3
  43. package/lib/{homag-intelligence-BRQ1WoQo.mjs.map → homag-intelligence-D7S7r-Gc.mjs.map} +1 -1
  44. package/lib/hosek-wilkie-sky-iMar2iw-.mjs +3755 -0
  45. package/lib/hosek-wilkie-sky-iMar2iw-.mjs.map +1 -0
  46. package/lib/{imos-ix-poc-export-helper-DhxAAMc9.mjs → imos-ix-poc-export-helper-CyGqK7nu.mjs} +1 -1
  47. package/lib/{imos-ix-poc-export-helper-DhxAAMc9.mjs.map → imos-ix-poc-export-helper-CyGqK7nu.mjs.map} +1 -1
  48. package/lib/kernel-BWfRHWkW.mjs.map +1 -1
  49. package/lib/{layer-DaGoZ5YI.mjs → layer-DRMDGxT7.mjs} +2 -2
  50. package/lib/layer-DRMDGxT7.mjs.map +1 -0
  51. package/lib/{material-viewer-Byi5t7-x.mjs → material-viewer-CTsSfTfL.mjs} +4 -4
  52. package/lib/{material-viewer-Byi5t7-x.mjs.map → material-viewer-CTsSfTfL.mjs.map} +1 -1
  53. package/lib/{packages-3jOdcfbr.mjs → packages-BXAZEcKa.mjs} +5 -5
  54. package/lib/{packages-3jOdcfbr.mjs.map → packages-BXAZEcKa.mjs.map} +1 -1
  55. package/lib/planner-DMk3T4ts.mjs +2 -0
  56. package/lib/{planner-BeINcWRR.mjs → planner-jvLAnYww.mjs} +3 -3
  57. package/lib/{planner-BeINcWRR.mjs.map → planner-jvLAnYww.mjs.map} +1 -1
  58. package/lib/{plugin-system-DR5maiUo.mjs → plugin-system-CRaC04G5.mjs} +2 -2
  59. package/lib/{plugin-system-DR5maiUo.mjs.map → plugin-system-CRaC04G5.mjs.map} +1 -1
  60. package/lib/roomle-headless.d.ts +183 -8
  61. package/lib/roomle-headless.js +11 -11
  62. package/lib/roomle-renderer-Ato6RMrd.mjs.map +1 -1
  63. package/lib/{roomle-sdk-CsSQAqQG.mjs → roomle-sdk-CBwhwX_e.mjs} +3364 -3158
  64. package/lib/roomle-sdk-CBwhwX_e.mjs.map +1 -0
  65. package/lib/roomle-sdk.d.ts +183 -8
  66. package/lib/roomle-sdk.js +8 -8
  67. package/lib/{roomle-webgpu-renderer-BBE14A8V.mjs → roomle-webgpu-renderer-BfZKcXSz.mjs} +349 -344
  68. package/lib/{roomle-webgpu-renderer-BBE14A8V.mjs.map → roomle-webgpu-renderer-BfZKcXSz.mjs.map} +1 -1
  69. package/lib/{scene-renderer-B8SBMSQ7.mjs → scene-renderer-BHYZac3H.mjs} +3 -3
  70. package/lib/{scene-renderer-B8SBMSQ7.mjs.map → scene-renderer-BHYZac3H.mjs.map} +1 -1
  71. package/lib/{script-loader-Dx3gOiB3.mjs → script-loader-CvnG6LgL.mjs} +2 -2
  72. package/lib/{script-loader-Dx3gOiB3.mjs.map → script-loader-CvnG6LgL.mjs.map} +1 -1
  73. package/lib/src-Bbq3Hqzn.mjs +2 -0
  74. package/lib/src-HhklrVDg.mjs +1950 -0
  75. package/lib/src-HhklrVDg.mjs.map +1 -0
  76. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  77. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +16 -0
  78. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js +5 -1
  79. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +1 -1
  80. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +2 -8
  81. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js +1 -5
  82. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
  83. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.js +2 -2
  84. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  85. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  86. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  87. package/lib/{stats-helper-W654V5ay.mjs → stats-helper-PndcZCzL.mjs} +2 -2
  88. package/lib/{stats-helper-W654V5ay.mjs.map → stats-helper-PndcZCzL.mjs.map} +1 -1
  89. package/lib/three.tsl-BTc4fg8T.mjs +2 -0
  90. package/lib/{three.tsl-B7hcNZE8.mjs → three.tsl-Cf0-sCqB.mjs} +70 -66
  91. package/lib/{three.tsl-B7hcNZE8.mjs.map → three.tsl-Cf0-sCqB.mjs.map} +1 -1
  92. package/lib/{threejs-utils-WK7Uu2TS.mjs → threejs-utils-v1uOvccg.mjs} +175 -184
  93. package/lib/threejs-utils-v1uOvccg.mjs.map +1 -0
  94. package/lib/{tools-core-CWrR_N9g.mjs → tools-core-B29U-88K.mjs} +3 -3
  95. package/lib/{tools-core-CWrR_N9g.mjs.map → tools-core-B29U-88K.mjs.map} +1 -1
  96. package/lib/webgpu-BHAP6BLI.mjs +3140 -0
  97. package/lib/webgpu-BHAP6BLI.mjs.map +1 -0
  98. package/lib/workers-B_wmKVL0.mjs +6 -0
  99. package/lib/{workers-B-AqdQMe.mjs.map → workers-B_wmKVL0.mjs.map} +1 -1
  100. package/package.json +2 -2
  101. package/lib/asset-loader.worker-CE4O0JU-.mjs.map +0 -1
  102. package/lib/budgeteer.sw-yR2xApHT.mjs.map +0 -1
  103. package/lib/configurator-h8QoUnMz.mjs +0 -2
  104. package/lib/dimensioning-helper-BEGkpZFA.mjs +0 -2
  105. package/lib/glb-viewer-Dc2Tl8Ef.mjs +0 -2
  106. package/lib/layer-DaGoZ5YI.mjs.map +0 -1
  107. package/lib/planner-Ler1UMAp.mjs +0 -2
  108. package/lib/roomle-sdk-CsSQAqQG.mjs.map +0 -1
  109. package/lib/three.tsl-BBUCm-uB.mjs +0 -2
  110. package/lib/threejs-utils-WK7Uu2TS.mjs.map +0 -1
  111. package/lib/webgpu-DSecxaB8.mjs +0 -5084
  112. package/lib/webgpu-DSecxaB8.mjs.map +0 -1
  113. package/lib/workers-B-AqdQMe.mjs +0 -6
@@ -1,7 +1,7 @@
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
- import { r as g } from "./three.module-dym6j3lO.mjs";
3
- import { a as _ } from "./kernel-utils-BvatnA7U.mjs";
4
- import { U as v, b as y } from "./common-utils-DbL4tku0.mjs";
1
+ import { Br as e, Ci as t, Hr as n, Ln as r, Mr as i, _n as a, cn as o, dt as s, f as c, gn as l, ln as u, si as d, sn as f, w as p } from "./three.core-0KaTx8dm.mjs";
2
+ import { r as m } from "./three.module-dym6j3lO.mjs";
3
+ import { a as h } from "./kernel-utils-BvatnA7U.mjs";
4
+ import { U as g, b as _ } from "./common-utils-DbL4tku0.mjs";
5
5
  //#region packages/typings/planner.ts
6
6
  var ee = {
7
7
  CONFIGURATOR: 0,
@@ -30,7 +30,7 @@ var ee = {
30
30
  }, ae = {
31
31
  FLOOR: 0,
32
32
  ELEVATION: 1
33
- }, b = /* @__PURE__ */ function(e) {
33
+ }, v = /* @__PURE__ */ function(e) {
34
34
  return e[e.StandAloneWall = 0] = "StandAloneWall", e[e.OuterWallLeft = 1] = "OuterWallLeft", e[e.OuterWallRight = 2] = "OuterWallRight", e[e.InnerWall = 3] = "InnerWall", e;
35
35
  }({}), oe = {
36
36
  DEFAULT: 0,
@@ -42,33 +42,33 @@ var ee = {
42
42
  WALL: 0,
43
43
  EDGE: 1,
44
44
  CONSTRUCTION: 2
45
- }, x = {
45
+ }, y = {
46
46
  OBJECT: 0,
47
47
  DOOR: 1,
48
48
  WINDOW: 2,
49
49
  CONSTRUCTION: 3,
50
50
  UNKNOWN: 4,
51
51
  EXTERNAL_CONSTRUCTION: 5
52
- }, S = function(e) {
52
+ }, b = function(e) {
53
53
  return Math.PI / 180 * e;
54
- }, C = function(e) {
54
+ }, x = function(e) {
55
55
  return 180 / Math.PI * e;
56
56
  }, le = function(e) {
57
57
  return e >= 0 ? -180 + (e + 180) % 360 : 180 - (-e + 180) % 360;
58
58
  }, ue = function(e, t, n, r, i, a) {
59
59
  e = Math.sqrt(e * e + n * n);
60
- let o = i / a || 1, s = 2 * Math.atan(Math.tan(r * Math.PI / 180 / 2) * o) * 180 / Math.PI, c = S(r), l = t / 2 / Math.tan(c / 2), u = e / (2 * Math.atan(Math.PI * s / 360));
60
+ let o = i / a || 1, s = 2 * Math.atan(Math.tan(r * Math.PI / 180 / 2) * o) * 180 / Math.PI, c = b(r), l = t / 2 / Math.tan(c / 2), u = e / (2 * Math.atan(Math.PI * s / 360));
61
61
  return Math.max(l, u);
62
- }, w = function(e) {
62
+ }, S = function(e) {
63
63
  return Math.round(e * 1e3) / 1e3;
64
64
  }, de = function(e, t) {
65
65
  return Math.abs(e.y - t.y) + Math.abs(e.x - t.x);
66
66
  }, fe = function(e, t) {
67
67
  return Math.atan2(t.y - e.y, t.x - e.x);
68
68
  }, pe = function(e) {
69
- let t = C(e);
69
+ let t = x(e);
70
70
  return t < 0 && (t = 180 + (180 + t)), t;
71
- }, T = /* @__PURE__ */ function(e) {
71
+ }, C = /* @__PURE__ */ function(e) {
72
72
  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;
73
73
  }({}), me = {
74
74
  LEFT: 0,
@@ -82,14 +82,14 @@ var ee = {
82
82
  WALL: 0,
83
83
  ROOM_CONTOUR: 1,
84
84
  CONTOUR: 2
85
- }, E = class {
85
+ }, w = class {
86
86
  static createMeshPhysicalMaterial(e) {
87
- return new d(e);
87
+ return new l(e);
88
88
  }
89
89
  static createMeshStandardMaterial(e) {
90
- return new s(e);
90
+ return new a(e);
91
91
  }
92
- }, D = Object.freeze({
92
+ }, T = Object.freeze({
93
93
  Linear: Object.freeze({
94
94
  None: function(e) {
95
95
  return e;
@@ -208,13 +208,13 @@ var ee = {
208
208
  }),
209
209
  Bounce: Object.freeze({
210
210
  In: function(e) {
211
- return 1 - D.Bounce.Out(1 - e);
211
+ return 1 - T.Bounce.Out(1 - e);
212
212
  },
213
213
  Out: function(e) {
214
214
  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;
215
215
  },
216
216
  InOut: function(e) {
217
- return e < .5 ? D.Bounce.In(e * 2) * .5 : D.Bounce.Out(e * 2 - 1) * .5 + .5;
217
+ return e < .5 ? T.Bounce.In(e * 2) * .5 : T.Bounce.Out(e * 2 - 1) * .5 + .5;
218
218
  }
219
219
  }),
220
220
  generatePow: function(e) {
@@ -230,9 +230,9 @@ var ee = {
230
230
  }
231
231
  };
232
232
  }
233
- }), O = function() {
233
+ }), E = function() {
234
234
  return performance.now();
235
- }, k = function() {
235
+ }, D = function() {
236
236
  function e() {
237
237
  var e = [...arguments];
238
238
  this._tweens = {}, this._tweensAddedDuringUpdate = {}, this.add.apply(this, e);
@@ -260,7 +260,7 @@ var ee = {
260
260
  return !e.isPlaying();
261
261
  });
262
262
  }, e.prototype.update = function(e, t) {
263
- e === void 0 && (e = O()), t === void 0 && (t = !0);
263
+ e === void 0 && (e = E()), t === void 0 && (t = !0);
264
264
  var n = Object.keys(this._tweens);
265
265
  if (n.length !== 0) for (; n.length > 0;) {
266
266
  this._tweensAddedDuringUpdate = {};
@@ -271,17 +271,17 @@ var ee = {
271
271
  n = Object.keys(this._tweensAddedDuringUpdate);
272
272
  }
273
273
  }, e;
274
- }(), A = {
274
+ }(), O = {
275
275
  Linear: function(e, t) {
276
- var n = e.length - 1, r = n * t, i = Math.floor(r), a = A.Utils.Linear;
276
+ var n = e.length - 1, r = n * t, i = Math.floor(r), a = O.Utils.Linear;
277
277
  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);
278
278
  },
279
279
  Bezier: function(e, t) {
280
- 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);
280
+ for (var n = 0, r = e.length - 1, i = Math.pow, a = O.Utils.Bernstein, o = 0; o <= r; o++) n += i(1 - t, r - o) * i(t, o) * e[o] * a(r, o);
281
281
  return n;
282
282
  },
283
283
  CatmullRom: function(e, t) {
284
- var n = e.length - 1, r = n * t, i = Math.floor(r), a = A.Utils.CatmullRom;
284
+ var n = e.length - 1, r = n * t, i = Math.floor(r), a = O.Utils.CatmullRom;
285
285
  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);
286
286
  },
287
287
  Utils: {
@@ -289,7 +289,7 @@ var ee = {
289
289
  return (t - e) * n + e;
290
290
  },
291
291
  Bernstein: function(e, t) {
292
- var n = A.Utils.Factorial;
292
+ var n = O.Utils.Factorial;
293
293
  return n(e) / n(t) / n(e - t);
294
294
  },
295
295
  Factorial: (function() {
@@ -306,14 +306,14 @@ var ee = {
306
306
  return (2 * t - 2 * n + a + o) * c + (-3 * t + 3 * n - 2 * a - o) * s + a * i + t;
307
307
  }
308
308
  }
309
- }, j = function() {
309
+ }, k = function() {
310
310
  function e() {}
311
311
  return e.nextId = function() {
312
312
  return e._nextId++;
313
313
  }, e._nextId = 0, e;
314
- }(), M = new k(), N = function() {
314
+ }(), A = new D(), j = function() {
315
315
  function e(e, t) {
316
- 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));
316
+ 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 = T.Linear.None, this._interpolationFunction = O.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = k.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 = A, A.add(this));
317
317
  }
318
318
  return e.prototype.getId = function() {
319
319
  return this._id;
@@ -331,7 +331,7 @@ var ee = {
331
331
  }, e.prototype.dynamic = function(e) {
332
332
  return e === void 0 && (e = !1), this._isDynamic = e, this;
333
333
  }, e.prototype.start = function(e, t) {
334
- if (e === void 0 && (e = O()), t === void 0 && (t = !1), this._isPlaying) return this;
334
+ if (e === void 0 && (e = E()), t === void 0 && (t = !1), this._isPlaying) return this;
335
335
  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];
336
336
  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) {
337
337
  if (this._propertiesAreSetUp = !0, !this._isDynamic) {
@@ -381,9 +381,9 @@ var ee = {
381
381
  }, e.prototype.end = function() {
382
382
  return this._goToEnd = !0, this.update(this._startTime + this._duration), this;
383
383
  }, e.prototype.pause = function(e) {
384
- return e === void 0 && (e = O()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = e, this);
384
+ return e === void 0 && (e = E()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = e, this);
385
385
  }, e.prototype.resume = function(e) {
386
- return e === void 0 && (e = O()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this);
386
+ return e === void 0 && (e = E()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this);
387
387
  }, e.prototype.stopChainedTweens = function() {
388
388
  for (var e = 0, t = this._chainedTweens.length; e < t; e++) this._chainedTweens[e].stop();
389
389
  return this;
@@ -401,9 +401,9 @@ var ee = {
401
401
  }, e.prototype.yoyo = function(e) {
402
402
  return e === void 0 && (e = !1), this._yoyo = e, this;
403
403
  }, e.prototype.easing = function(e) {
404
- return e === void 0 && (e = D.Linear.None), this._easingFunction = e, this;
404
+ return e === void 0 && (e = T.Linear.None), this._easingFunction = e, this;
405
405
  }, e.prototype.interpolation = function(e) {
406
- return e === void 0 && (e = A.Linear), this._interpolationFunction = e, this;
406
+ return e === void 0 && (e = O.Linear), this._interpolationFunction = e, this;
407
407
  }, e.prototype.chain = function() {
408
408
  return this._chainedTweens = [...arguments], this;
409
409
  }, e.prototype.onStart = function(e) {
@@ -420,7 +420,7 @@ var ee = {
420
420
  return this._onStopCallback = e, this;
421
421
  }, e.prototype.update = function(t, n) {
422
422
  var r = this;
423
- if (t === void 0 && (t = O()), n === void 0 && (n = e.autoStartOnUpdate), this._isPaused) return !0;
423
+ if (t === void 0 && (t = E()), n === void 0 && (n = e.autoStartOnUpdate), this._isPaused) return !0;
424
424
  var i;
425
425
  if (!this._goToEnd && !this._isPlaying) if (n) this.start(t, !0);
426
426
  else return !1;
@@ -453,170 +453,161 @@ var ee = {
453
453
  typeof n == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(n) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = t;
454
454
  }, e.autoStartOnUpdate = !1, e;
455
455
  }();
456
- j.nextId;
457
- var P = M;
458
- P.getAll.bind(P), P.removeAll.bind(P), P.add.bind(P), P.remove.bind(P), P.update.bind(P);
456
+ k.nextId;
457
+ var M = A;
458
+ M.getAll.bind(M), M.removeAll.bind(M), M.add.bind(M), M.remove.bind(M), M.update.bind(M);
459
459
  //#endregion
460
460
  //#region packages/common-core/src/utils/threejs-utils.ts
461
- var F = null;
461
+ var N = null;
462
462
  globalThis.window !== void 0 && import("./dat.gui.module-CSOnFjd0.mjs").then((e) => {
463
- F = e.GUI;
463
+ N = e.GUI;
464
464
  }).catch(() => {});
465
- var ve = .4, ye = "#DDDDDD", be = .4, xe = "#7B7B7B", Se = "#B1B1B1", Ce = "cameraFacingHidden", we = "cameraFacingIndicator", Te = .8, Ee = .9, De = (e) => e instanceof g ? e.capabilities.maxSamples : 16, Oe = (e) => e instanceof g ? e.capabilities.maxTextures : 16, ke = (e) => e instanceof g ? e.capabilities.getMaxAnisotropy() : 16, Ae = (e, n, r, i) => {
465
+ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "cameraFacingHidden", Se = "cameraFacingIndicator", Ce = .8, we = .9, Te = (e) => e instanceof m ? e.capabilities.maxSamples : 16, Ee = (e) => e instanceof m ? e.capabilities.maxTextures : 16, De = (e) => e instanceof m ? e.capabilities.getMaxAnisotropy() : 16, Oe = (e, n, r, i) => {
466
466
  if (!e || !n || r === 0 || i === 0) return new t();
467
467
  let a = e.clone(), o = r / 2, s = i / 2;
468
468
  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;
469
- }, je = (e, n) => {
469
+ }, ke = (e, n) => {
470
470
  n ||= new t(0, 0, 0);
471
471
  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);
472
- return new u(new t(0, 0, -r.z).add(i).sub(n), new t(r.x, r.y, 0).add(i).add(n));
473
- }, Me = (e) => (e.from /= 1e3, e.to /= 1e3, e), Ne = (e, t) => {
474
- 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);
472
+ return new c(new t(0, 0, -r.z).add(i).sub(n), new t(r.x, r.y, 0).add(i).add(n));
473
+ }, Ae = (e) => (e.from /= 1e3, e.to /= 1e3, e), je = (e, t) => {
474
+ let n = S(e.x), r = S(e.y), i = S(e.z), a = S(t.x), o = S(t.y), s = S(t.z);
475
475
  return n === a && r === o && i === s;
476
- }, Pe = (e, t) => {
477
- 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);
476
+ }, Me = (e, t) => {
477
+ let n = S(e.w), r = S(e.x), i = S(e.y), a = S(e.z), o = S(t.w), s = S(t.x), c = S(t.y), l = S(t.z);
478
478
  return n === o && r === s && i === c && a === l;
479
- }, Fe = (e, t) => {
480
- let n = w(e.x), r = w(e.y), i = w(t.x), a = w(t.y);
479
+ }, Ne = (e, t) => {
480
+ let n = S(e.x), r = S(e.y), i = S(t.x), a = S(t.y);
481
481
  return n === i && r === a;
482
- }, I = null, L = () => {
483
- if (I) return I;
484
- let e = new Uint8Array(4);
485
- for (let t = 0; t < 1; t++) {
486
- let n = t * 4;
487
- e[n] = 255, e[n + 1] = 255, e[n + 2] = 255, e[n + 3] = 255;
488
- }
489
- let t = new o(e, 1, 1, n);
490
- return t.needsUpdate = !0, t;
491
- }, Ie = (e) => R(null, e), R = (e, t) => {
492
- e ||= ze(), e.name = t.id ? t.id.toString() : "";
482
+ }, Pe = (e) => I(null, e), I = (e, t) => {
483
+ e ||= Le(), e.name = t.id ? t.id.toString() : "";
493
484
  let n = t.shading.version === "2" || t.shading.version?.startsWith("2.");
494
- return e = n ? Re(e, t) : Le(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (I ||= L(), e.map = I), e;
495
- }, Le = (e, t) => {
496
- t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = y(t.shading.metallic, .5));
485
+ return e = n ? Ie(e, t) : Fe(e, t), e.userData.materialVersion = n ? 2 : 1, e;
486
+ }, Fe = (e, t) => {
487
+ t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = _(t.shading.metallic, .5));
497
488
  let n = !1;
498
- 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), z(e.color, t.shading.basecolor), n || t.shading.doubleSided ? e.side = 2 : e.side = 0, e;
499
- }, Re = (e, t) => {
489
+ 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 = _(t.shading.occlusion, 1), e.roughness = _(t.shading.roughness, .5), e.alphaTest = _(t.shading.alphaCutoff, 0), L(e.color, t.shading.basecolor), n || t.shading.doubleSided ? e.side = 2 : e.side = 0, e;
490
+ }, Ie = (e, t) => {
500
491
  let n = !1, r = t.shading.transmission && t.shading.transmission > 0;
501
- 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, z(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, z(e.specularColor, t.shading.specularColor), e.specularIntensity = t.shading.specularity ?? 1, e.roughness = t.shading.roughness ?? 0, e.aoMapIntensity = t.shading.occlusion ?? 1, z(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), z(e.sheenColor, t.shading.sheenColor), e.sheen = t.shading.sheenIntensity ?? 1, e.sheenRoughness = t.shading.sheenRoughness ?? 1, e.thickness = t.shading.thicknessFactor ?? 0;
492
+ 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, L(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, L(e.specularColor, t.shading.specularColor), e.specularIntensity = t.shading.specularity ?? 1, e.roughness = t.shading.roughness ?? 0, e.aoMapIntensity = t.shading.occlusion ?? 1, L(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), L(e.sheenColor, t.shading.sheenColor), e.sheen = t.shading.sheenIntensity ?? 1, e.sheenRoughness = t.shading.sheenRoughness ?? 1, e.thickness = t.shading.thicknessFactor ?? 0;
502
493
  let i = t.shading.attenuationDistance;
503
- return r && i === 0 ? console.warn("invalid attenuation configuration for transmissive material -- Skipping attenuation color and distance configuration in material.") : (z(e.attenuationColor, t.shading.attenuationColor), i != null && (e.attenuationDistance = i)), e.side = n || t.shading.doubleSided ? 2 : 0, e;
504
- }, ze = () => E.createMeshPhysicalMaterial({}), Be = (e, t = 1) => t === 2 ? He(e) : Ve(e), Ve = (e) => {
494
+ return r && i === 0 ? console.warn("invalid attenuation configuration for transmissive material -- Skipping attenuation color and distance configuration in material.") : (L(e.attenuationColor, t.shading.attenuationColor), i != null && (e.attenuationDistance = i)), e.side = n || t.shading.doubleSided ? 2 : 0, e;
495
+ }, Le = () => w.createMeshPhysicalMaterial({}), Re = (e, t = 1) => t === 2 ? Be(e) : ze(e), ze = (e) => {
505
496
  let t = {
506
497
  alpha: e.opacity,
507
498
  metallic: e.reflectivity,
508
- basecolor: B(e.color),
499
+ basecolor: R(e.color),
509
500
  roughness: e.roughness,
510
501
  doubleSided: e.side === 2,
511
502
  alphaCutoff: e.alphaTest,
512
503
  transmission: e.transmission
513
504
  };
514
505
  return e.metalness === 1 ? t.metallic = 1 : t.metallic = e.reflectivity, t;
515
- }, He = (e) => ({
506
+ }, Be = (e) => ({
516
507
  version: "2.0.0",
517
508
  alpha: e.opacity,
518
509
  alphaCutoff: e.alphaTest,
519
- basecolor: B(e.color),
510
+ basecolor: R(e.color),
520
511
  transmission: e.transmission,
521
512
  transmissionIOR: e.ior,
522
513
  metallic: e.metalness,
523
514
  doubleSided: e.side === 2,
524
- specularColor: B(e.specularColor),
515
+ specularColor: R(e.specularColor),
525
516
  specularity: e.specularIntensity,
526
517
  roughness: e.roughness,
527
518
  occlusion: e.aoMapIntensity,
528
- emissiveColor: B(e.emissive),
519
+ emissiveColor: R(e.emissive),
529
520
  emissiveIntensity: e.emissiveIntensity,
530
521
  clearcoatIntensity: e.clearcoat,
531
522
  clearcoatRoughness: e.clearcoatRoughness,
532
523
  clearcoatNormalScale: e.clearcoatNormalScale.x,
533
- sheenColor: B(e.sheenColor),
524
+ sheenColor: R(e.sheenColor),
534
525
  sheenIntensity: e.sheen,
535
526
  sheenRoughness: e.sheenRoughness,
536
527
  thicknessFactor: e.thickness,
537
- attenuationColor: B(e.attenuationColor),
528
+ attenuationColor: R(e.attenuationColor),
538
529
  attenuationDistance: e.attenuationDistance
539
- }), z = (e, t) => {
530
+ }), L = (e, t) => {
540
531
  if (t !== void 0) {
541
- let n = new h(t.r, t.g, t.b);
532
+ let n = new p(t.r, t.g, t.b);
542
533
  e.copy(n.convertSRGBToLinear());
543
534
  }
544
- }, B = (e) => {
535
+ }, R = (e) => {
545
536
  let t = e.clone().convertLinearToSRGB();
546
537
  return {
547
538
  r: t.r,
548
539
  g: t.g,
549
540
  b: t.b
550
541
  };
551
- }, V = null, Ue = (e, t, n, r, i, a, o = 16) => {
552
- V || (V = new p(), V.crossOrigin = "");
553
- let s = V;
542
+ }, z = null, Ve = (e, t, n, r, i, a, o = 16) => {
543
+ z || (z = new d(), z.crossOrigin = "");
544
+ let s = z;
554
545
  return new Promise((c, l) => {
555
546
  if (!e) {
556
547
  console.warn("trying to add a texture without image", t), c();
557
548
  return;
558
549
  }
559
550
  s.load(e, (e) => {
560
- H(e, t, n, r, i, a, o), c();
551
+ B(e, t, n, r, i, a, o), c();
561
552
  }, (e) => {
562
553
  l(e);
563
554
  });
564
555
  });
565
- }, H = (e, t, n, r, i, o, s = 16) => {
566
- if (e.anisotropy = r, e.wrapS = a, e.wrapT = a, s <= 8 && [
567
- v.ORM,
568
- v.EMRGB,
569
- v.CCRG,
570
- v.CCXYZ,
571
- v.SHRGBA,
572
- v.SPRGBA,
573
- v.TTRG
556
+ }, B = (e, t, n, r, a, o, s = 16) => {
557
+ if (e.anisotropy = r, e.wrapS = i, e.wrapT = i, s <= 8 && [
558
+ g.ORM,
559
+ g.EMRGB,
560
+ g.CCRG,
561
+ g.CCXYZ,
562
+ g.SHRGBA,
563
+ g.SPRGBA,
564
+ g.TTRG
574
565
  ].includes(t.mapping)) {
575
566
  console.warn("ORM maps are not supported on devices with only " + s + " texture units");
576
567
  return;
577
568
  }
578
- e.repeat.set(i, o), We(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;
579
- }, We = (t, n, r) => {
580
- n.mapping === v.XYZ ? (r.normalMap = t, r.map === L() && (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);
581
- }, Ge = (e = !0) => {
569
+ e.repeat.set(a, o), He(e, t, n), t.mapping === g.RGBA && (n.transparent = !0, n.userData.materialVersion === 1 && n.name.includes("glow") && (n.emissiveIntensity = .5, n.emissive = new p(16777215), n.emissiveMap = n.map)), n.needsUpdate = !0;
570
+ }, He = (t, n, r) => {
571
+ n.mapping === g.XYZ ? r.normalMap = t : n.mapping === g.ORM ? (r.aoMap = t, r.roughnessMap = t, r.metalnessMap = t) : n.mapping === g.EMRGB ? r.emissiveMap = t : n.mapping === g.CCRG ? (r.clearcoatMap = t, r.clearcoatRoughnessMap = t) : n.mapping === g.CCXYZ ? r.clearcoatNormalMap = t : n.mapping === g.SHRGBA ? (r.sheenColorMap = t, r.sheenRoughnessMap = t) : n.mapping === g.SPRGBA ? (r.specularColorMap = t, r.specularIntensityMap = t) : n.mapping === g.TTRG ? (r.transmissionMap = t, r.thicknessMap = t) : (t.colorSpace = e, r.map = t);
572
+ }, Ue = (e = !0) => {
582
573
  if (!window.__RML_WEBGL_GUI__) {
583
- if (!F) return null;
574
+ if (!N) return null;
584
575
  try {
585
- window.__RML_WEBGL_GUI__ = new F({ autoPlace: e });
576
+ window.__RML_WEBGL_GUI__ = new N({ autoPlace: e });
586
577
  } catch {
587
578
  return null;
588
579
  }
589
580
  }
590
581
  return window.__RML_WEBGL_GUI__ ?? null;
591
- }, U = (e, t, n) => {
582
+ }, V = (e, t, n) => {
592
583
  let r;
593
- if (t.wallType.value === b.OuterWallRight && (r = _(t.rightNormal)), t.wallType.value === b.OuterWallLeft && (r = _(t.leftNormal)), !r) return !0;
594
- let i = _(n).applyMatrix4(e.matrixWorldInverse);
584
+ if (t.wallType.value === v.OuterWallRight && (r = h(t.rightNormal)), t.wallType.value === v.OuterWallLeft && (r = h(t.leftNormal)), !r) return !0;
585
+ let i = h(n).applyMatrix4(e.matrixWorldInverse);
595
586
  return r = r.transformDirection(e.matrixWorldInverse), i.dot(r) >= 0;
596
- }, W = (e) => {
587
+ }, H = (e) => {
597
588
  let t = e?.getPlanElement();
598
589
  return !t || !("getAttachedWall" in t) ? null : t.getAttachedWall();
599
- }, G = (e, t) => !e || !t ? !1 : typeof e.getId == "function" && typeof t.getId == "function" ? e.getId() === t.getId() : e === t, Ke = (e, t, n = [], r = null) => {
600
- let i = !1, a = W(r);
590
+ }, U = (e, t) => !e || !t ? !1 : typeof e.getId == "function" && typeof t.getId == "function" ? e.getId() === t.getId() : e === t, We = (e, t, n = [], r = null, i = !1) => {
591
+ let a = !1, o = H(r);
601
592
  for (let n of t) {
602
- let t = !(G(n.getPlanElement(), a) || U(e, n.getKernelObject(), n.getPlanElement().getCenter()));
603
- t !== n.isHiddenByCameraFacing() && (i = !0), n.setHiddenByCameraFacing(t);
593
+ let t = !(U(n.getPlanElement(), o) || V(e, n.getKernelObject(), n.getPlanElement().getCenter()));
594
+ t !== n.isHiddenByCameraFacing() && (a = !0), n.setHiddenByCameraFacing(t);
604
595
  }
605
596
  for (let t of n) {
606
- let n = t.getPlanElement(), r = W(t);
597
+ let n = t.getPlanElement(), r = H(t);
607
598
  if (!n || !r) continue;
608
- let o = n.getObjectCategory?.().value;
609
- if (o !== x.DOOR && o !== x.WINDOW) continue;
610
- let s = G(r, a) || U(e, r, r.getCenter()), c = t.getContainer().visible;
611
- t.setHiddenByCameraFacing(!s), c !== t.getContainer().visible && (i = !0);
599
+ let s = n.getObjectCategory?.().value;
600
+ if (s !== y.DOOR && s !== y.WINDOW) continue;
601
+ let c = U(r, o) || V(e, r, r.getCenter()), l = t.getContainer().visible;
602
+ t.setHiddenByCameraFacing(!c && !i), l !== t.getContainer().visible && (a = !0);
612
603
  }
613
- return i;
614
- }, qe = (e, t, n = !0) => {
604
+ return a;
605
+ }, Ge = (e, t, n = !0) => {
615
606
  if (!e.userData.tween) if (t) if (e.transparent = !0, !n) e.opacity = .2;
616
607
  else {
617
608
  let t = { opacity: 1 };
618
609
  e.userData.tween = !0;
619
- let n = new N(t).to({ opacity: .2 }, 400).easing(D.Sinusoidal.In).onUpdate(() => {
610
+ let n = new j(t).to({ opacity: .2 }, 400).easing(T.Sinusoidal.In).onUpdate(() => {
620
611
  e.opacity = t.opacity;
621
612
  }).onComplete(() => {
622
613
  e.userData.tween = !1, window.TWEEN?.remove(n);
@@ -627,80 +618,80 @@ var ve = .4, ye = "#DDDDDD", be = .4, xe = "#7B7B7B", Se = "#B1B1B1", Ce = "came
627
618
  else {
628
619
  let t = { opacity: .2 };
629
620
  e.userData.tween = !0;
630
- let n = new N(t).to({ opacity: 1 }, 400).easing(D.Sinusoidal.In).onUpdate(() => {
621
+ let n = new j(t).to({ opacity: 1 }, 400).easing(T.Sinusoidal.In).onUpdate(() => {
631
622
  e.opacity = t.opacity;
632
623
  }).onComplete(() => {
633
624
  e.transparent = !1, e.userData.tween = !1, window.TWEEN?.remove(n);
634
625
  }).start();
635
626
  window.TWEEN?.add(n);
636
627
  }
637
- }, Je = (e, t, n, r, i, a) => {
638
- let o = Ye(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(() => {
639
- let n = Xe(l, u, d.t);
640
- q(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
628
+ }, Ke = (e, t, n, r, i, a) => {
629
+ let o = qe(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 j(d).to({ t: 1 }, 400).easing(T.Quadratic.InOut).onUpdate(() => {
630
+ let n = Je(l, u, d.t);
631
+ G(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
641
632
  }).onComplete(() => {
642
- q(e, s), a && a(), window.TWEEN?.remove(f);
633
+ G(e, s), a && a(), window.TWEEN?.remove(f);
643
634
  }).onStop(() => {
644
635
  window.TWEEN?.remove(f);
645
636
  }).start();
646
637
  return window.TWEEN?.add(f), f;
647
- }, Ye = (e, n) => {
648
- let r = e.clone().invert().clone().multiply(n), a = new t(), o = new i();
649
- r.decompose(a, o, new t());
650
- let s = K(o), c = s.axis;
651
- if (a.length() < .001 || Math.abs(s.angleRad) < .001 || c.length() < .001) return new m().identity();
652
- let l = new t().setFromMatrixPosition(e), u = new t().setFromMatrixPosition(n), d = l.clone().sub(u), f = d.length(), p = new t().crossVectors(c, d).normalize();
653
- d = new t().crossVectors(p, c).normalize();
638
+ }, qe = (e, n) => {
639
+ let i = e.clone().invert().clone().multiply(n), a = new t(), o = new r();
640
+ i.decompose(a, o, new t());
641
+ let s = W(o), c = s.axis;
642
+ if (a.length() < .001 || Math.abs(s.angleRad) < .001 || c.length() < .001) return new f().identity();
643
+ let l = new t().setFromMatrixPosition(e), u = new t().setFromMatrixPosition(n), d = l.clone().sub(u), p = d.length(), m = new t().crossVectors(c, d).normalize();
644
+ d = new t().crossVectors(m, c).normalize();
654
645
  let h = l.clone().add(u).multiplyScalar(.5);
655
- return h = h.sub(p.clone().multiplyScalar(f * .5 / Math.tan(s.angleRad * .5))), new m().makeBasis(p, c, d).setPosition(h);
656
- }, K = (e) => {
646
+ return h = h.sub(m.clone().multiplyScalar(p * .5 / Math.tan(s.angleRad * .5))), new f().makeBasis(m, c, d).setPosition(h);
647
+ }, W = (e) => {
657
648
  let n = Math.sqrt(1 - e.w * e.w);
658
649
  return {
659
650
  axis: new t(e.x, e.y, e.z).multiplyScalar(n === 0 ? 1 : 1 / n),
660
651
  angleRad: 2 * Math.acos(e.w)
661
652
  };
662
- }, q = (e, t) => {
653
+ }, G = (e, t) => {
663
654
  e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
664
- }, Xe = (e, n, r) => {
665
- let a = new t(), o = new i(), s = new t();
655
+ }, Je = (e, n, i) => {
656
+ let a = new t(), o = new r(), s = new t();
666
657
  e.decompose(a, o, s);
667
- let c = new t(), l = new i(), u = new t();
658
+ let c = new t(), l = new r(), u = new t();
668
659
  n.decompose(c, l, u);
669
- let d = new t().lerpVectors(a, c, r), f = new i().slerpQuaternions(o, l, r), p = K(o.clone().conjugate().multiply(l));
670
- if (p.angleRad > Math.PI && (p.angleRad -= 2 * Math.PI), Math.abs(p.angleRad) > S(1) && a.length() > .001 && c.length() > .001) {
660
+ let d = new t().lerpVectors(a, c, i), p = new r().slerpQuaternions(o, l, i), m = W(o.clone().conjugate().multiply(l));
661
+ if (m.angleRad > Math.PI && (m.angleRad -= 2 * Math.PI), Math.abs(m.angleRad) > b(1) && a.length() > .001 && c.length() > .001) {
671
662
  let e = a.clone().normalize().dot(c.clone().normalize());
672
663
  if (Math.abs(e) < .999) {
673
- let n = new t().crossVectors(a, c), o = new i().setFromAxisAngle(n.normalize(), Math.acos(e) * r), s = a.length() * r + c.length() * (1 - r);
664
+ let n = new t().crossVectors(a, c), o = new r().setFromAxisAngle(n.normalize(), Math.acos(e) * i), s = a.length() * i + c.length() * (1 - i);
674
665
  d = a.applyQuaternion(o).normalize().multiplyScalar(s);
675
666
  }
676
667
  }
677
- let h = new t().lerpVectors(s, u, r), g = new m();
678
- return g.compose(d, f, h), g;
679
- }, Ze = (e) => {
680
- let t = new h();
668
+ let h = new t().lerpVectors(s, u, i), g = new f();
669
+ return g.compose(d, p, h), g;
670
+ }, Ye = (e) => {
671
+ let t = new p();
681
672
  return t.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), t;
682
- }, J = (e, t) => {
673
+ }, K = (e, t) => {
683
674
  t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
684
- }, Qe = (e, t) => new Promise((n) => {
675
+ }, Xe = (e, t) => new Promise((n) => {
685
676
  e.traverse((e) => {
686
- if (e instanceof c) {
677
+ if (e instanceof o) {
687
678
  let r = e.material;
688
679
  e.userData.tween && e.userData.tween.stop();
689
680
  let i = { opacity: r.opacity };
690
681
  t.transparent && (r.transparent = t.transparent);
691
- let a = new N(i);
692
- a.toJSON = () => void 0, e.userData.tween = a, window.TWEEN?.add(a.to(t, 250).easing(D.Linear.None).onUpdate(() => {
682
+ let a = new j(i);
683
+ a.toJSON = () => void 0, e.userData.tween = a, window.TWEEN?.add(a.to(t, 250).easing(T.Linear.None).onUpdate(() => {
693
684
  r.opacity = i.opacity;
694
685
  }).onStop(() => {
695
- J(r, t), e.userData.tween = void 0;
686
+ K(r, t), e.userData.tween = void 0;
696
687
  }).onComplete(() => {
697
- J(r, t), e.userData.tween = void 0, window.TWEEN?.remove(a), n();
688
+ K(r, t), e.userData.tween = void 0, window.TWEEN?.remove(a), n();
698
689
  }).start());
699
690
  }
700
691
  });
701
- }), $e = (e) => {
692
+ }), Ze = (e) => {
702
693
  e.traverse((e) => {
703
- if (e instanceof c) {
694
+ if (e instanceof o) {
704
695
  let t = e.material;
705
696
  if (t.opacity === 0) return;
706
697
  let n = {
@@ -711,7 +702,7 @@ var ve = .4, ye = "#DDDDDD", be = .4, xe = "#7B7B7B", Se = "#B1B1B1", Ce = "came
711
702
  transparent: t.transparent
712
703
  };
713
704
  t.transparent = n.transparent, t.opacity = n.opacity;
714
- let i = new N(n).to(r, 500).easing(D.Linear.None).onUpdate(() => {
705
+ let i = new j(n).to(r, 500).easing(T.Linear.None).onUpdate(() => {
715
706
  t.opacity = n.opacity;
716
707
  }).onComplete(() => {
717
708
  t.transparent = r.transparent, window.TWEEN?.remove(i);
@@ -719,101 +710,101 @@ var ve = .4, ye = "#DDDDDD", be = .4, xe = "#7B7B7B", Se = "#B1B1B1", Ce = "came
719
710
  window.TWEEN?.add(i);
720
711
  }
721
712
  });
722
- }, et = (e, n) => {
723
- let r = new u().setFromObject(e), i = r.getSize(new t()), a = Math.min(i.x, i.y, i.z), o = !0;
713
+ }, Qe = (e, n) => {
714
+ let r = new c().setFromObject(e), i = r.getSize(new t()), a = Math.min(i.x, i.y, i.z), o = !0;
724
715
  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;
725
- }, tt = (e) => {
726
- e.type === "Mesh" ? X(e) : Y(e);
727
- }, Y = (e) => {
716
+ }, $e = (e) => {
717
+ e.type === "Mesh" ? J(e) : q(e);
718
+ }, q = (e) => {
728
719
  !e || !e.children || e.children.length === 0 || e.children.forEach((e) => {
729
- X(e);
720
+ J(e);
730
721
  });
731
- }, X = (e) => {
722
+ }, J = (e) => {
732
723
  if (e) {
733
724
  try {
734
- e.material && Q(e.material);
725
+ e.material && X(e.material);
735
726
  } catch (e) {
736
727
  console.warn("disposeMesh: material dispose failed", e);
737
728
  }
738
729
  try {
739
- e.geometry && Z(e.geometry);
730
+ e.geometry && Y(e.geometry);
740
731
  } catch (e) {
741
732
  console.warn("disposeMesh: geometry dispose failed", e);
742
733
  }
743
734
  try {
744
- e.children && e.children.length > 0 && Y(e);
735
+ e.children && e.children.length > 0 && q(e);
745
736
  } catch (e) {
746
737
  console.warn("disposeMesh: child dispose failed", e);
747
738
  }
748
739
  }
749
- }, Z = (e) => {
740
+ }, Y = (e) => {
750
741
  e && e.dispose();
751
- }, Q = (e) => {
742
+ }, X = (e) => {
752
743
  e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
753
- }, $, nt = () => ($ || ($ = new f(), $.visible = !1), $), rt, it = (e) => (rt ||= E.createMeshStandardMaterial({
744
+ }, Z, et = () => (Z || (Z = new u(), Z.visible = !1), Z), Q, tt = (e) => (Q ||= w.createMeshStandardMaterial({
754
745
  color: e || "#FF0000",
755
746
  transparent: !0,
756
747
  opacity: .5,
757
748
  visible: !0,
758
749
  polygonOffset: !0,
759
750
  polygonOffsetFactor: -1
760
- }), rt), at = (e) => e.x === 0 && e.y === 0 && e.z === 0, ot = (e) => Number.isFinite(e.x) && Number.isFinite(e.y) && Number.isFinite(e.z), st = (e, t) => {
751
+ }), Q), nt = (e) => e.x === 0 && e.y === 0 && e.z === 0, rt = (e) => Number.isFinite(e.x) && Number.isFinite(e.y) && Number.isFinite(e.z), it = (e, t) => {
761
752
  let n = "";
762
- 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);
763
- }, ct = (e) => {
753
+ 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 === C.WALL ? n = "default_wall_material_" + e.getSourceType().value : t && t.value === C.CEILING && (n = "default_ceiling_material_" + e.getSourceType().value), n);
754
+ }, $ = (e) => {
764
755
  let n = e.getWorldDirection(new t()).clone();
765
756
  n.y = 0, n.lengthSq() < .01 && (n = new t(0, 1, 0), n.applyQuaternion(e.quaternion), n.y = 0), n.normalize();
766
757
  let r = Math.asin(n.x);
767
758
  return n.z < 0 && (r = Math.PI - r), r < 0 && (r += Math.PI * 2), r;
768
- }, lt = (e, t) => {
759
+ }, at = (e, t) => {
769
760
  if (!e || !t) return 0;
770
761
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
771
- return r && n || !r && !n ? 0 : n === !0 ? 1 : -1;
772
- }, ut = (e, t) => {
762
+ return r && n || !r && !n ? 0 : n ? 1 : -1;
763
+ }, ot = (e, t) => {
773
764
  if (!e || !t) return 0;
774
765
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
775
766
  if (r && n) return 0;
776
767
  if (!r && !n) {
777
- let n = dt(e, t);
768
+ let n = st(e, t);
778
769
  return n === .5 ? 0 : n > .5 ? -1 : 1;
779
770
  }
780
- return n === !0 ? 1 : -1;
781
- }, dt = (e, n) => {
782
- let r = new u();
771
+ return n ? 1 : -1;
772
+ }, st = (e, n) => {
773
+ let r = new c();
783
774
  if (r.copy(e).intersect(n), r.isEmpty()) return 0;
784
775
  let i = (e) => {
785
776
  let n = new t();
786
777
  return e.getSize(n), n.x * n.y * n.z;
787
778
  }, a = i(e), o = i(r);
788
779
  return a === 0 ? 0 : o / a;
789
- }, ft = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, pt = (e, n, r, i = 1) => {
790
- 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;
791
- 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));
792
- }, mt = (e) => {
780
+ }, ct = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, lt = (e, n, r, i = 1) => {
781
+ let a = n > r, o = a ? 15 : 0, s = a ? 0 : 10, l = e.getSize(new t()), u = e.getCenter(new t()), d = l.x > 2 * o ? l.x / 2 : o, f = l.z > 2 * s ? l.z / 2 : s;
782
+ return d *= i, f *= i, new c(new t(u.x - d, u.y, u.z - f), new t(u.x + d, u.y, u.z + f));
783
+ }, ut = (e) => {
793
784
  let { x: t, y: n } = e;
794
785
  return {
795
786
  x: t,
796
787
  y: n
797
788
  };
798
- }, ht = (e) => {
789
+ }, dt = (e) => {
799
790
  let { x: t, y: n, z: r } = e;
800
791
  return {
801
792
  x: t,
802
793
  y: n,
803
794
  z: r
804
795
  };
805
- }, gt = (e, n, r) => new t().setFromSphericalCoords(e, Math.PI * (1 - r), Math.PI * 2 * (1 - n)), _t = (e) => {
806
- let t = new r();
796
+ }, ft = (e) => {
797
+ let t = new n();
807
798
  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;
808
- }, vt = (e, n) => {
809
- let r = new l(), i = new m().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse);
799
+ }, pt = (e, n) => {
800
+ let r = new s(), i = new f().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse);
810
801
  r.setFromProjectionMatrix(i);
811
802
  let a = n.getCenter(new t());
812
803
  return r.containsPoint(a);
813
- }, yt = (e) => {
804
+ }, mt = (e) => {
814
805
  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 ");
815
806
  };
816
807
  //#endregion
817
- export { gt as $, ke as A, Me as B, nt as C, ie as Ct, pt as D, it as E, b as Et, ct as F, R as G, Fe as H, Ke as I, mt as J, q as K, vt as L, Oe as M, Ae as N, st as O, Ge as P, at as Q, ft as R, $e as S, ae as St, Ze as T, ne as Tt, Ne as U, yt as V, Pe as W, Qe as X, ht as Y, ot as Z, tt as _, oe as _t, be as a, ge as at, X as b, x as bt, ve as c, me as ct, Ue as d, ue as dt, D as et, Je as f, le as ft, Ie as g, ce as gt, _t as h, S as ht, Ee as i, _e as it, De as j, Be as k, ye as l, fe as lt, lt as m, C as mt, we as n, N as nt, xe as o, he as ot, et as p, pe as pt, qe as q, Te as r, E as rt, Se as s, T as st, Ce as t, k as tt, H as u, de as ut, Z as v, re as vt, ut as w, ee as wt, Y as x, te as xt, Q as y, se as yt, je as z };
808
+ export { T as $, De as A, Ae as B, et as C, ee as Ct, lt as D, tt as E, $ as F, I as G, Ne as H, We as I, ut as J, G as K, pt as L, Ee as M, Oe as N, it as O, Ue as P, nt as Q, ct as R, Ze as S, ie as St, Ye as T, v as Tt, je as U, mt as V, Me as W, Xe as X, dt as Y, rt as Z, $e as _, re as _t, F as a, he as at, J as b, te as bt, ve as c, fe as ct, Ve as d, le as dt, D as et, Ke as f, pe as ft, Pe as g, oe as gt, ft as h, ce as ht, we as i, ge as it, Te as j, Re as k, P as l, de as lt, at as m, b as mt, Se as n, w as nt, ye as o, C as ot, Qe as p, x as pt, Ge as q, Ce as r, _e as rt, be as s, me as st, xe as t, j as tt, B as u, ue as ut, Y as v, se as vt, ot as w, ne as wt, q as x, ae as xt, X as y, y as yt, ke as z };
818
809
 
819
- //# sourceMappingURL=threejs-utils-WK7Uu2TS.mjs.map
810
+ //# sourceMappingURL=threejs-utils-v1uOvccg.mjs.map