@roomle/web-sdk 4.3.0-alpha.1 → 4.3.0-alpha.3

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 (59) hide show
  1. package/lib/ConfiguratorKernel.wasm +0 -0
  2. package/lib/RoomleCore.js +3 -3
  3. package/lib/RoomleCore.wasm +0 -0
  4. package/lib/RoomleToolsCore.wasm +0 -0
  5. package/lib/{api-C0UElaCW.mjs → api-1PNZF4e6.mjs} +2 -2
  6. package/lib/{api-C0UElaCW.mjs.map → api-1PNZF4e6.mjs.map} +1 -1
  7. package/lib/asset-loader.worker-eqHzNAwa.mjs.map +1 -1
  8. package/lib/banana-for-scale-DGYmxeBG.mjs.map +1 -1
  9. package/lib/budgeteer.sw-BUMElkO1.mjs.map +1 -1
  10. package/lib/{component-dimensioning--4sX2AgY.mjs → component-dimensioning-BXN285kw.mjs} +2 -2
  11. package/lib/{component-dimensioning--4sX2AgY.mjs.map → component-dimensioning-BXN285kw.mjs.map} +1 -1
  12. package/lib/{component-raycast-helper-CskJedpv.mjs → component-raycast-helper-CADFRMLS.mjs} +2 -2
  13. package/lib/{component-raycast-helper-CskJedpv.mjs.map → component-raycast-helper-CADFRMLS.mjs.map} +1 -1
  14. package/lib/configurator-5BzSqk39.mjs +2 -0
  15. package/lib/{configurator-vxRFxJ-B.mjs → configurator-BMXr72V6.mjs} +4 -4
  16. package/lib/{configurator-vxRFxJ-B.mjs.map → configurator-BMXr72V6.mjs.map} +1 -1
  17. package/lib/glb-viewer-B3hqfiM6.mjs +2 -0
  18. package/lib/{glb-viewer-B-r0E1aa.mjs → glb-viewer-CFMOHQk3.mjs} +4 -4
  19. package/lib/{glb-viewer-B-r0E1aa.mjs.map → glb-viewer-CFMOHQk3.mjs.map} +1 -1
  20. package/lib/{highlight-coordinator-CR5rcFh_.mjs → highlight-coordinator-RCfVwPHC.mjs} +2 -2
  21. package/lib/{highlight-coordinator-CR5rcFh_.mjs.map → highlight-coordinator-RCfVwPHC.mjs.map} +1 -1
  22. package/lib/{homag-intelligence-DHTCBB64.mjs → homag-intelligence-BcNm3Zg8.mjs} +3 -3
  23. package/lib/{homag-intelligence-DHTCBB64.mjs.map → homag-intelligence-BcNm3Zg8.mjs.map} +1 -1
  24. package/lib/{material-viewer-ZlNDhA8D.mjs → material-viewer-DlLHNvj_.mjs} +4 -4
  25. package/lib/{material-viewer-ZlNDhA8D.mjs.map → material-viewer-DlLHNvj_.mjs.map} +1 -1
  26. package/lib/{packages-C9J0u-cc.mjs → packages-BKnJk02a.mjs} +5 -5
  27. package/lib/{packages-C9J0u-cc.mjs.map → packages-BKnJk02a.mjs.map} +1 -1
  28. package/lib/{planner-ClY-VUWt.mjs → planner-BLcwLi9h.mjs} +3 -3
  29. package/lib/{planner-ClY-VUWt.mjs.map → planner-BLcwLi9h.mjs.map} +1 -1
  30. package/lib/planner-CgL9JfFb.mjs +2 -0
  31. package/lib/roomle-headless.d.ts +42 -11
  32. package/lib/roomle-headless.js +8 -8
  33. package/lib/{roomle-sdk-BpCPIwDm.mjs → roomle-sdk-DdQjEWNK.mjs} +2628 -2627
  34. package/lib/{roomle-sdk-BpCPIwDm.mjs.map → roomle-sdk-DdQjEWNK.mjs.map} +1 -1
  35. package/lib/roomle-sdk.d.ts +42 -11
  36. package/lib/roomle-sdk.js +7 -7
  37. package/lib/{scene-renderer-CLkhNnnv.mjs → scene-renderer-CSBoi_8w.mjs} +2 -2
  38. package/lib/{scene-renderer-CLkhNnnv.mjs.map → scene-renderer-CSBoi_8w.mjs.map} +1 -1
  39. package/lib/{script-loader-9GrUxzSB.mjs → script-loader-Binkn2lL.mjs} +2 -2
  40. package/lib/{script-loader-9GrUxzSB.mjs.map → script-loader-Binkn2lL.mjs.map} +1 -1
  41. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  42. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +35 -8
  43. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js +6 -1
  44. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
  45. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  46. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +3 -3
  47. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  48. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  49. package/lib/{stats-helper-D9l8soWd.mjs → stats-helper-P4jYV8as.mjs} +2 -2
  50. package/lib/{stats-helper-D9l8soWd.mjs.map → stats-helper-P4jYV8as.mjs.map} +1 -1
  51. package/lib/{threejs-utils-CKV1QNU9.mjs → threejs-utils-DKJ0uer7.mjs} +89 -86
  52. package/lib/threejs-utils-DKJ0uer7.mjs.map +1 -0
  53. package/lib/{tools-core-CKaB3WsP.mjs → tools-core-C8T-y6HX.mjs} +3 -3
  54. package/lib/{tools-core-CKaB3WsP.mjs.map → tools-core-C8T-y6HX.mjs.map} +1 -1
  55. package/package.json +2 -2
  56. package/lib/configurator-CjFo24FH.mjs +0 -2
  57. package/lib/glb-viewer-BnJkmakv.mjs +0 -2
  58. package/lib/planner-C-5Mg-Lv.mjs +0 -2
  59. package/lib/threejs-utils-CKV1QNU9.mjs.map +0 -1
@@ -27,19 +27,22 @@ var ee = {
27
27
  DEFAULT: 0,
28
28
  DOCKING: 1,
29
29
  COLLISION: 2
30
+ }, ae = {
31
+ FLOOR: 0,
32
+ ELEVATION: 1
30
33
  }, b = /* @__PURE__ */ function(e) {
31
34
  return e[e.StandAloneWall = 0] = "StandAloneWall", e[e.OuterWallLeft = 1] = "OuterWallLeft", e[e.OuterWallRight = 2] = "OuterWallRight", e[e.InnerWall = 3] = "InnerWall", e;
32
- }({}), ae = {
35
+ }({}), oe = {
33
36
  DEFAULT: 0,
34
37
  TERRAIN: 1
35
- }, oe = {
38
+ }, se = {
36
39
  DEFAULT: 0,
37
40
  CONSTRUCTION: 1
38
- }, se = {
41
+ }, ce = {
39
42
  WALL: 0,
40
43
  EDGE: 1,
41
44
  CONSTRUCTION: 2
42
- }, ce = {
45
+ }, le = {
43
46
  OBJECT: 0,
44
47
  DOOR: 1,
45
48
  WINDOW: 2,
@@ -49,13 +52,13 @@ var ee = {
49
52
  return Math.PI / 180 * e;
50
53
  }, S = function(e) {
51
54
  return 180 / Math.PI * e;
52
- }, le = function(e) {
55
+ }, ue = function(e) {
53
56
  return e >= 0 ? -180 + (e + 180) % 360 : 180 - (-e + 180) % 360;
54
- }, ue = function(e, t, n, r, i, a) {
57
+ }, C = function(e, t, n, r, i, a) {
55
58
  e = Math.sqrt(e * e + n * n);
56
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));
57
60
  return Math.max(l, u);
58
- }, C = function(e) {
61
+ }, w = function(e) {
59
62
  return Math.round(e * 1e3) / 1e3;
60
63
  }, de = function(e, t) {
61
64
  return Math.abs(e.y - t.y) + Math.abs(e.x - t.x);
@@ -64,7 +67,7 @@ var ee = {
64
67
  }, pe = function(e) {
65
68
  let t = S(e);
66
69
  return t < 0 && (t = 180 + (180 + t)), t;
67
- }, w = /* @__PURE__ */ function(e) {
70
+ }, T = /* @__PURE__ */ function(e) {
68
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;
69
72
  }({}), me = {
70
73
  LEFT: 0,
@@ -78,14 +81,14 @@ var ee = {
78
81
  WALL: 0,
79
82
  ROOM_CONTOUR: 1,
80
83
  CONTOUR: 2
81
- }, T = class {
84
+ }, E = class {
82
85
  static createMeshPhysicalMaterial(e) {
83
86
  return new d(e);
84
87
  }
85
88
  static createMeshStandardMaterial(e) {
86
89
  return new s(e);
87
90
  }
88
- }, E = Object.freeze({
91
+ }, D = Object.freeze({
89
92
  Linear: Object.freeze({
90
93
  None: function(e) {
91
94
  return e;
@@ -204,13 +207,13 @@ var ee = {
204
207
  }),
205
208
  Bounce: Object.freeze({
206
209
  In: function(e) {
207
- return 1 - E.Bounce.Out(1 - e);
210
+ return 1 - D.Bounce.Out(1 - e);
208
211
  },
209
212
  Out: function(e) {
210
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;
211
214
  },
212
215
  InOut: function(e) {
213
- 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;
214
217
  }
215
218
  }),
216
219
  generatePow: function(e) {
@@ -226,9 +229,9 @@ var ee = {
226
229
  }
227
230
  };
228
231
  }
229
- }), D = function() {
232
+ }), O = function() {
230
233
  return performance.now();
231
- }, O = function() {
234
+ }, k = function() {
232
235
  function e() {
233
236
  var e = [...arguments];
234
237
  this._tweens = {}, this._tweensAddedDuringUpdate = {}, this.add.apply(this, e);
@@ -256,7 +259,7 @@ var ee = {
256
259
  return !e.isPlaying();
257
260
  });
258
261
  }, e.prototype.update = function(e, t) {
259
- e === void 0 && (e = D()), t === void 0 && (t = !0);
262
+ e === void 0 && (e = O()), t === void 0 && (t = !0);
260
263
  var n = Object.keys(this._tweens);
261
264
  if (n.length !== 0) for (; n.length > 0;) {
262
265
  this._tweensAddedDuringUpdate = {};
@@ -267,17 +270,17 @@ var ee = {
267
270
  n = Object.keys(this._tweensAddedDuringUpdate);
268
271
  }
269
272
  }, e;
270
- }(), k = {
273
+ }(), A = {
271
274
  Linear: function(e, t) {
272
- 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;
273
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);
274
277
  },
275
278
  Bezier: function(e, t) {
276
- 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);
277
280
  return n;
278
281
  },
279
282
  CatmullRom: function(e, t) {
280
- 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;
281
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);
282
285
  },
283
286
  Utils: {
@@ -285,7 +288,7 @@ var ee = {
285
288
  return (t - e) * n + e;
286
289
  },
287
290
  Bernstein: function(e, t) {
288
- var n = k.Utils.Factorial;
291
+ var n = A.Utils.Factorial;
289
292
  return n(e) / n(t) / n(e - t);
290
293
  },
291
294
  Factorial: (function() {
@@ -302,14 +305,14 @@ var ee = {
302
305
  return (2 * t - 2 * n + a + o) * c + (-3 * t + 3 * n - 2 * a - o) * s + a * i + t;
303
306
  }
304
307
  }
305
- }, A = function() {
308
+ }, j = function() {
306
309
  function e() {}
307
310
  return e.nextId = function() {
308
311
  return e._nextId++;
309
312
  }, e._nextId = 0, e;
310
- }(), j = new O(), M = function() {
313
+ }(), M = new k(), N = function() {
311
314
  function e(e, t) {
312
- 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));
313
316
  }
314
317
  return e.prototype.getId = function() {
315
318
  return this._id;
@@ -327,7 +330,7 @@ var ee = {
327
330
  }, e.prototype.dynamic = function(e) {
328
331
  return e === void 0 && (e = !1), this._isDynamic = e, this;
329
332
  }, e.prototype.start = function(e, t) {
330
- 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;
331
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];
332
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) {
333
336
  if (this._propertiesAreSetUp = !0, !this._isDynamic) {
@@ -377,9 +380,9 @@ var ee = {
377
380
  }, e.prototype.end = function() {
378
381
  return this._goToEnd = !0, this.update(this._startTime + this._duration), this;
379
382
  }, e.prototype.pause = function(e) {
380
- 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);
381
384
  }, e.prototype.resume = function(e) {
382
- 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);
383
386
  }, e.prototype.stopChainedTweens = function() {
384
387
  for (var e = 0, t = this._chainedTweens.length; e < t; e++) this._chainedTweens[e].stop();
385
388
  return this;
@@ -397,9 +400,9 @@ var ee = {
397
400
  }, e.prototype.yoyo = function(e) {
398
401
  return e === void 0 && (e = !1), this._yoyo = e, this;
399
402
  }, e.prototype.easing = function(e) {
400
- 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;
401
404
  }, e.prototype.interpolation = function(e) {
402
- return e === void 0 && (e = k.Linear), this._interpolationFunction = e, this;
405
+ return e === void 0 && (e = A.Linear), this._interpolationFunction = e, this;
403
406
  }, e.prototype.chain = function() {
404
407
  return this._chainedTweens = [...arguments], this;
405
408
  }, e.prototype.onStart = function(e) {
@@ -416,7 +419,7 @@ var ee = {
416
419
  return this._onStopCallback = e, this;
417
420
  }, e.prototype.update = function(t, n) {
418
421
  var r = this;
419
- 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;
420
423
  var i;
421
424
  if (!this._goToEnd && !this._isPlaying) if (n) this.start(t, !0);
422
425
  else return !1;
@@ -449,31 +452,31 @@ var ee = {
449
452
  typeof n == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(n) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = t;
450
453
  }, e.autoStartOnUpdate = !1, e;
451
454
  }();
452
- A.nextId;
453
- var N = j;
454
- 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);
455
458
  //#endregion
456
459
  //#region packages/common-core/src/utils/threejs-utils.ts
457
- var P = null;
460
+ var F = null;
458
461
  globalThis.window !== void 0 && import("./dat.gui.module-B2PXSbre.mjs").then((e) => {
459
- P = e.GUI;
462
+ F = e.GUI;
460
463
  }).catch(() => {});
461
- 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) => {
462
465
  if (!e || !n || r === 0 || i === 0) return new t();
463
466
  let a = e.clone(), o = r / 2, s = i / 2;
464
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;
465
- }, De = (e, n) => {
468
+ }, Oe = (e, n) => {
466
469
  n ||= new t(0, 0, 0);
467
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);
468
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));
469
- }, Oe = (e) => (e.from /= 1e3, e.to /= 1e3, e), ke = (e, t) => {
470
- 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);
471
474
  return n === a && r === o && i === s;
472
- }, Ae = (e, t) => {
473
- 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);
474
- return n === o && r === s && i === c && a === l;
475
475
  }, je = (e, t) => {
476
- 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);
477
480
  return n === i && r === a;
478
481
  }, L = null, R = () => {
479
482
  if (L) return L;
@@ -484,20 +487,20 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
484
487
  }
485
488
  let t = new o(e, 1, 1, n);
486
489
  return t.needsUpdate = !0, t;
487
- }, Me = (e) => z(null, e), z = (e, t) => {
488
- 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() : "";
489
492
  let n = t.shading.version === "2" || t.shading.version?.startsWith("2.");
490
- return e = n ? Pe(e, t) : Ne(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (L ||= R(), e.map = L), e;
491
- }, 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) => {
492
495
  t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = y(t.shading.metallic, .5));
493
496
  let n = !1;
494
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;
495
- }, Pe = (e, t) => {
498
+ }, Fe = (e, t) => {
496
499
  let n = !1, r = t.shading.transmission && t.shading.transmission > 0;
497
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;
498
501
  let i = t.shading.attenuationDistance;
499
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;
500
- }, 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) => {
501
504
  let t = {
502
505
  alpha: e.opacity,
503
506
  metallic: e.reflectivity,
@@ -508,7 +511,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
508
511
  transmission: e.transmission
509
512
  };
510
513
  return e.metalness === 1 ? t.metallic = 1 : t.metallic = e.reflectivity, t;
511
- }, Re = (e) => ({
514
+ }, ze = (e) => ({
512
515
  version: "2.0.0",
513
516
  alpha: e.opacity,
514
517
  alphaCutoff: e.alphaTest,
@@ -544,7 +547,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
544
547
  g: t.g,
545
548
  b: t.b
546
549
  };
547
- }, H = null, ze = (e, t, n, r, i, a, o = 16) => {
550
+ }, H = null, Be = (e, t, n, r, i, a, o = 16) => {
548
551
  H || (H = new p(), H.crossOrigin = "");
549
552
  let s = H;
550
553
  return new Promise((c, l) => {
@@ -571,20 +574,20 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
571
574
  console.warn("ORM maps are not supported on devices with only " + s + " texture units");
572
575
  return;
573
576
  }
574
- 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;
575
- }, 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) => {
576
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);
577
- }, Ve = (e = !0) => {
580
+ }, He = (e = !0) => {
578
581
  if (!window.__RML_WEBGL_GUI__) {
579
- if (!P) return null;
582
+ if (!F) return null;
580
583
  try {
581
- window.__RML_WEBGL_GUI__ = new P({ autoPlace: e });
584
+ window.__RML_WEBGL_GUI__ = new F({ autoPlace: e });
582
585
  } catch {
583
586
  return null;
584
587
  }
585
588
  }
586
589
  return window.__RML_WEBGL_GUI__ ?? null;
587
- }, He = (e, t) => {
590
+ }, Ue = (e, t) => {
588
591
  let n = !1;
589
592
  for (let r of t) {
590
593
  let t = r.getKernelObject(), i;
@@ -597,12 +600,12 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
597
600
  a !== r.getContainer().visible && (n = !0), a ? r.setContainerVisibility(!0) : r.isSelected || r.setContainerVisibility(!1);
598
601
  }
599
602
  return n;
600
- }, Ue = (e, t, n = !0) => {
603
+ }, We = (e, t, n = !0) => {
601
604
  if (!e.userData.tween) if (t) if (e.transparent = !0, !n) e.opacity = .2;
602
605
  else {
603
606
  let t = { opacity: 1 };
604
607
  e.userData.tween = !0;
605
- 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(() => {
606
609
  e.opacity = t.opacity;
607
610
  }).onComplete(() => {
608
611
  e.userData.tween = !1, window.TWEEN?.remove(n);
@@ -613,16 +616,16 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
613
616
  else {
614
617
  let t = { opacity: .2 };
615
618
  e.userData.tween = !0;
616
- 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(() => {
617
620
  e.opacity = t.opacity;
618
621
  }).onComplete(() => {
619
622
  e.transparent = !1, e.userData.tween = !1, window.TWEEN?.remove(n);
620
623
  }).start();
621
624
  window.TWEEN?.add(n);
622
625
  }
623
- }, We = (e, t, n, r, i, a) => {
624
- 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(() => {
625
- 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);
626
629
  G(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
627
630
  }).onComplete(() => {
628
631
  G(e, s), a && a(), window.TWEEN?.remove(f);
@@ -630,7 +633,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
630
633
  window.TWEEN?.remove(f);
631
634
  }).start();
632
635
  return window.TWEEN?.add(f), f;
633
- }, Ge = (e, n) => {
636
+ }, Ke = (e, n) => {
634
637
  let r = e.clone().invert().clone().multiply(n), a = new t(), o = new i();
635
638
  r.decompose(a, o, new t());
636
639
  let s = W(o), c = s.axis;
@@ -647,7 +650,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
647
650
  };
648
651
  }, G = (e, t) => {
649
652
  e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
650
- }, Ke = (e, n, r) => {
653
+ }, qe = (e, n, r) => {
651
654
  let a = new t(), o = new i(), s = new t();
652
655
  e.decompose(a, o, s);
653
656
  let c = new t(), l = new i(), u = new t();
@@ -662,20 +665,20 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
662
665
  }
663
666
  let h = new t().lerpVectors(s, u, r), g = new m();
664
667
  return g.compose(d, f, h), g;
665
- }, qe = (e) => {
668
+ }, Je = (e) => {
666
669
  let t = new h();
667
670
  return t.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), t;
668
671
  }, K = (e, t) => {
669
672
  t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
670
- }, Je = (e, t) => new Promise((n) => {
673
+ }, Ye = (e, t) => new Promise((n) => {
671
674
  e.traverse((e) => {
672
675
  if (e instanceof c) {
673
676
  let r = e.material;
674
677
  e.userData.tween && e.userData.tween.stop();
675
678
  let i = { opacity: r.opacity };
676
679
  t.transparent && (r.transparent = t.transparent);
677
- let a = new M(i);
678
- 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(() => {
679
682
  r.opacity = i.opacity;
680
683
  }).onStop(() => {
681
684
  K(r, t), e.userData.tween = void 0;
@@ -684,7 +687,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
684
687
  }).start());
685
688
  }
686
689
  });
687
- }), Ye = (e) => {
690
+ }), Xe = (e) => {
688
691
  e.traverse((e) => {
689
692
  if (e instanceof c) {
690
693
  let t = e.material;
@@ -697,7 +700,7 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
697
700
  transparent: t.transparent
698
701
  };
699
702
  t.transparent = n.transparent, t.opacity = n.opacity;
700
- 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(() => {
701
704
  t.opacity = n.opacity;
702
705
  }).onComplete(() => {
703
706
  t.transparent = r.transparent, window.TWEEN?.remove(i);
@@ -705,10 +708,10 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
705
708
  window.TWEEN?.add(i);
706
709
  }
707
710
  });
708
- }, Xe = (e, n) => {
711
+ }, Ze = (e, n) => {
709
712
  let r = new u().setFromObject(e), i = r.getSize(new t()), a = Math.min(i.x, i.y, i.z), o = !0;
710
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;
711
- }, Ze = (e) => {
714
+ }, Qe = (e) => {
712
715
  e.type === "Mesh" ? J(e) : q(e);
713
716
  }, q = (e) => {
714
717
  !e || !e.children || e.children.length === 0 || e.children.forEach((e) => {
@@ -736,16 +739,16 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
736
739
  e && e.dispose();
737
740
  }, X = (e) => {
738
741
  e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
739
- }, 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({
740
743
  color: e || "#FF0000",
741
744
  transparent: !0,
742
745
  opacity: .5,
743
746
  visible: !0,
744
747
  polygonOffset: !0,
745
748
  polygonOffsetFactor: -1
746
- }), 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) => {
747
750
  let n = "";
748
- 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);
749
752
  }, rt = (e) => {
750
753
  let n = e.getWorldDirection(new t()).clone();
751
754
  n.y = 0, n.lengthSq() < .01 && (n = new t(0, 1, 0), n.applyQuaternion(e.quaternion), n.y = 0), n.normalize();
@@ -755,16 +758,16 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
755
758
  if (!e || !t) return 0;
756
759
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
757
760
  return r && n || !r && !n ? 0 : n === !0 ? 1 : -1;
758
- }, $ = (e, t) => {
761
+ }, at = (e, t) => {
759
762
  if (!e || !t) return 0;
760
763
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
761
764
  if (r && n) return 0;
762
765
  if (!r && !n) {
763
- let n = at(e, t);
766
+ let n = ot(e, t);
764
767
  return n === .5 ? 0 : n > .5 ? -1 : 1;
765
768
  }
766
769
  return n === !0 ? 1 : -1;
767
- }, at = (e, n) => {
770
+ }, ot = (e, n) => {
768
771
  let r = new u();
769
772
  if (r.copy(e).intersect(n), r.isEmpty()) return 0;
770
773
  let i = (e) => {
@@ -772,34 +775,34 @@ var F = .4, I = "#DDDDDD", ve = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = .8, Se
772
775
  return e.getSize(n), n.x * n.y * n.z;
773
776
  }, a = i(e), o = i(r);
774
777
  return a === 0 ? 0 : o / a;
775
- }, 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) => {
776
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;
777
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));
778
- }, ct = (e) => {
781
+ }, lt = (e) => {
779
782
  let { x: t, y: n } = e;
780
783
  return {
781
784
  x: t,
782
785
  y: n
783
786
  };
784
- }, lt = (e) => {
787
+ }, ut = (e) => {
785
788
  let { x: t, y: n, z: r } = e;
786
789
  return {
787
790
  x: t,
788
791
  y: n,
789
792
  z: r
790
793
  };
791
- }, 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) => {
792
795
  let t = new r();
793
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;
794
- }, ft = (e, n) => {
797
+ }, pt = (e, n) => {
795
798
  let r = new l(), i = new m().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse);
796
799
  r.setFromProjectionMatrix(i);
797
800
  let a = n.getCenter(new t());
798
801
  return r.containsPoint(a);
799
- }, pt = (e) => {
802
+ }, mt = (e) => {
800
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 ");
801
804
  };
802
805
  //#endregion
803
- 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 };
804
807
 
805
- //# sourceMappingURL=threejs-utils-CKV1QNU9.mjs.map
808
+ //# sourceMappingURL=threejs-utils-DKJ0uer7.mjs.map