@roomle/web-sdk 3.9.0-alpha.1 → 3.9.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 (109) hide show
  1. package/lib/ConfiguratorKernel.wasm +0 -0
  2. package/lib/{GLTFExporter-BqjC9LhS.mjs → GLTFExporter-yfYOtLdk.mjs} +2 -2
  3. package/lib/{GLTFExporter-BqjC9LhS.mjs.map → GLTFExporter-yfYOtLdk.mjs.map} +1 -1
  4. package/lib/RoomleCore.js +3 -3
  5. package/lib/RoomleCore.wasm +0 -0
  6. package/lib/RoomleToolsCore.wasm +0 -0
  7. package/lib/{USDZExporter-qUD2VgwK.mjs → USDZExporter-DFJQYX8l.mjs} +2 -2
  8. package/lib/{USDZExporter-qUD2VgwK.mjs.map → USDZExporter-DFJQYX8l.mjs.map} +1 -1
  9. package/lib/{api-ByHTYrQ_.mjs → api-Cp8M5v8V.mjs} +12 -12
  10. package/lib/api-Cp8M5v8V.mjs.map +1 -0
  11. package/lib/asset-loader.worker-A7nEeQB4.mjs.map +1 -1
  12. package/lib/{banana-for-scale-DiBCpVNM.mjs → banana-for-scale-CFY_5rk1.mjs} +4 -4
  13. package/lib/{banana-for-scale-DiBCpVNM.mjs.map → banana-for-scale-CFY_5rk1.mjs.map} +1 -1
  14. package/lib/budgeteer.sw-CQWYbQSc.mjs.map +1 -1
  15. package/lib/{common-utils-AB4Lnet3.mjs → common-utils-L3DF6Ey5.mjs} +2 -2
  16. package/lib/{common-utils-AB4Lnet3.mjs.map → common-utils-L3DF6Ey5.mjs.map} +1 -1
  17. package/lib/{component-dimensioning-LUnZnpqG.mjs → component-dimensioning-FjlPqIvQ.mjs} +44 -38
  18. package/lib/component-dimensioning-FjlPqIvQ.mjs.map +1 -0
  19. package/lib/{component-raycast-helper-Bl0mWPcj.mjs → component-raycast-helper-1n4uXeSD.mjs} +28 -28
  20. package/lib/{component-raycast-helper-Bl0mWPcj.mjs.map → component-raycast-helper-1n4uXeSD.mjs.map} +1 -1
  21. package/lib/configurator-B9H-kPm2.mjs +45 -0
  22. package/lib/{configurator-Cf6J4eOF.mjs.map → configurator-B9H-kPm2.mjs.map} +1 -1
  23. package/lib/configurator-CWD62G9Q.mjs +2 -0
  24. package/lib/{continuous-drawing-helper-BlRy7u2t.mjs → continuous-drawing-helper-DEmx54k_.mjs} +3 -3
  25. package/lib/{continuous-drawing-helper-BlRy7u2t.mjs.map → continuous-drawing-helper-DEmx54k_.mjs.map} +1 -1
  26. package/lib/{decorate-Bck1_lG8.mjs → decorate-C9r0zXzz.mjs} +1 -1
  27. package/lib/{decorate-Bck1_lG8.mjs.map → decorate-C9r0zXzz.mjs.map} +1 -1
  28. package/lib/{dimensioning-helper-vPhGfHd-.mjs → dimensioning-helper-BXD6AEqL.mjs} +28 -21
  29. package/lib/dimensioning-helper-BXD6AEqL.mjs.map +1 -0
  30. package/lib/dimensioning-helper-Do9jwg8T.mjs +2 -0
  31. package/lib/glb-viewer-BxbH6fKg.mjs +2 -0
  32. package/lib/{glb-viewer-B95ZWAO-.mjs → glb-viewer-MuC-xMpl.mjs} +69 -69
  33. package/lib/{glb-viewer-B95ZWAO-.mjs.map → glb-viewer-MuC-xMpl.mjs.map} +1 -1
  34. package/lib/{highlight-coordinator-DeB46jQq.mjs → highlight-coordinator-BJJw_RgR.mjs} +3 -3
  35. package/lib/{highlight-coordinator-DeB46jQq.mjs.map → highlight-coordinator-BJJw_RgR.mjs.map} +1 -1
  36. package/lib/{homag-intelligence-ByOCaAFW.mjs → homag-intelligence-Bq-OZ8uy.mjs} +21 -8
  37. package/lib/homag-intelligence-Bq-OZ8uy.mjs.map +1 -0
  38. package/lib/{imos-ix-poc-export-helper-Vyv-uuNs.mjs → imos-ix-poc-export-helper-C9wPB6fl.mjs} +3 -3
  39. package/lib/{imos-ix-poc-export-helper-Vyv-uuNs.mjs.map → imos-ix-poc-export-helper-C9wPB6fl.mjs.map} +1 -1
  40. package/lib/kernel-C7YDLxq8.mjs.map +1 -1
  41. package/lib/{kernel-utils-BG1uqfT_.mjs → kernel-utils-B5QlsCwn.mjs} +15 -7
  42. package/lib/kernel-utils-B5QlsCwn.mjs.map +1 -0
  43. package/lib/{layer-BfckfWZz.mjs → layer-C_JtkhdO.mjs} +1 -1
  44. package/lib/{layer-BfckfWZz.mjs.map → layer-C_JtkhdO.mjs.map} +1 -1
  45. package/lib/{main-TlUQxOeW.mjs → main-BvkSjJpQ.mjs} +36538 -3295
  46. package/lib/main-BvkSjJpQ.mjs.map +1 -0
  47. package/lib/{material-viewer-37JiZSuS.mjs → material-viewer-xyS-wPPD.mjs} +55 -55
  48. package/lib/material-viewer-xyS-wPPD.mjs.map +1 -0
  49. package/lib/packages-C5mL8tCk.mjs +4 -0
  50. package/lib/planner-CMKaBsin.mjs +2 -0
  51. package/lib/{planner-DBhjeG6D.mjs → planner-CfxenPvQ.mjs} +14 -14
  52. package/lib/{planner-DBhjeG6D.mjs.map → planner-CfxenPvQ.mjs.map} +1 -1
  53. package/lib/{plugin-system-BEZnFUyT.mjs → plugin-system-BBgoIai2.mjs} +3 -3
  54. package/lib/{plugin-system-BEZnFUyT.mjs.map → plugin-system-BBgoIai2.mjs.map} +1 -1
  55. package/lib/roomle-headless-setup-CMK-quZI.mjs.map +1 -1
  56. package/lib/roomle-headless.d.ts +222 -36
  57. package/lib/roomle-headless.js +42 -41
  58. package/lib/roomle-headless.js.map +1 -1
  59. package/lib/{roomle-renderer-BgT28pfp.mjs → roomle-renderer-CkSFbpmg.mjs} +2 -2
  60. package/lib/{roomle-renderer-BgT28pfp.mjs.map → roomle-renderer-CkSFbpmg.mjs.map} +1 -1
  61. package/lib/roomle-sdk.d.ts +222 -36
  62. package/lib/roomle-sdk.js +8 -7
  63. package/lib/{roomle-webgpu-renderer-CdD3cYxN.mjs → roomle-webgpu-renderer-DUr1RZL6.mjs} +426 -393
  64. package/lib/roomle-webgpu-renderer-DUr1RZL6.mjs.map +1 -0
  65. package/lib/{scene-renderer-Bdl7umAf.mjs → scene-renderer-BuMnigf2.mjs} +228 -228
  66. package/lib/{scene-renderer-Bdl7umAf.mjs.map → scene-renderer-BuMnigf2.mjs.map} +1 -1
  67. package/lib/{script-loader-D3Cbc5BY.mjs → script-loader-uiPKVdkx.mjs} +9 -9
  68. package/lib/{script-loader-D3Cbc5BY.mjs.map → script-loader-uiPKVdkx.mjs.map} +1 -1
  69. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  70. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +7 -3
  71. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js +2 -1
  72. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +1 -1
  73. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +35 -2
  74. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js +12 -1
  75. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
  76. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  77. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +3 -3
  78. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  79. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  80. package/lib/{stats-helper-BvDfWWfq.mjs → stats-helper-BZnX3BX3.mjs} +3 -3
  81. package/lib/{stats-helper-BvDfWWfq.mjs.map → stats-helper-BZnX3BX3.mjs.map} +1 -1
  82. package/lib/{three.core-K1JzUaep.mjs → three.core-DNErG1F6.mjs} +1 -1
  83. package/lib/{three.core-K1JzUaep.mjs.map → three.core-DNErG1F6.mjs.map} +1 -1
  84. package/lib/{three.module-Q2K9uyhi.mjs → three.module-BZkESKo3.mjs} +2 -2
  85. package/lib/{three.module-Q2K9uyhi.mjs.map → three.module-BZkESKo3.mjs.map} +1 -1
  86. package/lib/{three.webgpu-7v7o6Pxs.mjs → three.webgpu-C8myBXe1.mjs} +2 -2
  87. package/lib/{three.webgpu-7v7o6Pxs.mjs.map → three.webgpu-C8myBXe1.mjs.map} +1 -1
  88. package/lib/three.webgpu-WIkDzwXU.mjs +3 -0
  89. package/lib/{threejs-utils-BzXU2M3w.mjs → threejs-utils-D7sinreM.mjs} +106 -88
  90. package/lib/threejs-utils-D7sinreM.mjs.map +1 -0
  91. package/lib/{tools-core-CUTTHUku.mjs → tools-core-CCIcHAKj.mjs} +5 -5
  92. package/lib/{tools-core-CUTTHUku.mjs.map → tools-core-CCIcHAKj.mjs.map} +1 -1
  93. package/package.json +5 -2
  94. package/lib/api-ByHTYrQ_.mjs.map +0 -1
  95. package/lib/component-dimensioning-LUnZnpqG.mjs.map +0 -1
  96. package/lib/configurator-Cf6J4eOF.mjs +0 -45
  97. package/lib/configurator-D5FuWg5f.mjs +0 -2
  98. package/lib/dimensioning-helper-5xsc6I7Y.mjs +0 -2
  99. package/lib/dimensioning-helper-vPhGfHd-.mjs.map +0 -1
  100. package/lib/glb-viewer-C-IBj6p6.mjs +0 -2
  101. package/lib/homag-intelligence-ByOCaAFW.mjs.map +0 -1
  102. package/lib/kernel-utils-BG1uqfT_.mjs.map +0 -1
  103. package/lib/main-TlUQxOeW.mjs.map +0 -1
  104. package/lib/material-viewer-37JiZSuS.mjs.map +0 -1
  105. package/lib/packages-BPyzoYeC.mjs +0 -4
  106. package/lib/planner-BBUr8xHt.mjs +0 -2
  107. package/lib/roomle-webgpu-renderer-CdD3cYxN.mjs.map +0 -1
  108. package/lib/three.webgpu-ChguPx4k.mjs +0 -3
  109. package/lib/threejs-utils-BzXU2M3w.mjs.map +0 -1
@@ -0,0 +1,3 @@
1
+ import "./three.core-DNErG1F6.mjs";
2
+ import { An as e, fr as t, pn as n, rn as r } from "./three.webgpu-C8myBXe1.mjs";
3
+ export { r as PointLightNode, n as RectAreaLightNode, e as SpotLightNode, t as WebGPURenderer };
@@ -1,58 +1,74 @@
1
- import { B as e, C as t, In as n, Vr as r, Wn as i, cn as a, d as o, gn as s, hn as c, jr as l, oi as u, on as d, sn as f, ut as p, xi as m, zr as h } from "./three.core-K1JzUaep.mjs";
2
- import { r as g } from "./three.module-Q2K9uyhi.mjs";
3
- import { a as _ } from "./kernel-utils-BG1uqfT_.mjs";
4
- import { V as v, b as y } from "./common-utils-AB4Lnet3.mjs";
5
- //#region packages/common-core/src/utils/math-helper.ts
6
- var b = function(e) {
7
- return Math.PI / 180 * e;
1
+ import { B as e, C as t, In as n, Vr as r, Wn as i, cn as a, d as o, gn as s, hn as c, jr as l, oi as u, on as d, sn as f, ut as p, xi as m, zr as h } from "./three.core-DNErG1F6.mjs";
2
+ import { r as g } from "./three.module-BZkESKo3.mjs";
3
+ import { a as _ } from "./kernel-utils-B5QlsCwn.mjs";
4
+ import { V as v, b as y } from "./common-utils-L3DF6Ey5.mjs";
5
+ //#region packages/typings/planner.ts
6
+ var ee = {
7
+ CONFIGURATOR: 0,
8
+ PLANNER: 1
9
+ }, te = {
10
+ FLOOR: 0,
11
+ ROOM: 1
12
+ }, ne = {
13
+ NONE: 0,
14
+ WALL_SNAP_LEVEL: 1,
15
+ WALL_SNAP_LEVEL_SNAPPED: 2,
16
+ WALL_EDGE: 3,
17
+ DOCKING_VECTOR: 4,
18
+ OBJECT_CONTOUR: 5
19
+ }, re = {
20
+ DEFAULT: 0,
21
+ DOCKING: 1,
22
+ COLLISION: 2
23
+ }, b = /* @__PURE__ */ function(e) {
24
+ return e[e.StandAloneWall = 0] = "StandAloneWall", e[e.OuterWallLeft = 1] = "OuterWallLeft", e[e.OuterWallRight = 2] = "OuterWallRight", e[e.InnerWall = 3] = "InnerWall", e;
25
+ }({}), ie = {
26
+ DEFAULT: 0,
27
+ TERRAIN: 1
28
+ }, ae = {
29
+ WALL: 0,
30
+ EDGE: 1,
31
+ CONSTRUCTION: 2
32
+ }, oe = {
33
+ OBJECT: 0,
34
+ DOOR: 1,
35
+ WINDOW: 2,
36
+ CONSTRUCTION: 3,
37
+ UNKNOWN: 4
8
38
  }, x = function(e) {
39
+ return Math.PI / 180 * e;
40
+ }, S = function(e) {
9
41
  return 180 / Math.PI * e;
10
- }, ee = function(e) {
42
+ }, se = function(e) {
11
43
  return e >= 0 ? -180 + (e + 180) % 360 : 180 - (-e + 180) % 360;
12
- }, te = function(e, t, n, r, i, a) {
44
+ }, ce = function(e, t, n, r, i, a) {
13
45
  e = Math.sqrt(e * e + n * n);
14
- 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));
46
+ 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));
15
47
  return Math.max(l, u);
16
- }, S = function(e) {
48
+ }, C = function(e) {
17
49
  return Math.round(e * 1e3) / 1e3;
18
- }, ne = function(e, t) {
50
+ }, le = function(e, t) {
19
51
  return Math.abs(e.y - t.y) + Math.abs(e.x - t.x);
20
- }, re = function(e, t) {
52
+ }, ue = function(e, t) {
21
53
  return Math.atan2(t.y - e.y, t.x - e.x);
22
- }, ie = function(e) {
23
- let t = x(e);
54
+ }, de = function(e) {
55
+ let t = S(e);
24
56
  return t < 0 && (t = 180 + (180 + t)), t;
25
- }, C = /* @__PURE__ */ function(e) {
57
+ }, w = /* @__PURE__ */ function(e) {
26
58
  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;
27
- }({}), ae = {
59
+ }({}), fe = {
28
60
  LEFT: 0,
29
61
  RIGHT: 1,
30
62
  MIDDLE: 2
31
- }, oe = /* @__PURE__ */ function(e) {
63
+ }, pe = /* @__PURE__ */ function(e) {
32
64
  return e[e.None = 0] = "None", e[e.CatalogItem = 1] = "CatalogItem", e[e.Material = 2] = "Material", e[e.RgbValue = 3] = "RgbValue", e;
33
- }({}), se = /* @__PURE__ */ function(e) {
65
+ }({}), me = /* @__PURE__ */ function(e) {
34
66
  return e[e.CONTINOUS = 0] = "CONTINOUS", e[e.CLICK_PER_CLICK = 1] = "CLICK_PER_CLICK", e;
35
- }({}), ce = {
67
+ }({}), he = {
36
68
  WALL: 0,
37
69
  ROOM_CONTOUR: 1,
38
70
  CONTOUR: 2
39
- }, le = {
40
- CONFIGURATOR: 0,
41
- PLANNER: 1
42
- }, ue = {
43
- NONE: 0,
44
- WALL_SNAP_LEVEL: 1,
45
- WALL_SNAP_LEVEL_SNAPPED: 2,
46
- WALL_EDGE: 3,
47
- DOCKING_VECTOR: 4,
48
- OBJECT_CONTOUR: 5
49
- }, de = {
50
- DEFAULT: 0,
51
- DOCKING: 1,
52
- COLLISION: 2
53
- }, w = /* @__PURE__ */ function(e) {
54
- return e[e.StandAloneWall = 0] = "StandAloneWall", e[e.OuterWallLeft = 1] = "OuterWallLeft", e[e.OuterWallRight = 2] = "OuterWallRight", e[e.InnerWall = 3] = "InnerWall", e;
55
- }({}), T = class {
71
+ }, T = class {
56
72
  static createMeshPhysicalMaterial(e) {
57
73
  return new c(e);
58
74
  }
@@ -432,22 +448,22 @@ var P = null;
432
448
  globalThis.window !== void 0 && import("./dat.gui.module-CZ-DIWHM.mjs").then((e) => {
433
449
  P = e.GUI;
434
450
  }).catch(() => {});
435
- var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F = .9, I = (e) => e instanceof g ? e.capabilities.maxSamples : 16, ve = (e) => e instanceof g ? e.capabilities.maxTextures : 16, ye = (e) => e instanceof g ? e.capabilities.getMaxAnisotropy() : 16, be = (e, t, n, r) => {
451
+ var ge = .4, _e = "#DDDDDD", F = .4, I = "#7B7B7B", ve = "#B1B1B1", ye = .8, be = .9, xe = (e) => e instanceof g ? e.capabilities.maxSamples : 16, Se = (e) => e instanceof g ? e.capabilities.maxTextures : 16, Ce = (e) => e instanceof g ? e.capabilities.getMaxAnisotropy() : 16, we = (e, t, n, r) => {
436
452
  if (!e || !t || n === 0 || r === 0) return new m();
437
453
  let i = e.clone(), a = n / 2, o = r / 2;
438
454
  return i.project(t), i.x = Math.floor(i.x * a + a), i.y = Math.floor(-(i.y * o) + o), i.z = e.distanceTo(t.position), i;
439
- }, xe = (e, t) => {
455
+ }, Te = (e, t) => {
440
456
  t ||= new m(0, 0, 0);
441
457
  let n = new m(e.size.x / 1e3, e.size.z / 1e3, e.size.y / 1e3), r = new m(e.origin.x / 1e3, e.origin.z / 1e3, e.origin.y / -1e3);
442
458
  return new o(new m(0, 0, -n.z).add(r).sub(t), new m(n.x, n.y, 0).add(r).add(t));
443
- }, Se = (e) => (e.from /= 1e3, e.to /= 1e3, e), Ce = (e, t) => {
444
- 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);
459
+ }, Ee = (e) => (e.from /= 1e3, e.to /= 1e3, e), De = (e, t) => {
460
+ 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);
445
461
  return n === a && r === o && i === s;
446
- }, we = (e, t) => {
447
- 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);
462
+ }, Oe = (e, t) => {
463
+ 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);
448
464
  return n === o && r === s && i === c && a === l;
449
- }, Te = (e, t) => {
450
- let n = S(e.x), r = S(e.y), i = S(t.x), a = S(t.y);
465
+ }, ke = (e, t) => {
466
+ let n = C(e.x), r = C(e.y), i = C(t.x), a = C(t.y);
451
467
  return n === i && r === a;
452
468
  }, L = null, R = () => {
453
469
  if (L) return L;
@@ -458,18 +474,20 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
458
474
  }
459
475
  let n = new e(t, 1, 1, i);
460
476
  return n.needsUpdate = !0, n;
461
- }, Ee = (e) => z(null, e), z = (e, t) => {
462
- e ||= ke(), e.name = t.id ? t.id.toString() : "";
477
+ }, Ae = (e) => z(null, e), z = (e, t) => {
478
+ e ||= Ne(), e.name = t.id ? t.id.toString() : "";
463
479
  let n = t.shading.version === "2" || t.shading.version?.startsWith("2.");
464
- return e = n ? Oe(e, t) : De(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (L ||= R(), e.map = L), e;
465
- }, De = (e, t) => {
480
+ return e = n ? Me(e, t) : je(e, t), e.userData.materialVersion = n ? 2 : 1, e.map || (L ||= R(), e.map = L), e;
481
+ }, je = (e, t) => {
466
482
  t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = y(t.shading.metallic, .5));
467
483
  let n = !1;
468
484
  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;
469
- }, Oe = (e, t) => {
470
- let n = !1;
471
- return 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, B(e.attenuationColor, t.shading.attenuationColor), t.shading.attenuationDistance && (e.attenuationDistance = t.shading.attenuationDistance), e.side = n || t.shading.doubleSided ? 2 : 0, e;
472
- }, ke = () => T.createMeshPhysicalMaterial({}), Ae = (e, t = 1) => t === 2 ? Me(e) : je(e), je = (e) => {
485
+ }, Me = (e, t) => {
486
+ let n = !1, r = t.shading.transmission && t.shading.transmission > 0;
487
+ 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;
488
+ let i = t.shading.attenuationDistance;
489
+ 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;
490
+ }, Ne = () => T.createMeshPhysicalMaterial({}), Pe = (e, t = 1) => t === 2 ? Ie(e) : Fe(e), Fe = (e) => {
473
491
  let t = {
474
492
  alpha: e.opacity,
475
493
  metallic: e.reflectivity,
@@ -480,7 +498,7 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
480
498
  transmission: e.transmission
481
499
  };
482
500
  return e.metalness === 1 ? t.metallic = 1 : t.metallic = e.reflectivity, t;
483
- }, Me = (e) => ({
501
+ }, Ie = (e) => ({
484
502
  version: "2.0.0",
485
503
  alpha: e.opacity,
486
504
  alphaCutoff: e.alphaTest,
@@ -516,7 +534,7 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
516
534
  g: t.g,
517
535
  b: t.b
518
536
  };
519
- }, H = null, Ne = (e, t, n, r, i, a, o = 16) => {
537
+ }, H = null, Le = (e, t, n, r, i, a, o = 16) => {
520
538
  H || (H = new u(), H.crossOrigin = "");
521
539
  let s = H;
522
540
  return new Promise((c, l) => {
@@ -543,10 +561,10 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
543
561
  console.warn("ORM maps are not supported on devices with only " + s + " texture units");
544
562
  return;
545
563
  }
546
- e.repeat.set(a, o), Pe(e, n, r), n.mapping === v.RGBA && (r.transparent = !0, r.userData.materialVersion === 1 && r.name.includes("glow") && (r.emissiveIntensity = .5, r.emissive = new t(16777215), r.emissiveMap = r.map)), r.needsUpdate = !0;
547
- }, Pe = (e, t, n) => {
564
+ e.repeat.set(a, o), Re(e, n, r), n.mapping === v.RGBA && (r.transparent = !0, r.userData.materialVersion === 1 && r.name.includes("glow") && (r.emissiveIntensity = .5, r.emissive = new t(16777215), r.emissiveMap = r.map)), r.needsUpdate = !0;
565
+ }, Re = (e, t, n) => {
548
566
  t.mapping === v.XYZ ? (n.normalMap = e, n.map === R() && (n.map = null)) : t.mapping === v.ORM ? (n.aoMap = e, n.roughnessMap = e, n.metalnessMap = e) : t.mapping === v.EMRGB ? n.emissiveMap = e : t.mapping === v.CCRG ? (n.clearcoatMap = e, n.clearcoatRoughnessMap = e) : t.mapping === v.CCXYZ ? n.clearcoatNormalMap = e : t.mapping === v.SHRGBA ? (n.sheenColorMap = e, n.sheenRoughnessMap = e) : t.mapping === v.SPRGBA ? (n.specularColorMap = e, n.specularIntensityMap = e) : t.mapping === v.TTRG ? (n.transmissionMap = e, n.thicknessMap = e) : (e.colorSpace = h, n.map = e);
549
- }, Fe = (e = !0) => {
567
+ }, ze = (e = !0) => {
550
568
  if (!window.__RML_WEBGL_GUI__) {
551
569
  if (!P) return null;
552
570
  try {
@@ -556,11 +574,11 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
556
574
  }
557
575
  }
558
576
  return window.__RML_WEBGL_GUI__ ?? null;
559
- }, Ie = (e, t) => {
577
+ }, Be = (e, t) => {
560
578
  let n = !1;
561
579
  for (let r of t) {
562
580
  let t = r.getKernelObject(), i;
563
- t.wallType.value === w.OuterWallRight && (i = _(t.rightNormal)), t.wallType.value === w.OuterWallLeft && (i = _(t.leftNormal));
581
+ t.wallType.value === b.OuterWallRight && (i = _(t.rightNormal)), t.wallType.value === b.OuterWallLeft && (i = _(t.leftNormal));
564
582
  let a = !0;
565
583
  if (i) {
566
584
  let t = _(r.getPlanElement().getCenter());
@@ -569,7 +587,7 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
569
587
  a !== r.getContainer().visible && (n = !0), a ? r.setContainerVisibility(!0) : r.isSelected || r.setContainerVisibility(!1);
570
588
  }
571
589
  return n;
572
- }, Le = (e, t, n = !0) => {
590
+ }, Ve = (e, t, n = !0) => {
573
591
  if (!e.userData.tween) if (t) if (e.transparent = !0, !n) e.opacity = .2;
574
592
  else {
575
593
  let t = { opacity: 1 };
@@ -592,9 +610,9 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
592
610
  }).start();
593
611
  window.TWEEN?.add(n);
594
612
  }
595
- }, Re = (e, t, n, r, i, a) => {
596
- let o = ze(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(() => {
597
- let n = Be(l, u, d.t);
613
+ }, He = (e, t, n, r, i, a) => {
614
+ let o = Ue(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(() => {
615
+ let n = We(l, u, d.t);
598
616
  G(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
599
617
  }).onComplete(() => {
600
618
  G(e, s), a && a(), window.TWEEN?.remove(f);
@@ -602,7 +620,7 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
602
620
  window.TWEEN?.remove(f);
603
621
  }).start();
604
622
  return window.TWEEN?.add(f), f;
605
- }, ze = (e, t) => {
623
+ }, Ue = (e, t) => {
606
624
  let r = e.clone().invert().clone().multiply(t), i = new m(), a = new n();
607
625
  r.decompose(i, a, new m());
608
626
  let o = W(a), s = o.axis;
@@ -619,13 +637,13 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
619
637
  };
620
638
  }, G = (e, t) => {
621
639
  e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
622
- }, Be = (e, t, r) => {
640
+ }, We = (e, t, r) => {
623
641
  let i = new m(), a = new n(), o = new m();
624
642
  e.decompose(i, a, o);
625
643
  let s = new m(), c = new n(), l = new m();
626
644
  t.decompose(s, c, l);
627
645
  let u = new m().lerpVectors(i, s, r), f = new n().slerpQuaternions(a, c, r), p = W(a.clone().conjugate().multiply(c));
628
- if (p.angleRad > Math.PI && (p.angleRad -= 2 * Math.PI), Math.abs(p.angleRad) > b(1) && i.length() > .001 && s.length() > .001) {
646
+ if (p.angleRad > Math.PI && (p.angleRad -= 2 * Math.PI), Math.abs(p.angleRad) > x(1) && i.length() > .001 && s.length() > .001) {
629
647
  let e = i.clone().normalize().dot(s.clone().normalize());
630
648
  if (Math.abs(e) < .999) {
631
649
  let t = new m().crossVectors(i, s), a = new n().setFromAxisAngle(t.normalize(), Math.acos(e) * r), o = i.length() * r + s.length() * (1 - r);
@@ -634,12 +652,12 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
634
652
  }
635
653
  let h = new m().lerpVectors(o, l, r), g = new d();
636
654
  return g.compose(u, f, h), g;
637
- }, Ve = (e) => {
655
+ }, Ge = (e) => {
638
656
  let n = new t();
639
657
  return n.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), n;
640
658
  }, K = (e, t) => {
641
659
  t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
642
- }, He = (e, t) => new Promise((n) => {
660
+ }, Ke = (e, t) => new Promise((n) => {
643
661
  e.traverse((e) => {
644
662
  if (e instanceof f) {
645
663
  let r = e.material;
@@ -656,7 +674,7 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
656
674
  }).start());
657
675
  }
658
676
  });
659
- }), Ue = (e) => {
677
+ }), qe = (e) => {
660
678
  e.traverse((e) => {
661
679
  if (e instanceof f) {
662
680
  let t = e.material;
@@ -677,10 +695,10 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
677
695
  window.TWEEN?.add(i);
678
696
  }
679
697
  });
680
- }, We = (e, t) => {
698
+ }, Je = (e, t) => {
681
699
  let n = new o().setFromObject(e), r = n.getSize(new m()), i = Math.min(r.x, r.y, r.z), a = !0;
682
700
  return i > 5 && (console.warn("GLB seems to be too big (" + i + ")", t), a = !1), n.min.y < -.01 && (console.warn("GLB seems to be under the floor (" + n.min.y + "): ", t), a = !1), a;
683
- }, Ge = (e) => {
701
+ }, Ye = (e) => {
684
702
  e.type === "Mesh" ? J(e) : q(e);
685
703
  }, q = (e) => {
686
704
  !e || !e.children || e.children.length === 0 || e.children.forEach((e) => {
@@ -708,35 +726,35 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
708
726
  e && e.dispose();
709
727
  }, X = (e) => {
710
728
  e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
711
- }, Z, Ke = () => (Z || (Z = new a(), Z.visible = !1), Z), Q, qe = (e) => (Q ||= T.createMeshStandardMaterial({
729
+ }, Z, Xe = () => (Z || (Z = new a(), Z.visible = !1), Z), Q, Ze = (e) => (Q ||= T.createMeshStandardMaterial({
712
730
  color: e || "#FF0000",
713
731
  transparent: !0,
714
732
  opacity: .5,
715
733
  visible: !0,
716
734
  polygonOffset: !0,
717
735
  polygonOffsetFactor: -1
718
- }), Q), Je = (e) => e.x === 0 && e.y === 0 && e.z === 0, $ = (e, t) => {
736
+ }), Q), $ = (e) => e.x === 0 && e.y === 0 && e.z === 0, Qe = (e, t) => {
719
737
  let n = "";
720
- 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);
721
- }, Ye = (e) => {
738
+ 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);
739
+ }, $e = (e) => {
722
740
  let t = e.getWorldDirection(new m()).clone();
723
741
  t.y = 0, t.lengthSq() < .01 && (t = new m(0, 1, 0), t.applyQuaternion(e.quaternion), t.y = 0), t.normalize();
724
742
  let n = Math.asin(t.x);
725
743
  return t.z < 0 && (n = Math.PI - n), n < 0 && (n += Math.PI * 2), n;
726
- }, Xe = (e, t) => {
744
+ }, et = (e, t) => {
727
745
  if (!e || !t) return 0;
728
746
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
729
747
  return r && n || !r && !n ? 0 : n === !0 ? 1 : -1;
730
- }, Ze = (e, t) => {
748
+ }, tt = (e, t) => {
731
749
  if (!e || !t) return 0;
732
750
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
733
751
  if (r && n) return 0;
734
752
  if (!r && !n) {
735
- let n = Qe(e, t);
753
+ let n = nt(e, t);
736
754
  return n === .5 ? 0 : n > .5 ? -1 : 1;
737
755
  }
738
756
  return n === !0 ? 1 : -1;
739
- }, Qe = (e, t) => {
757
+ }, nt = (e, t) => {
740
758
  let n = new o();
741
759
  if (n.copy(e).intersect(t), n.isEmpty()) return 0;
742
760
  let r = (e) => {
@@ -744,34 +762,34 @@ var fe = .4, pe = "#DDDDDD", me = .4, he = "#7B7B7B", ge = "#B1B1B1", _e = .8, F
744
762
  return e.getSize(t), t.x * t.y * t.z;
745
763
  }, i = r(e), a = r(n);
746
764
  return i === 0 ? 0 : a / i;
747
- }, $e = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, et = (e, t, n, r = 1) => {
765
+ }, rt = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, it = (e, t, n, r = 1) => {
748
766
  let i = t > n, a = i ? 15 : 0, s = i ? 0 : 10, c = e.getSize(new m()), l = e.getCenter(new m()), u = c.x > 2 * a ? c.x / 2 : a, d = c.z > 2 * s ? c.z / 2 : s;
749
767
  return u *= r, d *= r, new o(new m(l.x - u, l.y, l.z - d), new m(l.x + u, l.y, l.z + d));
750
- }, tt = (e) => {
768
+ }, at = (e) => {
751
769
  let { x: t, y: n } = e;
752
770
  return {
753
771
  x: t,
754
772
  y: n
755
773
  };
756
- }, nt = (e) => {
774
+ }, ot = (e) => {
757
775
  let { x: t, y: n, z: r } = e;
758
776
  return {
759
777
  x: t,
760
778
  y: n,
761
779
  z: r
762
780
  };
763
- }, rt = (e, t, n) => new m().setFromSphericalCoords(e, Math.PI * (1 - n), Math.PI * 2 * (1 - t)), it = (e) => {
781
+ }, st = (e, t, n) => new m().setFromSphericalCoords(e, Math.PI * (1 - n), Math.PI * 2 * (1 - t)), ct = (e) => {
764
782
  let t = new r();
765
783
  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;
766
- }, at = (e, t) => {
784
+ }, lt = (e, t) => {
767
785
  let n = new p(), r = new d().multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse);
768
786
  n.setFromProjectionMatrix(r);
769
787
  let i = t.getCenter(new m());
770
788
  return n.containsPoint(i);
771
- }, ot = (e) => {
789
+ }, ut = (e) => {
772
790
  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 ");
773
791
  };
774
792
  //#endregion
775
- export { M as $, ve as A, Te as B, Ve as C, Ae as D, $ as E, at as F, Le as G, we as H, $e as I, He as J, tt as K, xe as L, Fe as M, Ye as N, ye as O, Ie as P, O as Q, Se as R, Ze as S, et as T, z as U, Ce as V, G as W, rt as X, Je as Y, E as Z, X as _, ge as a, se as at, Ue as b, U as c, ae as ct, We as d, te as dt, T as et, Xe as f, ee as ft, Y as g, Ge as h, b as ht, he as i, ce as it, be as j, I as k, Ne as l, re as lt, Ee as m, x as mt, F as n, de as nt, fe as o, oe as ot, it as p, ie as pt, nt as q, me as r, le as rt, pe as s, C as st, _e as t, ue as tt, Re as u, ne as ut, J as v, qe as w, Ke as x, q as y, ot as z };
793
+ export { M as $, Se as A, ke as B, Ge as C, Pe as D, Qe as E, lt as F, Ve as G, Oe as H, rt as I, Ke as J, at as K, Te as L, ze as M, $e as N, Ce as O, Be as P, O as Q, Ee as R, tt as S, it as T, z as U, De as V, G as W, st as X, $ as Y, E as Z, X as _, te as _t, ve as a, fe as at, qe as b, U as c, ce as ct, Je as d, S as dt, T as et, et as f, x as ft, Y as g, oe as gt, Ye as h, ne as ht, I as i, w as it, we as j, xe as k, Le as l, se as lt, Ae as m, ie as mt, be as n, me as nt, ge as o, ue as ot, ct as p, ae as pt, ot as q, F as r, pe as rt, _e as s, le as st, ye as t, he as tt, He as u, de as ut, J as v, re as vt, Ze as w, Xe as x, q as y, ee as yt, ut as z };
776
794
 
777
- //# sourceMappingURL=threejs-utils-BzXU2M3w.mjs.map
795
+ //# sourceMappingURL=threejs-utils-D7sinreM.mjs.map