@roomle/web-sdk 5.1.0-typestest.1 → 5.1.0

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 (140) hide show
  1. package/.releaserc.json +0 -12
  2. package/lib/{BufferGeometry-CxlpBjLq.mjs → BufferGeometry-BnAxBdk5.mjs} +2 -2
  3. package/lib/{BufferGeometry-CxlpBjLq.mjs.map → BufferGeometry-BnAxBdk5.mjs.map} +1 -1
  4. package/lib/ConfiguratorKernel.wasm +0 -0
  5. package/lib/{GLTFExporter-DeNw0qAI.mjs → GLTFExporter-nbgAo4jg.mjs} +1 -1
  6. package/lib/{GLTFExporter-DeNw0qAI.mjs.map → GLTFExporter-nbgAo4jg.mjs.map} +1 -1
  7. package/lib/{GaussianBlurNode-BR1cKBsX.mjs → GaussianBlurNode-CkEuIVaV.mjs} +3 -3
  8. package/lib/{GaussianBlurNode-BR1cKBsX.mjs.map → GaussianBlurNode-CkEuIVaV.mjs.map} +1 -1
  9. package/lib/{Object3D-CALIQdg1.mjs → Object3D-DWcwDaGD.mjs} +1 -1
  10. package/lib/{Object3D-CALIQdg1.mjs.map → Object3D-DWcwDaGD.mjs.map} +1 -1
  11. package/lib/{PointLightHelper-C_0CYp7R.mjs → PointLightHelper-B9jI7cpI.mjs} +4 -4
  12. package/lib/{PointLightHelper-C_0CYp7R.mjs.map → PointLightHelper-B9jI7cpI.mjs.map} +1 -1
  13. package/lib/RoomleCore.wasm +0 -0
  14. package/lib/RoomleToolsCore.wasm +0 -0
  15. package/lib/{SpotLightHelper-UUIHn43T.mjs → SpotLightHelper-DYKh1Ufq.mjs} +3 -3
  16. package/lib/{SpotLightHelper-UUIHn43T.mjs.map → SpotLightHelper-DYKh1Ufq.mjs.map} +1 -1
  17. package/lib/{USDZExporter-BBNw7Hey.mjs → USDZExporter-DxfFzy9g.mjs} +2 -2
  18. package/lib/{USDZExporter-BBNw7Hey.mjs.map → USDZExporter-DxfFzy9g.mjs.map} +1 -1
  19. package/lib/{Vector4-BOcWTZJI.mjs → Vector4-BaGMLJRJ.mjs} +2 -2
  20. package/lib/{Vector4-BOcWTZJI.mjs.map → Vector4-BaGMLJRJ.mjs.map} +1 -1
  21. package/lib/{api-DGnvZIcv.mjs → api-Woc5NOM1.mjs} +7 -4
  22. package/lib/api-Woc5NOM1.mjs.map +1 -0
  23. package/lib/{asset-loader.worker-CzI1oyTY.mjs → asset-loader.worker-CE4O0JU-.mjs} +1 -1
  24. package/lib/asset-loader.worker-CE4O0JU-.mjs.map +1 -0
  25. package/lib/{banana-for-scale-Cf41yXTl.mjs → banana-for-scale-DQIiLvlJ.mjs} +3 -3
  26. package/lib/{banana-for-scale-Cf41yXTl.mjs.map → banana-for-scale-DQIiLvlJ.mjs.map} +1 -1
  27. package/lib/{budgeteer.sw-D80jTmYa.mjs → budgeteer.sw-yR2xApHT.mjs} +1 -1
  28. package/lib/budgeteer.sw-yR2xApHT.mjs.map +1 -0
  29. package/lib/common-utils-CNGLvAo_.mjs +320 -0
  30. package/lib/common-utils-CNGLvAo_.mjs.map +1 -0
  31. package/lib/{component-raycast-helper-BtOEYKaR.mjs → component-raycast-helper-CaY2UMli.mjs} +4 -4
  32. package/lib/{component-raycast-helper-BtOEYKaR.mjs.map → component-raycast-helper-CaY2UMli.mjs.map} +1 -1
  33. package/lib/configurator-Bo_pnqDi.mjs +2 -0
  34. package/lib/configurator-i-Zl5omd.mjs +45 -0
  35. package/lib/{configurator-BFZrqpSE.mjs.map → configurator-i-Zl5omd.mjs.map} +1 -1
  36. package/lib/{continuous-drawing-helper-CTfGRTfH.mjs → continuous-drawing-helper-BPe83b9-.mjs} +2 -2
  37. package/lib/{continuous-drawing-helper-CTfGRTfH.mjs.map → continuous-drawing-helper-BPe83b9-.mjs.map} +1 -1
  38. package/lib/{dat.gui.module-CSOnFjd0.mjs → dat.gui.module-B2PXSbre.mjs} +1 -1
  39. package/lib/{dat.gui.module-CSOnFjd0.mjs.map → dat.gui.module-B2PXSbre.mjs.map} +1 -1
  40. package/lib/{decorate-Bl-JF_YY.mjs → decorate-CjaqqbUP.mjs} +1 -1
  41. package/lib/{decorate-Bl-JF_YY.mjs.map → decorate-CjaqqbUP.mjs.map} +1 -1
  42. package/lib/{dimensioning-helper-DSlkLDmx.mjs → dimensioning-helper-WQTVJpxQ.mjs} +4 -4
  43. package/lib/{dimensioning-helper-DSlkLDmx.mjs.map → dimensioning-helper-WQTVJpxQ.mjs.map} +1 -1
  44. package/lib/dimensioning-helper-v3HsrygN.mjs +2 -0
  45. package/lib/{dist-BZTF7IJN.mjs → dist-Blgk0vU0.mjs} +1 -1
  46. package/lib/{dist-BZTF7IJN.mjs.map → dist-Blgk0vU0.mjs.map} +1 -1
  47. package/lib/{fflate.module-Cx1QFI2-.mjs → fflate.module-DTkA0kF8.mjs} +1 -1
  48. package/lib/{fflate.module-Cx1QFI2-.mjs.map → fflate.module-DTkA0kF8.mjs.map} +1 -1
  49. package/lib/{glb-viewer-DY3xeUtU.mjs → glb-viewer-C1-vP2Vq.mjs} +24 -24
  50. package/lib/{glb-viewer-DY3xeUtU.mjs.map → glb-viewer-C1-vP2Vq.mjs.map} +1 -1
  51. package/lib/glb-viewer-CaNU0FLF.mjs +2 -0
  52. package/lib/{highlight-coordinator-Q8dEUY3D.mjs → highlight-coordinator-DKMaPGPo.mjs} +10 -10
  53. package/lib/{highlight-coordinator-Q8dEUY3D.mjs.map → highlight-coordinator-DKMaPGPo.mjs.map} +1 -1
  54. package/lib/{homag-intelligence-SidskTjc.mjs → homag-intelligence-Dr0m9LxO.mjs} +9 -3
  55. package/lib/homag-intelligence-Dr0m9LxO.mjs.map +1 -0
  56. package/lib/{hosek-wilkie-sky-DmTvnxMA.mjs → hosek-wilkie-sky-CZX3Q53j.mjs} +3 -3
  57. package/lib/{hosek-wilkie-sky-DmTvnxMA.mjs.map → hosek-wilkie-sky-CZX3Q53j.mjs.map} +1 -1
  58. package/lib/{imos-ix-poc-export-helper-BGN97m8W.mjs → imos-ix-poc-export-helper-DLaYjLvF.mjs} +3 -3
  59. package/lib/{imos-ix-poc-export-helper-BGN97m8W.mjs.map → imos-ix-poc-export-helper-DLaYjLvF.mjs.map} +1 -1
  60. package/lib/{kernel-utils-BYKmP0mf.mjs → kernel-utils-BwJOfYWh.mjs} +1 -1
  61. package/lib/{kernel-utils-BYKmP0mf.mjs.map → kernel-utils-BwJOfYWh.mjs.map} +1 -1
  62. package/lib/{layer-DRMDGxT7.mjs → layer-PJGxbJOI.mjs} +1 -1
  63. package/lib/{layer-DRMDGxT7.mjs.map → layer-PJGxbJOI.mjs.map} +1 -1
  64. package/lib/{material-viewer-CzzbbiY3.mjs → material-viewer-CHzje_V0.mjs} +31 -31
  65. package/lib/{material-viewer-CzzbbiY3.mjs.map → material-viewer-CHzje_V0.mjs.map} +1 -1
  66. package/lib/{packages-Cduqgaaj.mjs → packages-DbOsSpKq.mjs} +6 -5
  67. package/lib/{packages-Cduqgaaj.mjs.map → packages-DbOsSpKq.mjs.map} +1 -1
  68. package/lib/{planner-ClhRT5pF.mjs → planner-BOrph7M7.mjs} +14 -14
  69. package/lib/{planner-ClhRT5pF.mjs.map → planner-BOrph7M7.mjs.map} +1 -1
  70. package/lib/planner-DXeyIHUx.mjs +2 -0
  71. package/lib/{plugin-system-CPf99Zkf.mjs → plugin-system-BSLY3o0a.mjs} +3 -3
  72. package/lib/{plugin-system-CPf99Zkf.mjs.map → plugin-system-BSLY3o0a.mjs.map} +1 -1
  73. package/lib/{roomle-headless-setup-ps3I0vOP.mjs → roomle-headless-setup-DbO_rLjK.mjs} +1 -1
  74. package/lib/{roomle-headless-setup-ps3I0vOP.mjs.map → roomle-headless-setup-DbO_rLjK.mjs.map} +1 -1
  75. package/lib/roomle-headless.d.ts +321 -17
  76. package/lib/roomle-headless.js +68 -68
  77. package/lib/roomle-headless.js.map +1 -1
  78. package/lib/{roomle-renderer-UJINLYxS.mjs → roomle-renderer-nCUrLU_S.mjs} +1 -1
  79. package/lib/roomle-renderer-nCUrLU_S.mjs.map +1 -0
  80. package/lib/{roomle-sdk-VJa0TBo9.mjs → roomle-sdk-CN9TqA78.mjs} +4236 -3463
  81. package/lib/roomle-sdk-CN9TqA78.mjs.map +1 -0
  82. package/lib/roomle-sdk.d.ts +321 -17
  83. package/lib/roomle-sdk.js +9 -8
  84. package/lib/{roomle-webgpu-renderer-BSvxbopA.mjs → roomle-webgpu-renderer-C26OAfkn.mjs} +299 -299
  85. package/lib/{roomle-webgpu-renderer-BSvxbopA.mjs.map → roomle-webgpu-renderer-C26OAfkn.mjs.map} +1 -1
  86. package/lib/{scene-renderer-C3ubDmx0.mjs → scene-renderer-DGSgD6mp.mjs} +359 -342
  87. package/lib/scene-renderer-DGSgD6mp.mjs.map +1 -0
  88. package/lib/{script-loader-DIm0FRqb.mjs → script-loader-CL3F8sIY.mjs} +3 -3
  89. package/lib/{script-loader-DIm0FRqb.mjs.map → script-loader-CL3F8sIY.mjs.map} +1 -1
  90. package/lib/{shading-settings-6v-7O_Sz.mjs → shading-settings-DJ4kY2Cn.mjs} +2 -2
  91. package/lib/{shading-settings-6v-7O_Sz.mjs.map → shading-settings-DJ4kY2Cn.mjs.map} +1 -1
  92. package/lib/src-D2lqGogG.mjs +2 -0
  93. package/lib/{src-Dg0wYIom.mjs → src-DRuHdK6i.mjs} +1 -1
  94. package/lib/{src-Dg0wYIom.mjs.map → src-DRuHdK6i.mjs.map} +1 -1
  95. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  96. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  97. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  98. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  99. package/lib/{stats-helper-BQ4iIDmH.mjs → stats-helper-C74q5Bje.mjs} +3 -3
  100. package/lib/{stats-helper-BQ4iIDmH.mjs.map → stats-helper-C74q5Bje.mjs.map} +1 -1
  101. package/lib/{svgo.browser-xZ3L7awG.mjs → svgo.browser-EB1zkPfG.mjs} +1 -1
  102. package/lib/{svgo.browser-xZ3L7awG.mjs.map → svgo.browser-EB1zkPfG.mjs.map} +1 -1
  103. package/lib/{three.tsl-DtfvggFX.mjs → three.tsl-CuZzrviK.mjs} +1 -1
  104. package/lib/{three.tsl-De6A-G56.mjs → three.tsl-kYk-mr3-.mjs} +2 -2
  105. package/lib/{three.tsl-De6A-G56.mjs.map → three.tsl-kYk-mr3-.mjs.map} +1 -1
  106. package/lib/{three.webgpu-B1OhMci_.mjs → three.webgpu-D11YJG2U.mjs} +1 -1
  107. package/lib/{three.webgpu-wPiwbpFM.mjs → three.webgpu-DTO8skiU.mjs} +1 -1
  108. package/lib/{three.webgpu-wPiwbpFM.mjs.map → three.webgpu-DTO8skiU.mjs.map} +1 -1
  109. package/lib/{threejs-utils-CMmJiCGK.mjs → threejs-utils-DHTRY4yW.mjs} +288 -152
  110. package/lib/threejs-utils-DHTRY4yW.mjs.map +1 -0
  111. package/lib/{tools-core-SxI9qPW4.mjs → tools-core-D3kc3jRW.mjs} +6 -6
  112. package/lib/{tools-core-SxI9qPW4.mjs.map → tools-core-D3kc3jRW.mjs.map} +1 -1
  113. package/lib/{webgpu-BxYJfBjz.mjs → webgpu-zcxAHKs3.mjs} +4 -4
  114. package/lib/{webgpu-BxYJfBjz.mjs.map → webgpu-zcxAHKs3.mjs.map} +1 -1
  115. package/lib/workers-B-AqdQMe.mjs +6 -0
  116. package/lib/{workers-B_wmKVL0.mjs.map → workers-B-AqdQMe.mjs.map} +1 -1
  117. package/package.json +3 -3
  118. package/lib/api-DGnvZIcv.mjs.map +0 -1
  119. package/lib/asset-loader.worker-CzI1oyTY.mjs.map +0 -1
  120. package/lib/budgeteer.sw-D80jTmYa.mjs.map +0 -1
  121. package/lib/common-utils-OTJQGohe.mjs +0 -206
  122. package/lib/common-utils-OTJQGohe.mjs.map +0 -1
  123. package/lib/component-dimensioning-BvF9Vdm0.mjs +0 -169
  124. package/lib/component-dimensioning-BvF9Vdm0.mjs.map +0 -1
  125. package/lib/configurator-BFZrqpSE.mjs +0 -45
  126. package/lib/configurator-DUKXHWSS.mjs +0 -2
  127. package/lib/dimensioning-helper-CQlesi-m.mjs +0 -2
  128. package/lib/glb-viewer-GQsVJ2fM.mjs +0 -2
  129. package/lib/homag-intelligence-SidskTjc.mjs.map +0 -1
  130. package/lib/planner-BX25vBoU.mjs +0 -2
  131. package/lib/render-cache-CPppt7Rd.mjs +0 -150
  132. package/lib/render-cache-CPppt7Rd.mjs.map +0 -1
  133. package/lib/render-order-a0QAbB7Q.mjs +0 -26
  134. package/lib/render-order-a0QAbB7Q.mjs.map +0 -1
  135. package/lib/roomle-renderer-UJINLYxS.mjs.map +0 -1
  136. package/lib/roomle-sdk-VJa0TBo9.mjs.map +0 -1
  137. package/lib/scene-renderer-C3ubDmx0.mjs.map +0 -1
  138. package/lib/src-6KtBPZXp.mjs +0 -2
  139. package/lib/threejs-utils-CMmJiCGK.mjs.map +0 -1
  140. package/lib/workers-B_wmKVL0.mjs +0 -6
@@ -1,7 +1,7 @@
1
1
  import { Ei as e, Hr as t, Pr as n, Rn as r, Wr as i, _n as a, cn as o, dt as s, f as c, li as l, ln as u, un as d, vn as f, w as p } from "./three.core-BTUCraWz.mjs";
2
2
  import { r as m } from "./three.module-DUSFrLM6.mjs";
3
- import { a as h } from "./kernel-utils-BYKmP0mf.mjs";
4
- import { U as g, b as _ } from "./common-utils-OTJQGohe.mjs";
3
+ import { a as h } from "./kernel-utils-BwJOfYWh.mjs";
4
+ import { W as g, b as _ } from "./common-utils-CNGLvAo_.mjs";
5
5
  //#region packages/typings/planner.ts
6
6
  var ee = {
7
7
  CONFIGURATOR: 0,
@@ -49,47 +49,190 @@ var ee = {
49
49
  CONSTRUCTION: 3,
50
50
  UNKNOWN: 4,
51
51
  EXTERNAL_CONSTRUCTION: 5
52
- }, b = function(e) {
52
+ }, le = /* @__PURE__ */ new WeakMap(), b = (e, t) => Array.isArray(e) ? e.some((e) => b(e, t)) : e.transparent && e.opacity < t || e.alphaTest > 0, x = (e) => Array.isArray(e) ? e.some((e) => x(e)) : e instanceof a && e.transmission > 0, ue = class {
53
+ constructor(e) {
54
+ this.needsUpdate = !0, this._cache = null, this._cache = e;
55
+ }
56
+ dispose() {
57
+ this._cache?.dispose();
58
+ }
59
+ clear() {
60
+ this._cache?.clear(), this.needsUpdate = !0;
61
+ }
62
+ update(e) {
63
+ !this.needsUpdate || !this._cache || (e.traverse((e) => {
64
+ e.isLine || e.isPoints ? this._cache?.addLineOrPoint(e) : e.isMesh ? this._cache?.addMesh(e) : this._cache?.addObject(e);
65
+ }), this.needsUpdate = !1);
66
+ }
67
+ onBeforeRender() {
68
+ this._cache?.onBeforeRender();
69
+ }
70
+ onAfterRender() {
71
+ this._cache?.onAfterRender();
72
+ }
73
+ }, de = class {
74
+ constructor() {
75
+ this._cacheMap = /* @__PURE__ */ new Map();
76
+ }
77
+ dispose() {
78
+ this._cacheMap.forEach((e) => {
79
+ e.dispose();
80
+ });
81
+ }
82
+ registerCache(e, t) {
83
+ this._cacheMap.set(e, new ue(t));
84
+ }
85
+ clearCache() {
86
+ this._cacheMap.forEach((e) => {
87
+ e.clear();
88
+ });
89
+ }
90
+ clearObjectCache(e) {
91
+ let t = this._cacheMap.get(e);
92
+ t && t.clear();
93
+ }
94
+ onBeforeRender(e, t) {
95
+ let n = this._cacheMap.get(e);
96
+ n && (n.update(t), n.onBeforeRender());
97
+ }
98
+ onAfterRender(e) {
99
+ let t = this._cacheMap.get(e);
100
+ t && t.onAfterRender();
101
+ }
102
+ render(e, t, n) {
103
+ let r = this._cacheMap.get(e);
104
+ r && (r.update(t), r.onBeforeRender());
105
+ try {
106
+ n();
107
+ } finally {
108
+ r && r.onAfterRender();
109
+ }
110
+ }
111
+ }, fe = class {
112
+ constructor(e) {
113
+ this._visibilityToRestore = /* @__PURE__ */ new Map(), this._isObjectInvisible = e;
114
+ }
115
+ dispose() {
116
+ this.clear();
117
+ }
118
+ clear() {
119
+ this._visibilityToRestore.clear();
120
+ }
121
+ addLineOrPoint(e) {
122
+ this._visibilityToRestore.set(e, e.visible);
123
+ }
124
+ addMesh(e) {
125
+ this._isObjectInvisible && this._isObjectInvisible(e) && this._visibilityToRestore.set(e, e.visible);
126
+ }
127
+ addObject(e) {
128
+ this._isObjectInvisible && this._isObjectInvisible(e) && this._visibilityToRestore.set(e, e.visible);
129
+ }
130
+ onBeforeRender() {
131
+ this._visibilityToRestore.forEach((e, t) => {
132
+ this._visibilityToRestore.set(t, t.visible), t.visible = !1;
133
+ });
134
+ }
135
+ onAfterRender() {
136
+ this._visibilityToRestore.forEach((e, t) => {
137
+ t.visible = e;
138
+ });
139
+ }
140
+ }, pe = class {
141
+ constructor(e) {
142
+ this._depthWriteCache = /* @__PURE__ */ new Set(), this._doNotWriteDepth = e;
143
+ }
144
+ dispose() {
145
+ this._depthWriteCache.clear();
146
+ }
147
+ clear() {
148
+ this._depthWriteCache.clear();
149
+ }
150
+ addLineOrPoint(e) {}
151
+ addObject(e) {}
152
+ addMesh(e) {
153
+ this._doNotWriteDepth && this._doNotWriteDepth(e) && e.material instanceof f && e.material.depthWrite && this._depthWriteCache.add(e.material);
154
+ }
155
+ onBeforeRender() {
156
+ this._depthWriteCache.forEach((e) => {
157
+ e.depthWrite = !1;
158
+ });
159
+ }
160
+ onAfterRender() {
161
+ this._depthWriteCache.forEach((e) => {
162
+ e.depthWrite = !0;
163
+ });
164
+ }
165
+ }, me = class e {
166
+ constructor() {
167
+ this._objectCache = /* @__PURE__ */ new Map();
168
+ }
169
+ clear() {
170
+ this._objectCache.clear();
171
+ }
172
+ onBeforeRender() {
173
+ this._objectCache.forEach((t, n) => {
174
+ e._writeObjectDataInto(n, t.originalObjectData), this._updateObject(n, t.updateObjectData);
175
+ });
176
+ }
177
+ onAfterRender() {
178
+ this._objectCache.forEach((e, t) => {
179
+ this._updateObject(t, e.originalObjectData);
180
+ });
181
+ }
182
+ addToCache(t, n) {
183
+ let r = {};
184
+ e._writeObjectDataInto(t, r), this._objectCache.set(t, {
185
+ originalObjectData: r,
186
+ updateObjectData: n
187
+ });
188
+ }
189
+ static _writeObjectDataInto(e, t) {
190
+ t.visible = e.visible, t.castShadow = e.castShadow, t.receiveShadow = e instanceof u ? e.receiveShadow : void 0, t.material = e instanceof u ? e.material : void 0;
191
+ }
192
+ _updateObject(e, t) {
193
+ t.visible !== void 0 && (e.visible = t.visible), t.castShadow !== void 0 && (e.castShadow = t.castShadow), e instanceof u && t.receiveShadow !== void 0 && (e.receiveShadow = t.receiveShadow), e instanceof u && t.material !== void 0 && (e.material = t.material);
194
+ }
195
+ }, S = function(e) {
53
196
  return Math.PI / 180 * e;
54
- }, x = function(e) {
197
+ }, C = function(e) {
55
198
  return 180 / Math.PI * e;
56
- }, le = function(e) {
199
+ }, he = function(e) {
57
200
  return e >= 0 ? -180 + (e + 180) % 360 : 180 - (-e + 180) % 360;
58
- }, ue = function(e, t, n, r, i, a) {
201
+ }, ge = function(e, t, n, r, i, a) {
59
202
  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 = b(r), l = t / 2 / Math.tan(c / 2), u = e / (2 * Math.atan(Math.PI * s / 360));
203
+ 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));
61
204
  return Math.max(l, u);
62
- }, S = function(e) {
205
+ }, w = function(e) {
63
206
  return Math.round(e * 1e3) / 1e3;
64
- }, de = function(e, t) {
207
+ }, _e = function(e, t) {
65
208
  return Math.abs(e.y - t.y) + Math.abs(e.x - t.x);
66
- }, fe = function(e, t) {
209
+ }, ve = function(e, t) {
67
210
  return Math.atan2(t.y - e.y, t.x - e.x);
68
- }, pe = function(e) {
69
- let t = x(e);
211
+ }, ye = function(e) {
212
+ let t = C(e);
70
213
  return t < 0 && (t = 180 + (180 + t)), t;
71
- }, C = /* @__PURE__ */ function(e) {
214
+ }, T = /* @__PURE__ */ function(e) {
72
215
  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
- }({}), me = {
216
+ }({}), be = {
74
217
  LEFT: 0,
75
218
  RIGHT: 1,
76
219
  MIDDLE: 2
77
- }, he = /* @__PURE__ */ function(e) {
220
+ }, xe = /* @__PURE__ */ function(e) {
78
221
  return e[e.None = 0] = "None", e[e.CatalogItem = 1] = "CatalogItem", e[e.Material = 2] = "Material", e[e.RgbValue = 3] = "RgbValue", e;
79
- }({}), ge = /* @__PURE__ */ function(e) {
222
+ }({}), Se = /* @__PURE__ */ function(e) {
80
223
  return e[e.CONTINOUS = 0] = "CONTINOUS", e[e.CLICK_PER_CLICK = 1] = "CLICK_PER_CLICK", e;
81
- }({}), _e = {
224
+ }({}), Ce = {
82
225
  WALL: 0,
83
226
  ROOM_CONTOUR: 1,
84
227
  CONTOUR: 2
85
- }, w = class {
228
+ }, E = class {
86
229
  static createMeshPhysicalMaterial(e) {
87
230
  return new a(e);
88
231
  }
89
232
  static createMeshStandardMaterial(e) {
90
233
  return new f(e);
91
234
  }
92
- }, T = Object.freeze({
235
+ }, D = Object.freeze({
93
236
  Linear: Object.freeze({
94
237
  None: function(e) {
95
238
  return e;
@@ -208,13 +351,13 @@ var ee = {
208
351
  }),
209
352
  Bounce: Object.freeze({
210
353
  In: function(e) {
211
- return 1 - T.Bounce.Out(1 - e);
354
+ return 1 - D.Bounce.Out(1 - e);
212
355
  },
213
356
  Out: function(e) {
214
357
  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
358
  },
216
359
  InOut: function(e) {
217
- return e < .5 ? T.Bounce.In(e * 2) * .5 : T.Bounce.Out(e * 2 - 1) * .5 + .5;
360
+ return e < .5 ? D.Bounce.In(e * 2) * .5 : D.Bounce.Out(e * 2 - 1) * .5 + .5;
218
361
  }
219
362
  }),
220
363
  generatePow: function(e) {
@@ -230,9 +373,9 @@ var ee = {
230
373
  }
231
374
  };
232
375
  }
233
- }), E = function() {
376
+ }), O = function() {
234
377
  return performance.now();
235
- }, D = function() {
378
+ }, we = function() {
236
379
  function e() {
237
380
  var e = [...arguments];
238
381
  this._tweens = {}, this._tweensAddedDuringUpdate = {}, this.add.apply(this, e);
@@ -260,7 +403,7 @@ var ee = {
260
403
  return !e.isPlaying();
261
404
  });
262
405
  }, e.prototype.update = function(e, t) {
263
- e === void 0 && (e = E()), t === void 0 && (t = !0);
406
+ e === void 0 && (e = O()), t === void 0 && (t = !0);
264
407
  var n = Object.keys(this._tweens);
265
408
  if (n.length !== 0) for (; n.length > 0;) {
266
409
  this._tweensAddedDuringUpdate = {};
@@ -271,17 +414,17 @@ var ee = {
271
414
  n = Object.keys(this._tweensAddedDuringUpdate);
272
415
  }
273
416
  }, e;
274
- }(), O = {
417
+ }(), k = {
275
418
  Linear: function(e, t) {
276
- var n = e.length - 1, r = n * t, i = Math.floor(r), a = O.Utils.Linear;
419
+ var n = e.length - 1, r = n * t, i = Math.floor(r), a = k.Utils.Linear;
277
420
  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
421
  },
279
422
  Bezier: function(e, t) {
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);
423
+ 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);
281
424
  return n;
282
425
  },
283
426
  CatmullRom: function(e, t) {
284
- var n = e.length - 1, r = n * t, i = Math.floor(r), a = O.Utils.CatmullRom;
427
+ var n = e.length - 1, r = n * t, i = Math.floor(r), a = k.Utils.CatmullRom;
285
428
  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
429
  },
287
430
  Utils: {
@@ -289,7 +432,7 @@ var ee = {
289
432
  return (t - e) * n + e;
290
433
  },
291
434
  Bernstein: function(e, t) {
292
- var n = O.Utils.Factorial;
435
+ var n = k.Utils.Factorial;
293
436
  return n(e) / n(t) / n(e - t);
294
437
  },
295
438
  Factorial: (function() {
@@ -306,14 +449,14 @@ var ee = {
306
449
  return (2 * t - 2 * n + a + o) * c + (-3 * t + 3 * n - 2 * a - o) * s + a * i + t;
307
450
  }
308
451
  }
309
- }, k = function() {
452
+ }, A = function() {
310
453
  function e() {}
311
454
  return e.nextId = function() {
312
455
  return e._nextId++;
313
456
  }, e._nextId = 0, e;
314
- }(), A = new D(), j = function() {
457
+ }(), j = new we(), M = function() {
315
458
  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 = 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));
459
+ 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 = 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));
317
460
  }
318
461
  return e.prototype.getId = function() {
319
462
  return this._id;
@@ -331,7 +474,7 @@ var ee = {
331
474
  }, e.prototype.dynamic = function(e) {
332
475
  return e === void 0 && (e = !1), this._isDynamic = e, this;
333
476
  }, e.prototype.start = function(e, t) {
334
- if (e === void 0 && (e = E()), t === void 0 && (t = !1), this._isPlaying) return this;
477
+ if (e === void 0 && (e = O()), t === void 0 && (t = !1), this._isPlaying) return this;
335
478
  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
479
  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
480
  if (this._propertiesAreSetUp = !0, !this._isDynamic) {
@@ -381,9 +524,9 @@ var ee = {
381
524
  }, e.prototype.end = function() {
382
525
  return this._goToEnd = !0, this.update(this._startTime + this._duration), this;
383
526
  }, e.prototype.pause = function(e) {
384
- return e === void 0 && (e = E()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = e, this);
527
+ return e === void 0 && (e = O()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = e, this);
385
528
  }, e.prototype.resume = function(e) {
386
- return e === void 0 && (e = E()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this);
529
+ return e === void 0 && (e = O()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this);
387
530
  }, e.prototype.stopChainedTweens = function() {
388
531
  for (var e = 0, t = this._chainedTweens.length; e < t; e++) this._chainedTweens[e].stop();
389
532
  return this;
@@ -401,9 +544,9 @@ var ee = {
401
544
  }, e.prototype.yoyo = function(e) {
402
545
  return e === void 0 && (e = !1), this._yoyo = e, this;
403
546
  }, e.prototype.easing = function(e) {
404
- return e === void 0 && (e = T.Linear.None), this._easingFunction = e, this;
547
+ return e === void 0 && (e = D.Linear.None), this._easingFunction = e, this;
405
548
  }, e.prototype.interpolation = function(e) {
406
- return e === void 0 && (e = O.Linear), this._interpolationFunction = e, this;
549
+ return e === void 0 && (e = k.Linear), this._interpolationFunction = e, this;
407
550
  }, e.prototype.chain = function() {
408
551
  return this._chainedTweens = [...arguments], this;
409
552
  }, e.prototype.onStart = function(e) {
@@ -420,7 +563,7 @@ var ee = {
420
563
  return this._onStopCallback = e, this;
421
564
  }, e.prototype.update = function(t, n) {
422
565
  var r = this;
423
- if (t === void 0 && (t = E()), n === void 0 && (n = e.autoStartOnUpdate), this._isPaused) return !0;
566
+ if (t === void 0 && (t = O()), n === void 0 && (n = e.autoStartOnUpdate), this._isPaused) return !0;
424
567
  var i;
425
568
  if (!this._goToEnd && !this._isPlaying) if (n) this.start(t, !0);
426
569
  else return !1;
@@ -453,107 +596,107 @@ var ee = {
453
596
  typeof n == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(n) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = t;
454
597
  }, e.autoStartOnUpdate = !1, e;
455
598
  }();
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);
599
+ A.nextId;
600
+ var N = j;
601
+ N.getAll.bind(N), N.removeAll.bind(N), N.add.bind(N), N.remove.bind(N), N.update.bind(N);
459
602
  //#endregion
460
603
  //#region packages/common-core/src/utils/threejs-utils.ts
461
- var N = null;
462
- globalThis.window !== void 0 && import("./dat.gui.module-CSOnFjd0.mjs").then((e) => {
463
- N = e.GUI;
604
+ var P = null;
605
+ globalThis.window !== void 0 && import("./dat.gui.module-B2PXSbre.mjs").then((e) => {
606
+ P = e.GUI;
464
607
  }).catch(() => {});
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 = (t, n, r, i) => {
608
+ var Te = .4, Ee = "#DDDDDD", De = .4, Oe = "#7B7B7B", ke = "#B1B1B1", Ae = "cameraFacingHidden", je = "cameraFacingIndicator", Me = .8, Ne = .9, Pe = (e) => e instanceof m ? e.capabilities.maxSamples : 16, Fe = (e) => e instanceof m ? e.capabilities.maxTextures : 16, Ie = (e) => e instanceof m ? e.capabilities.getMaxAnisotropy() : 16, Le = (t, n, r, i) => {
466
609
  if (!t || !n || r === 0 || i === 0) return new e();
467
610
  let a = t.clone(), o = r / 2, s = i / 2;
468
611
  return a.project(n), a.x = Math.floor(a.x * o + o), a.y = Math.floor(-(a.y * s) + s), a.z = t.distanceTo(n.position), a;
469
- }, ke = (t, n) => {
612
+ }, Re = (t, n) => {
470
613
  n ||= new e(0, 0, 0);
471
614
  let r = new e(t.size.x / 1e3, t.size.z / 1e3, t.size.y / 1e3), i = new e(t.origin.x / 1e3, t.origin.z / 1e3, t.origin.y / -1e3);
472
615
  return new c(new e(0, 0, -r.z).add(i).sub(n), new e(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);
616
+ }, ze = (e) => (e.from /= 1e3, e.to /= 1e3, e), Be = (e, t) => {
617
+ 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);
475
618
  return n === a && r === o && i === s;
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);
619
+ }, Ve = (e, t) => {
620
+ 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);
478
621
  return n === o && r === s && i === c && a === l;
479
- }, Ne = (e, t) => {
480
- let n = S(e.x), r = S(e.y), i = S(t.x), a = S(t.y);
622
+ }, He = (e, t) => {
623
+ let n = w(e.x), r = w(e.y), i = w(t.x), a = w(t.y);
481
624
  return n === i && r === a;
482
- }, Pe = (e) => I(null, e), I = (e, t) => {
483
- e ||= Le(), e.name = t.id ? t.id.toString() : "";
625
+ }, Ue = (e) => F(null, e), F = (e, t) => {
626
+ e ||= Ke(), e.name = t.id ? t.id.toString() : "";
484
627
  let n = t.shading.version === "2" || t.shading.version?.startsWith("2.");
485
- return e = n ? Ie(e, t) : Fe(e, t), e.userData.materialVersion = n ? 2 : 1, e;
486
- }, Fe = (e, t) => {
628
+ return e = n ? Ge(e, t) : We(e, t), e.userData.materialVersion = n ? 2 : 1, e;
629
+ }, We = (e, t) => {
487
630
  t.shading.metallic !== void 0 && (e.metalness = t.shading.metallic === 1 ? 1 : .5, e.reflectivity = _(t.shading.metallic, .5));
488
631
  let n = !1;
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) => {
632
+ 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), I(e.color, t.shading.basecolor), n || t.shading.doubleSided ? e.side = 2 : e.side = 0, e;
633
+ }, Ge = (e, t) => {
491
634
  let n = !1, r = t.shading.transmission && t.shading.transmission > 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;
635
+ 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, I(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, I(e.specularColor, t.shading.specularColor), e.specularIntensity = t.shading.specularity ?? 1, e.roughness = t.shading.roughness ?? 0, e.aoMapIntensity = t.shading.occlusion ?? 1, I(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), I(e.sheenColor, t.shading.sheenColor), e.sheen = t.shading.sheenIntensity ?? 1, e.sheenRoughness = t.shading.sheenRoughness ?? 1, e.thickness = t.shading.thicknessFactor ?? 0;
493
636
  let i = t.shading.attenuationDistance;
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) => {
637
+ return r && i === 0 ? console.warn("invalid attenuation configuration for transmissive material -- Skipping attenuation color and distance configuration in material.") : (I(e.attenuationColor, t.shading.attenuationColor), i != null && (e.attenuationDistance = i)), e.side = n || t.shading.doubleSided ? 2 : 0, e;
638
+ }, Ke = () => E.createMeshPhysicalMaterial({}), qe = (e, t = 1) => t === 2 ? Ye(e) : Je(e), Je = (e) => {
496
639
  let t = {
497
640
  alpha: e.opacity,
498
641
  metallic: e.reflectivity,
499
- basecolor: R(e.color),
642
+ basecolor: L(e.color),
500
643
  roughness: e.roughness,
501
644
  doubleSided: e.side === 2,
502
645
  alphaCutoff: e.alphaTest,
503
646
  transmission: e.transmission
504
647
  };
505
648
  return e.metalness === 1 ? t.metallic = 1 : t.metallic = e.reflectivity, t;
506
- }, Be = (e) => ({
649
+ }, Ye = (e) => ({
507
650
  version: "2.0.0",
508
651
  alpha: e.opacity,
509
652
  alphaCutoff: e.alphaTest,
510
- basecolor: R(e.color),
653
+ basecolor: L(e.color),
511
654
  transmission: e.transmission,
512
655
  transmissionIOR: e.ior,
513
656
  metallic: e.metalness,
514
657
  doubleSided: e.side === 2,
515
- specularColor: R(e.specularColor),
658
+ specularColor: L(e.specularColor),
516
659
  specularity: e.specularIntensity,
517
660
  roughness: e.roughness,
518
661
  occlusion: e.aoMapIntensity,
519
- emissiveColor: R(e.emissive),
662
+ emissiveColor: L(e.emissive),
520
663
  emissiveIntensity: e.emissiveIntensity,
521
664
  clearcoatIntensity: e.clearcoat,
522
665
  clearcoatRoughness: e.clearcoatRoughness,
523
666
  clearcoatNormalScale: e.clearcoatNormalScale.x,
524
- sheenColor: R(e.sheenColor),
667
+ sheenColor: L(e.sheenColor),
525
668
  sheenIntensity: e.sheen,
526
669
  sheenRoughness: e.sheenRoughness,
527
670
  thicknessFactor: e.thickness,
528
- attenuationColor: R(e.attenuationColor),
671
+ attenuationColor: L(e.attenuationColor),
529
672
  attenuationDistance: e.attenuationDistance
530
- }), L = (e, t) => {
673
+ }), I = (e, t) => {
531
674
  if (t !== void 0) {
532
675
  let n = new p(t.r, t.g, t.b);
533
676
  e.copy(n.convertSRGBToLinear());
534
677
  }
535
- }, R = (e) => {
678
+ }, L = (e) => {
536
679
  let t = e.clone().convertLinearToSRGB();
537
680
  return {
538
681
  r: t.r,
539
682
  g: t.g,
540
683
  b: t.b
541
684
  };
542
- }, z = null, Ve = (e, t, n, r, i, a, o = 16) => {
543
- z || (z = new l(), z.crossOrigin = "");
544
- let s = z;
685
+ }, R = null, Xe = (e, t, n, r, i, a, o = 16) => {
686
+ R || (R = new l(), R.crossOrigin = "");
687
+ let s = R;
545
688
  return new Promise((c, l) => {
546
689
  if (!e) {
547
690
  console.warn("trying to add a texture without image", t), c();
548
691
  return;
549
692
  }
550
693
  s.load(e, (e) => {
551
- B(e, t, n, r, i, a, o), c();
694
+ z(e, t, n, r, i, a, o), c();
552
695
  }, (e) => {
553
696
  l(e);
554
697
  });
555
698
  });
556
- }, B = (e, t, r, i, a, o, s = 16) => {
699
+ }, z = (e, t, r, i, a, o, s = 16) => {
557
700
  if (e.anisotropy = i, e.wrapS = n, e.wrapT = n, s <= 8 && [
558
701
  g.ORM,
559
702
  g.EMRGB,
@@ -566,48 +709,48 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
566
709
  console.warn("ORM maps are not supported on devices with only " + s + " texture units");
567
710
  return;
568
711
  }
569
- e.repeat.set(a, o), He(e, t, r), t.mapping === g.RGBA && (r.transparent = !0, r.userData.materialVersion === 1 && r.name.includes("glow") && (r.emissiveIntensity = .5, r.emissive = new p(16777215), r.emissiveMap = r.map)), r.needsUpdate = !0;
570
- }, He = (e, n, r) => {
712
+ e.repeat.set(a, o), Ze(e, t, r), t.mapping === g.RGBA && (r.transparent = !0, r.userData.materialVersion === 1 && r.name.includes("glow") && (r.emissiveIntensity = .5, r.emissive = new p(16777215), r.emissiveMap = r.map)), r.needsUpdate = !0;
713
+ }, Ze = (e, n, r) => {
571
714
  n.mapping === g.XYZ ? r.normalMap = e : n.mapping === g.ORM ? (r.aoMap = e, r.roughnessMap = e, r.metalnessMap = e) : n.mapping === g.EMRGB ? r.emissiveMap = e : n.mapping === g.CCRG ? (r.clearcoatMap = e, r.clearcoatRoughnessMap = e) : n.mapping === g.CCXYZ ? r.clearcoatNormalMap = e : n.mapping === g.SHRGBA ? (r.sheenColorMap = e, r.sheenRoughnessMap = e) : n.mapping === g.SPRGBA ? (r.specularColorMap = e, r.specularIntensityMap = e) : n.mapping === g.TTRG ? (r.transmissionMap = e, r.thicknessMap = e) : (e.colorSpace = t, r.map = e);
572
- }, Ue = (e = !0) => {
715
+ }, Qe = (e = !0) => {
573
716
  if (!window.__RML_WEBGL_GUI__) {
574
- if (!N) return null;
717
+ if (!P) return null;
575
718
  try {
576
- window.__RML_WEBGL_GUI__ = new N({ autoPlace: e });
719
+ window.__RML_WEBGL_GUI__ = new P({ autoPlace: e });
577
720
  } catch {
578
721
  return null;
579
722
  }
580
723
  }
581
724
  return window.__RML_WEBGL_GUI__;
582
- }, V = (e, t, n) => {
725
+ }, B = (e, t, n) => {
583
726
  let r;
584
727
  if (t.wallType.value === v.OuterWallRight && (r = h(t.rightNormal)), t.wallType.value === v.OuterWallLeft && (r = h(t.leftNormal)), !r) return !0;
585
728
  let i = h(n).applyMatrix4(e.matrixWorldInverse);
586
729
  return r = r.transformDirection(e.matrixWorldInverse), i.dot(r) >= 0;
587
- }, H = (e) => {
730
+ }, V = (e) => {
588
731
  let t = e?.getPlanElement();
589
732
  return !t || !("getAttachedWall" in t) ? null : t.getAttachedWall();
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);
733
+ }, H = (e, t) => !e || !t ? !1 : typeof e.getId == "function" && typeof t.getId == "function" ? e.getId() === t.getId() : e === t, $e = (e, t, n = [], r = null, i = !1) => {
734
+ let a = !1, o = V(r);
592
735
  for (let n of t) {
593
- let t = !(U(n.getPlanElement(), o) || V(e, n.getKernelObject(), n.getPlanElement().getCenter()));
736
+ let t = !(H(n.getPlanElement(), o) || B(e, n.getKernelObject(), n.getPlanElement().getCenter()));
594
737
  t !== n.isHiddenByCameraFacing() && (a = !0), n.setHiddenByCameraFacing(t);
595
738
  }
596
739
  for (let t of n) {
597
- let n = t.getPlanElement(), r = H(t);
740
+ let n = t.getPlanElement(), r = V(t);
598
741
  if (!n || !r) continue;
599
742
  let s = n.getObjectCategory?.().value;
600
743
  if (s !== y.DOOR && s !== y.WINDOW) continue;
601
- let c = U(r, o) || V(e, r, r.getCenter()), l = t.getContainer().visible;
744
+ let c = H(r, o) || B(e, r, r.getCenter()), l = t.getContainer().visible;
602
745
  t.setHiddenByCameraFacing(!c && !i), l !== t.getContainer().visible && (a = !0);
603
746
  }
604
747
  return a;
605
- }, Ge = (e, t, n = !0) => {
748
+ }, et = (e, t, n = !0) => {
606
749
  if (!e.userData.tween) if (t) if (e.transparent = !0, !n) e.opacity = .2;
607
750
  else {
608
751
  let t = { opacity: 1 };
609
752
  e.userData.tween = !0;
610
- let n = new j(t).to({ opacity: .2 }, 400).easing(T.Sinusoidal.In).onUpdate(() => {
753
+ let n = new M(t).to({ opacity: .2 }, 400).easing(D.Sinusoidal.In).onUpdate(() => {
611
754
  e.opacity = t.opacity;
612
755
  }).onComplete(() => {
613
756
  e.userData.tween = !1, window.TWEEN?.remove(n);
@@ -618,47 +761,47 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
618
761
  else {
619
762
  let t = { opacity: .2 };
620
763
  e.userData.tween = !0;
621
- let n = new j(t).to({ opacity: 1 }, 400).easing(T.Sinusoidal.In).onUpdate(() => {
764
+ let n = new M(t).to({ opacity: 1 }, 400).easing(D.Sinusoidal.In).onUpdate(() => {
622
765
  e.opacity = t.opacity;
623
766
  }).onComplete(() => {
624
767
  e.transparent = !1, e.userData.tween = !1, window.TWEEN?.remove(n);
625
768
  }).start();
626
769
  window.TWEEN?.add(n);
627
770
  }
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();
771
+ }, tt = (e, t, n, r, i, a) => {
772
+ let o = nt(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(D.Quadratic.InOut).onUpdate(() => {
773
+ let n = rt(l, u, d.t);
774
+ W(e, i.clone().multiply(o).multiply(n).multiply(t)), a && a();
632
775
  }).onComplete(() => {
633
- G(e, s), a && a(), window.TWEEN?.remove(f);
776
+ W(e, s), a && a(), window.TWEEN?.remove(f);
634
777
  }).onStop(() => {
635
778
  window.TWEEN?.remove(f);
636
779
  }).start();
637
780
  return window.TWEEN?.add(f), f;
638
- }, qe = (t, n) => {
781
+ }, nt = (t, n) => {
639
782
  let i = t.clone().invert().clone().multiply(n), a = new e(), s = new r();
640
783
  i.decompose(a, s, new e());
641
- let c = W(s), l = c.axis;
784
+ let c = U(s), l = c.axis;
642
785
  if (a.length() < .001 || Math.abs(c.angleRad) < .001 || l.length() < .001) return new o().identity();
643
786
  let u = new e().setFromMatrixPosition(t), d = new e().setFromMatrixPosition(n), f = u.clone().sub(d), p = f.length(), m = new e().crossVectors(l, f).normalize();
644
787
  f = new e().crossVectors(m, l).normalize();
645
788
  let h = u.clone().add(d).multiplyScalar(.5);
646
789
  return h = h.sub(m.clone().multiplyScalar(p * .5 / Math.tan(c.angleRad * .5))), new o().makeBasis(m, l, f).setPosition(h);
647
- }, W = (t) => {
790
+ }, U = (t) => {
648
791
  let n = Math.sqrt(1 - t.w * t.w);
649
792
  return {
650
793
  axis: new e(t.x, t.y, t.z).multiplyScalar(n === 0 ? 1 : 1 / n),
651
794
  angleRad: 2 * Math.acos(t.w)
652
795
  };
653
- }, G = (e, t) => {
796
+ }, W = (e, t) => {
654
797
  e.updateMatrix(), t.multiply(e.matrix.clone().invert()), e.applyMatrix4(t), e.updateMatrix();
655
- }, Je = (t, n, i) => {
798
+ }, rt = (t, n, i) => {
656
799
  let a = new e(), s = new r(), c = new e();
657
800
  t.decompose(a, s, c);
658
801
  let l = new e(), u = new r(), d = new e();
659
802
  n.decompose(l, u, d);
660
- let f = new e().lerpVectors(a, l, i), p = new r().slerpQuaternions(s, u, i), m = W(s.clone().conjugate().multiply(u));
661
- if (m.angleRad > Math.PI && (m.angleRad -= 2 * Math.PI), Math.abs(m.angleRad) > b(1) && a.length() > .001 && l.length() > .001) {
803
+ let f = new e().lerpVectors(a, l, i), p = new r().slerpQuaternions(s, u, i), m = U(s.clone().conjugate().multiply(u));
804
+ if (m.angleRad > Math.PI && (m.angleRad -= 2 * Math.PI), Math.abs(m.angleRad) > S(1) && a.length() > .001 && l.length() > .001) {
662
805
  let t = a.clone().normalize().dot(l.clone().normalize());
663
806
  if (Math.abs(t) < .999) {
664
807
  let n = new e().crossVectors(a, l), o = new r().setFromAxisAngle(n.normalize(), Math.acos(t) * i), s = a.length() * i + l.length() * (1 - i);
@@ -667,29 +810,29 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
667
810
  }
668
811
  let h = new e().lerpVectors(c, d, i), g = new o();
669
812
  return g.compose(f, p, h), g;
670
- }, Ye = (e) => {
813
+ }, it = (e) => {
671
814
  let t = new p();
672
815
  return t.setRGB((e >> 16) / 255, (e >> 8 & 255) / 255, (e >> 0 & 255) / 255), t;
673
- }, K = (e, t) => {
816
+ }, G = (e, t) => {
674
817
  t.transparent || (e.transparent = t.transparent, delete e.userData.postProcessingMaterialPlugin), e.opacity = t.opacity, e.needsUpdate = !0;
675
- }, Xe = (e, t) => new Promise((n) => {
818
+ }, at = (e, t) => new Promise((n) => {
676
819
  e.traverse((e) => {
677
820
  if (e instanceof u) {
678
821
  let r = e.material;
679
822
  e.userData.tween && e.userData.tween.stop();
680
823
  let i = { opacity: r.opacity };
681
824
  t.transparent && (r.transparent = t.transparent);
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(() => {
825
+ let a = new M(i);
826
+ a.toJSON = () => void 0, e.userData.tween = a, window.TWEEN?.add(a.to(t, 250).easing(D.Linear.None).onUpdate(() => {
684
827
  r.opacity = i.opacity;
685
828
  }).onStop(() => {
686
- K(r, t), e.userData.tween = void 0;
829
+ G(r, t), e.userData.tween = void 0;
687
830
  }).onComplete(() => {
688
- K(r, t), e.userData.tween = void 0, window.TWEEN?.remove(a), n();
831
+ G(r, t), e.userData.tween = void 0, window.TWEEN?.remove(a), n();
689
832
  }).start());
690
833
  }
691
834
  });
692
- }), Ze = (e) => {
835
+ }), ot = (e) => {
693
836
  e.traverse((e) => {
694
837
  if (e instanceof u) {
695
838
  let t = e.material;
@@ -702,7 +845,7 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
702
845
  transparent: t.transparent
703
846
  };
704
847
  t.transparent = n.transparent, t.opacity = n.opacity;
705
- let i = new j(n).to(r, 500).easing(T.Linear.None).onUpdate(() => {
848
+ let i = new M(n).to(r, 500).easing(D.Linear.None).onUpdate(() => {
706
849
  t.opacity = n.opacity;
707
850
  }).onComplete(() => {
708
851
  t.transparent = r.transparent, window.TWEEN?.remove(i);
@@ -710,101 +853,94 @@ var ve = .4, P = "#DDDDDD", F = .4, ye = "#7B7B7B", be = "#B1B1B1", xe = "camera
710
853
  window.TWEEN?.add(i);
711
854
  }
712
855
  });
713
- }, Qe = (t, n) => {
856
+ }, st = (t, n) => {
714
857
  let r = new c().setFromObject(t), i = r.getSize(new e()), a = Math.min(i.x, i.y, i.z), o = !0;
715
858
  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;
716
- }, $e = (e) => {
717
- e.type === "Mesh" ? J(e) : q(e);
718
- }, q = (e) => {
859
+ }, ct = (e) => {
860
+ e.type === "Mesh" ? q(e) : K(e);
861
+ }, K = (e) => {
719
862
  !e || !e.children || e.children.length === 0 || e.children.forEach((e) => {
720
- J(e);
863
+ q(e);
721
864
  });
722
- }, J = (e) => {
865
+ }, q = (e) => {
723
866
  if (e) {
724
867
  try {
725
- e.material && X(e.material);
868
+ e.material && Y(e.material);
726
869
  } catch (e) {
727
870
  console.warn("disposeMesh: material dispose failed", e);
728
871
  }
729
872
  try {
730
- e.geometry && Y(e.geometry);
873
+ e.geometry && J(e.geometry);
731
874
  } catch (e) {
732
875
  console.warn("disposeMesh: geometry dispose failed", e);
733
876
  }
734
877
  try {
735
- e.children && e.children.length > 0 && q(e);
878
+ e.children && e.children.length > 0 && K(e);
736
879
  } catch (e) {
737
880
  console.warn("disposeMesh: child dispose failed", e);
738
881
  }
739
882
  }
740
- }, Y = (e) => {
883
+ }, J = (e) => {
741
884
  e && e.dispose();
742
- }, X = (e) => {
885
+ }, Y = (e) => {
743
886
  e && (e.map && e.map.dispose(), e.normalMap && e.normalMap.dispose(), e.dispose());
744
- }, Z, et = () => (Z || (Z = new d(), Z.visible = !1), Z), Q, tt = (e) => (Q ||= w.createMeshStandardMaterial({
887
+ }, X, lt = () => (X || (X = new d(), X.visible = !1), X), Z, ut = (e) => (Z ||= E.createMeshStandardMaterial({
745
888
  color: e || "#FF0000",
746
889
  transparent: !0,
747
890
  opacity: .5,
748
891
  visible: !0,
749
892
  polygonOffset: !0,
750
893
  polygonOffsetFactor: -1
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) => {
894
+ }), Z), dt = (e) => e.x === 0 && e.y === 0 && e.z === 0, ft = (e) => Number.isFinite(e.x) && Number.isFinite(e.y) && Number.isFinite(e.z), pt = (e, t) => {
752
895
  let n = "";
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
- }, $ = (t) => {
896
+ 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);
897
+ }, mt = (t) => {
755
898
  let n = t.getWorldDirection(new e()).clone();
756
899
  n.y = 0, n.lengthSq() < .01 && (n = new e(0, 1, 0), n.applyQuaternion(t.quaternion), n.y = 0), n.normalize();
757
900
  let r = Math.asin(n.x);
758
901
  return n.z < 0 && (r = Math.PI - r), r < 0 && (r += Math.PI * 2), r;
759
- }, at = (e, t) => {
902
+ }, Q = (e, t) => {
760
903
  if (!e || !t) return 0;
761
904
  let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
762
905
  return r && n || !r && !n ? 0 : n ? 1 : -1;
763
- }, ot = (e, t) => {
764
- if (!e || !t) return 0;
765
- let n = e.clone().expandByScalar(.001).containsBox(t), r = t.clone().expandByScalar(.001).containsBox(e);
766
- if (r && n) return 0;
767
- if (!r && !n) {
768
- let n = st(e, t);
769
- return n === .5 ? 0 : n > .5 ? -1 : 1;
770
- }
771
- return n ? 1 : -1;
772
- }, st = (t, n) => {
773
- let r = new c();
774
- if (r.copy(t).intersect(n), r.isEmpty()) return 0;
775
- let i = (t) => {
776
- let n = new e();
777
- return t.getSize(n), n.x * n.y * n.z;
778
- }, a = i(t), o = i(r);
779
- return a === 0 ? 0 : o / a;
780
- }, ct = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, lt = (t, n, r, i = 1) => {
906
+ }, $ = (t) => {
907
+ if (t.isEmpty()) return 0;
908
+ let { x: n, y: r, z: i } = t.getSize(new e());
909
+ return n * r * i;
910
+ }, ht = (e, t) => {
911
+ let n = Q(t, e);
912
+ if (n !== 0) return n > 0;
913
+ if (t.clone().expandByScalar(.001).containsBox(e)) return !1;
914
+ let r = $(e);
915
+ return r === 0 || r >= $(t) ? !1 : $(e.clone().intersect(t)) / r > .5;
916
+ }, gt = (e) => e[0] === 1 && e[1] === 0 && e[2] === 0 && e[3] === 1 && e[4] === 0 && e[5] === 0, _t = (t, n, r, i = 1) => {
781
917
  let a = n > r, o = a ? 15 : 0, s = a ? 0 : 10, l = t.getSize(new e()), u = t.getCenter(new e()), d = l.x > 2 * o ? l.x / 2 : o, f = l.z > 2 * s ? l.z / 2 : s;
782
918
  return d *= i, f *= i, new c(new e(u.x - d, u.y, u.z - f), new e(u.x + d, u.y, u.z + f));
783
- }, ut = (e) => {
919
+ }, vt = (e) => {
784
920
  let { x: t, y: n } = e;
785
921
  return {
786
922
  x: t,
787
923
  y: n
788
924
  };
789
- }, dt = (e) => {
925
+ }, yt = (e) => {
790
926
  let { x: t, y: n, z: r } = e;
791
927
  return {
792
928
  x: t,
793
929
  y: n,
794
930
  z: r
795
931
  };
796
- }, ft = (e) => {
932
+ }, bt = (e) => {
797
933
  let t = new i();
798
934
  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;
799
- }, pt = (t, n) => {
935
+ }, xt = (t, n) => {
800
936
  let r = new s(), i = new o().multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse);
801
937
  r.setFromProjectionMatrix(i);
802
938
  let a = n.getCenter(new e());
803
939
  return r.containsPoint(a);
804
- }, mt = (e) => {
940
+ }, St = (e) => {
805
941
  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 ");
806
942
  };
807
943
  //#endregion
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 };
944
+ export { D as $, Pe as A, ee as At, ze as B, lt as C, oe as Ct, pt as D, te as Dt, _t as E, y as Et, $e as F, F as G, He as H, xt as I, vt as J, W as K, ht as L, Le as M, v as Mt, Qe as N, qe as O, ae as Ot, mt as P, dt as Q, gt as R, ot as S, ce as St, ut as T, se as Tt, Be as U, St as V, Ve as W, at as X, yt as Y, ft as Z, ct as _, de as _t, De as a, xe as at, q as b, b as bt, Te as c, ve as ct, Xe as d, he as dt, we as et, tt as f, ye as ft, Ue as g, me as gt, bt as h, pe as ht, Ne as i, Se as it, Fe as j, ne as jt, Ie as k, ie as kt, Ee as l, _e as lt, Q as m, S as mt, je as n, E as nt, Oe as o, T as ot, st as p, C as pt, et as q, Me as r, Ce as rt, ke as s, be as st, Ae as t, M as tt, z as u, ge as ut, J as v, fe as vt, it as w, re as wt, K as x, le as xt, Y as y, x as yt, Re as z };
809
945
 
810
- //# sourceMappingURL=threejs-utils-CMmJiCGK.mjs.map
946
+ //# sourceMappingURL=threejs-utils-DHTRY4yW.mjs.map