@roomle/web-sdk 5.1.0-alpha.6 → 5.1.0-alpha.8

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 (133) hide show
  1. package/lib/{BufferGeometry-CxlpBjLq.mjs → BufferGeometry-BnAxBdk5.mjs} +2 -2
  2. package/lib/{BufferGeometry-CxlpBjLq.mjs.map → BufferGeometry-BnAxBdk5.mjs.map} +1 -1
  3. package/lib/ConfiguratorKernel.wasm +0 -0
  4. package/lib/{GLTFExporter-DeNw0qAI.mjs → GLTFExporter-nbgAo4jg.mjs} +1 -1
  5. package/lib/{GLTFExporter-DeNw0qAI.mjs.map → GLTFExporter-nbgAo4jg.mjs.map} +1 -1
  6. package/lib/{GaussianBlurNode-BR1cKBsX.mjs → GaussianBlurNode-CkEuIVaV.mjs} +3 -3
  7. package/lib/{GaussianBlurNode-BR1cKBsX.mjs.map → GaussianBlurNode-CkEuIVaV.mjs.map} +1 -1
  8. package/lib/{Object3D-CALIQdg1.mjs → Object3D-DWcwDaGD.mjs} +1 -1
  9. package/lib/{Object3D-CALIQdg1.mjs.map → Object3D-DWcwDaGD.mjs.map} +1 -1
  10. package/lib/{PointLightHelper-C_0CYp7R.mjs → PointLightHelper-B9jI7cpI.mjs} +4 -4
  11. package/lib/{PointLightHelper-C_0CYp7R.mjs.map → PointLightHelper-B9jI7cpI.mjs.map} +1 -1
  12. package/lib/RoomleCore.wasm +0 -0
  13. package/lib/RoomleToolsCore.wasm +0 -0
  14. package/lib/{SpotLightHelper-UUIHn43T.mjs → SpotLightHelper-DYKh1Ufq.mjs} +3 -3
  15. package/lib/{SpotLightHelper-UUIHn43T.mjs.map → SpotLightHelper-DYKh1Ufq.mjs.map} +1 -1
  16. package/lib/{USDZExporter-BBNw7Hey.mjs → USDZExporter-DxfFzy9g.mjs} +2 -2
  17. package/lib/{USDZExporter-BBNw7Hey.mjs.map → USDZExporter-DxfFzy9g.mjs.map} +1 -1
  18. package/lib/{Vector4-BOcWTZJI.mjs → Vector4-BaGMLJRJ.mjs} +2 -2
  19. package/lib/{Vector4-BOcWTZJI.mjs.map → Vector4-BaGMLJRJ.mjs.map} +1 -1
  20. package/lib/{api-ClfVJAUd.mjs → api-CNS40jV7.mjs} +2 -2
  21. package/lib/{api-ClfVJAUd.mjs.map → api-CNS40jV7.mjs.map} +1 -1
  22. package/lib/{asset-loader.worker-CzI1oyTY.mjs → asset-loader.worker-CE4O0JU-.mjs} +1 -1
  23. package/lib/asset-loader.worker-CE4O0JU-.mjs.map +1 -0
  24. package/lib/{banana-for-scale-Cf41yXTl.mjs → banana-for-scale-DQIiLvlJ.mjs} +3 -3
  25. package/lib/{banana-for-scale-Cf41yXTl.mjs.map → banana-for-scale-DQIiLvlJ.mjs.map} +1 -1
  26. package/lib/{budgeteer.sw-D80jTmYa.mjs → budgeteer.sw-yR2xApHT.mjs} +1 -1
  27. package/lib/budgeteer.sw-yR2xApHT.mjs.map +1 -0
  28. package/lib/{common-utils-OTJQGohe.mjs → common-utils-Cn03WfRo.mjs} +1 -1
  29. package/lib/{common-utils-OTJQGohe.mjs.map → common-utils-Cn03WfRo.mjs.map} +1 -1
  30. package/lib/{component-raycast-helper-CnpnRaFg.mjs → component-raycast-helper-CTx3r9Si.mjs} +4 -4
  31. package/lib/{component-raycast-helper-CnpnRaFg.mjs.map → component-raycast-helper-CTx3r9Si.mjs.map} +1 -1
  32. package/lib/configurator-DsD-u9YC.mjs +2 -0
  33. package/lib/{configurator-BM31Kt-5.mjs → configurator-eoTp9VBB.mjs} +4 -4
  34. package/lib/{configurator-BM31Kt-5.mjs.map → configurator-eoTp9VBB.mjs.map} +1 -1
  35. package/lib/{continuous-drawing-helper-CTfGRTfH.mjs → continuous-drawing-helper-BPe83b9-.mjs} +2 -2
  36. package/lib/{continuous-drawing-helper-CTfGRTfH.mjs.map → continuous-drawing-helper-BPe83b9-.mjs.map} +1 -1
  37. package/lib/{dat.gui.module-CSOnFjd0.mjs → dat.gui.module-B2PXSbre.mjs} +1 -1
  38. package/lib/{dat.gui.module-CSOnFjd0.mjs.map → dat.gui.module-B2PXSbre.mjs.map} +1 -1
  39. package/lib/{decorate-Bl-JF_YY.mjs → decorate-CjaqqbUP.mjs} +1 -1
  40. package/lib/{decorate-Bl-JF_YY.mjs.map → decorate-CjaqqbUP.mjs.map} +1 -1
  41. package/lib/{dimensioning-helper-DSlkLDmx.mjs → dimensioning-helper-WQTVJpxQ.mjs} +4 -4
  42. package/lib/{dimensioning-helper-DSlkLDmx.mjs.map → dimensioning-helper-WQTVJpxQ.mjs.map} +1 -1
  43. package/lib/dimensioning-helper-v3HsrygN.mjs +2 -0
  44. package/lib/{dist-BZTF7IJN.mjs → dist-Blgk0vU0.mjs} +1 -1
  45. package/lib/{dist-BZTF7IJN.mjs.map → dist-Blgk0vU0.mjs.map} +1 -1
  46. package/lib/{fflate.module-Cx1QFI2-.mjs → fflate.module-DTkA0kF8.mjs} +1 -1
  47. package/lib/{fflate.module-Cx1QFI2-.mjs.map → fflate.module-DTkA0kF8.mjs.map} +1 -1
  48. package/lib/{glb-viewer-B2si39v2.mjs → glb-viewer-BMN5bmtQ.mjs} +6 -6
  49. package/lib/{glb-viewer-B2si39v2.mjs.map → glb-viewer-BMN5bmtQ.mjs.map} +1 -1
  50. package/lib/glb-viewer-yvDgqhGa.mjs +2 -0
  51. package/lib/{highlight-coordinator-DU6oFunq.mjs → highlight-coordinator-VvPNsuCv.mjs} +10 -10
  52. package/lib/{highlight-coordinator-DU6oFunq.mjs.map → highlight-coordinator-VvPNsuCv.mjs.map} +1 -1
  53. package/lib/{homag-intelligence-CSBo-iks.mjs → homag-intelligence-BaZMJh4H.mjs} +3 -3
  54. package/lib/{homag-intelligence-CSBo-iks.mjs.map → homag-intelligence-BaZMJh4H.mjs.map} +1 -1
  55. package/lib/{hosek-wilkie-sky-DmTvnxMA.mjs → hosek-wilkie-sky-CZX3Q53j.mjs} +3 -3
  56. package/lib/{hosek-wilkie-sky-DmTvnxMA.mjs.map → hosek-wilkie-sky-CZX3Q53j.mjs.map} +1 -1
  57. package/lib/{imos-ix-poc-export-helper-BGN97m8W.mjs → imos-ix-poc-export-helper-CSuMX4o4.mjs} +3 -3
  58. package/lib/{imos-ix-poc-export-helper-BGN97m8W.mjs.map → imos-ix-poc-export-helper-CSuMX4o4.mjs.map} +1 -1
  59. package/lib/{kernel-utils-BYKmP0mf.mjs → kernel-utils-BwJOfYWh.mjs} +1 -1
  60. package/lib/{kernel-utils-BYKmP0mf.mjs.map → kernel-utils-BwJOfYWh.mjs.map} +1 -1
  61. package/lib/{layer-DRMDGxT7.mjs → layer-PJGxbJOI.mjs} +1 -1
  62. package/lib/{layer-DRMDGxT7.mjs.map → layer-PJGxbJOI.mjs.map} +1 -1
  63. package/lib/{material-viewer-C2Pj4-II.mjs → material-viewer-0urPSGjB.mjs} +6 -6
  64. package/lib/{material-viewer-C2Pj4-II.mjs.map → material-viewer-0urPSGjB.mjs.map} +1 -1
  65. package/lib/{packages-C0xavGqP.mjs → packages-HyyuVpoW.mjs} +5 -5
  66. package/lib/{packages-C0xavGqP.mjs.map → packages-HyyuVpoW.mjs.map} +1 -1
  67. package/lib/{planner-C1KkZRGk.mjs → planner-BAAunRfK.mjs} +3 -3
  68. package/lib/{planner-C1KkZRGk.mjs.map → planner-BAAunRfK.mjs.map} +1 -1
  69. package/lib/planner-C05yEzOU.mjs +2 -0
  70. package/lib/{plugin-system-CPf99Zkf.mjs → plugin-system-BSLY3o0a.mjs} +3 -3
  71. package/lib/{plugin-system-CPf99Zkf.mjs.map → plugin-system-BSLY3o0a.mjs.map} +1 -1
  72. package/lib/{roomle-headless-setup-ps3I0vOP.mjs → roomle-headless-setup-DbO_rLjK.mjs} +1 -1
  73. package/lib/{roomle-headless-setup-ps3I0vOP.mjs.map → roomle-headless-setup-DbO_rLjK.mjs.map} +1 -1
  74. package/lib/roomle-headless.d.ts +1766 -297
  75. package/lib/roomle-headless.js +16 -16
  76. package/lib/{roomle-renderer-UJINLYxS.mjs → roomle-renderer-nCUrLU_S.mjs} +1 -1
  77. package/lib/roomle-renderer-nCUrLU_S.mjs.map +1 -0
  78. package/lib/{roomle-sdk-BhHLCbgP.mjs → roomle-sdk-gECTnB0n.mjs} +4231 -3791
  79. package/lib/roomle-sdk-gECTnB0n.mjs.map +1 -0
  80. package/lib/roomle-sdk.d.ts +1746 -277
  81. package/lib/roomle-sdk.js +8 -8
  82. package/lib/{roomle-webgpu-renderer-BSvxbopA.mjs → roomle-webgpu-renderer-dKboJY9a.mjs} +7 -7
  83. package/lib/{roomle-webgpu-renderer-BSvxbopA.mjs.map → roomle-webgpu-renderer-dKboJY9a.mjs.map} +1 -1
  84. package/lib/{scene-renderer--DzrpIl_.mjs → scene-renderer-CoPV8z_q.mjs} +362 -345
  85. package/lib/scene-renderer-CoPV8z_q.mjs.map +1 -0
  86. package/lib/{script-loader-BHniYj5b.mjs → script-loader-LvvacdJd.mjs} +3 -3
  87. package/lib/{script-loader-BHniYj5b.mjs.map → script-loader-LvvacdJd.mjs.map} +1 -1
  88. package/lib/{shading-settings-6v-7O_Sz.mjs → shading-settings-dogROhBy.mjs} +2 -2
  89. package/lib/{shading-settings-6v-7O_Sz.mjs.map → shading-settings-dogROhBy.mjs.map} +1 -1
  90. package/lib/src-D2lqGogG.mjs +2 -0
  91. package/lib/{src-Dg0wYIom.mjs → src-DRuHdK6i.mjs} +1 -1
  92. package/lib/{src-Dg0wYIom.mjs.map → src-DRuHdK6i.mjs.map} +1 -1
  93. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  94. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  95. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  96. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  97. package/lib/{stats-helper-DYjPPDnz.mjs → stats-helper-CESAA1or.mjs} +3 -3
  98. package/lib/{stats-helper-DYjPPDnz.mjs.map → stats-helper-CESAA1or.mjs.map} +1 -1
  99. package/lib/{svgo.browser-xZ3L7awG.mjs → svgo.browser-EB1zkPfG.mjs} +1 -1
  100. package/lib/{svgo.browser-xZ3L7awG.mjs.map → svgo.browser-EB1zkPfG.mjs.map} +1 -1
  101. package/lib/{three.tsl-DtfvggFX.mjs → three.tsl-CuZzrviK.mjs} +1 -1
  102. package/lib/{three.tsl-De6A-G56.mjs → three.tsl-kYk-mr3-.mjs} +2 -2
  103. package/lib/{three.tsl-De6A-G56.mjs.map → three.tsl-kYk-mr3-.mjs.map} +1 -1
  104. package/lib/{three.webgpu-B1OhMci_.mjs → three.webgpu-D11YJG2U.mjs} +1 -1
  105. package/lib/{three.webgpu-wPiwbpFM.mjs → three.webgpu-DTO8skiU.mjs} +1 -1
  106. package/lib/{three.webgpu-wPiwbpFM.mjs.map → three.webgpu-DTO8skiU.mjs.map} +1 -1
  107. package/lib/{threejs-utils-lVSsgAiQ.mjs → threejs-utils-Dpa_VhZx.mjs} +243 -100
  108. package/lib/threejs-utils-Dpa_VhZx.mjs.map +1 -0
  109. package/lib/{tools-core-QUdVgS4n.mjs → tools-core-BwoUD8EO.mjs} +3 -3
  110. package/lib/{tools-core-QUdVgS4n.mjs.map → tools-core-BwoUD8EO.mjs.map} +1 -1
  111. package/lib/{webgpu-BxYJfBjz.mjs → webgpu-zcxAHKs3.mjs} +4 -4
  112. package/lib/{webgpu-BxYJfBjz.mjs.map → webgpu-zcxAHKs3.mjs.map} +1 -1
  113. package/lib/workers-B-AqdQMe.mjs +6 -0
  114. package/lib/{workers-B_wmKVL0.mjs.map → workers-B-AqdQMe.mjs.map} +1 -1
  115. package/package.json +6 -15
  116. package/lib/asset-loader.worker-CzI1oyTY.mjs.map +0 -1
  117. package/lib/budgeteer.sw-D80jTmYa.mjs.map +0 -1
  118. package/lib/component-dimensioning-yPK46Y5o.mjs +0 -169
  119. package/lib/component-dimensioning-yPK46Y5o.mjs.map +0 -1
  120. package/lib/configurator-CRQg04Bp.mjs +0 -2
  121. package/lib/dimensioning-helper-CQlesi-m.mjs +0 -2
  122. package/lib/glb-viewer-DWybhP87.mjs +0 -2
  123. package/lib/planner-DJE5aZXG.mjs +0 -2
  124. package/lib/render-cache-CPppt7Rd.mjs +0 -150
  125. package/lib/render-cache-CPppt7Rd.mjs.map +0 -1
  126. package/lib/render-order-a0QAbB7Q.mjs +0 -26
  127. package/lib/render-order-a0QAbB7Q.mjs.map +0 -1
  128. package/lib/roomle-renderer-UJINLYxS.mjs.map +0 -1
  129. package/lib/roomle-sdk-BhHLCbgP.mjs.map +0 -1
  130. package/lib/scene-renderer--DzrpIl_.mjs.map +0 -1
  131. package/lib/src-6KtBPZXp.mjs +0 -2
  132. package/lib/threejs-utils-lVSsgAiQ.mjs.map +0 -1
  133. package/lib/workers-B_wmKVL0.mjs +0 -6
@@ -1,25 +1,42 @@
1
- import { j as e } from "./threejs-utils-lVSsgAiQ.mjs";
2
- import { Ai as t, Ar as n, Bt as r, Di as i, Dn as a, E as o, Ei as s, Er as c, Gr as l, Ht as u, J as d, Jt as f, Kn as p, Kr as m, Pr as h, S as g, Ti as _, V as v, Y as ee, Z as y, _i as b, _n as te, at as ne, ci as re, cn as x, ct as S, dn as ie, f as ae, gi as C, gn as oe, h as se, hn as ce, ht as le, ii as w, jn as ue, kn as de, li as fe, ln as T, mt as pe, pn as me, st as he, tn as ge, un as E, vn as _e, w as D, xn as O, y as ve, yi as ye, z as k } from "./three.core-BTUCraWz.mjs";
3
- import { r as be } from "./three.module-DUSFrLM6.mjs";
4
- import { C as A, D as xe, E as Se, O as j, S as M, T as Ce, _ as we, a as Te, b as N, d as Ee, f as De, g as P, h as Oe, i as ke, l as F, m as Ae, n as je, o as Me, p as Ne, r as Pe, s as Fe, t as Ie, u as I, v as Le, w as L, x as R, y as z } from "./shading-settings-6v-7O_Sz.mjs";
5
- import { n as B, t as V } from "./Pass-DCljS3Z-.mjs";
6
- import { t as Re } from "./render-order-a0QAbB7Q.mjs";
7
- import { n as ze, r as Be, t as Ve } from "./decorate-Bl-JF_YY.mjs";
8
- import "./dimensioning-helper-DSlkLDmx.mjs";
9
- import { a as H, i as U, n as He, o as Ue, r as We, t as Ge } from "./render-cache-CPppt7Rd.mjs";
10
- //#region packages/common-core/src/webgl/renderer/objects/shadow-ground-plane.ts
11
- var W = class e extends T {
1
+ import { _t as e, bt as t, gt as n, ht as r, j as i, vt as a, yt as o } from "./threejs-utils-Dpa_VhZx.mjs";
2
+ import { Ai as s, Ar as c, Bt as l, Di as u, Dn as d, E as f, Ei as p, Er as m, Gr as h, Ht as g, J as ee, Jt as _, Kn as v, Kr as te, Pr as ne, S as y, Ti as b, V as re, Y as ie, Z as x, _i as S, _n as ae, at as oe, ci as se, cn as C, ct as w, dn as ce, f as le, gi as T, gn as ue, h as de, hn as fe, ht as pe, ii as me, jn as E, kn as he, li as ge, ln as D, mt as _e, pn as ve, st as ye, tn as be, un as O, vn as k, w as A, xn as j, y as xe, yi as Se, z as Ce } from "./three.core-BTUCraWz.mjs";
3
+ import { r as we } from "./three.module-DUSFrLM6.mjs";
4
+ import { C as M, D as Te, E as Ee, O as N, S as P, T as De, _ as Oe, a as ke, b as F, d as Ae, f as I, g as L, h as je, i as Me, l as R, m as Ne, n as Pe, o as Fe, p as Ie, r as Le, s as Re, t as ze, u as z, v as Be, w as Ve, x as B, y as V } from "./shading-settings-dogROhBy.mjs";
5
+ import { n as He, t as H } from "./Pass-DCljS3Z-.mjs";
6
+ import { n as Ue, r as We, t as Ge } from "./decorate-CjaqqbUP.mjs";
7
+ import "./dimensioning-helper-WQTVJpxQ.mjs";
8
+ //#region packages/common-core/src/webgl/render-order.ts
9
+ var U = {
10
+ DIMENSION_LINE: 0,
11
+ DIMENSION_LABEL: 1,
12
+ SHADOW_GROUND_PLANE: 1,
13
+ DOCKING_PREVIEW_MESH: 1,
14
+ DOCKING_PREVIEW_LINE: 1,
15
+ COMPONENT_MESH: 2,
16
+ TRANSMISSIVE_MATERIAL: 3,
17
+ LOADING_MESH: 4,
18
+ BOUNDING_BOX_MESH: 4,
19
+ DOCKLINE_MESH: 4,
20
+ DOCKLINE_BOUNDING_LINE: 4,
21
+ WALL: 5,
22
+ PLANNER_DIMENSION_LINE: 10,
23
+ PLANNER_DIMENSION_LABEL: 11,
24
+ CAMERA_FACING_HIGHLIGHT: 27,
25
+ CONSTRUCTION_INDICATOR_THICKNESS: 28,
26
+ CONSTRUCTION_INDICATOR_GROUND: 29,
27
+ CONSTRUCTION_INDICATOR_LINE: 30
28
+ }, Ke = (e) => e.material instanceof ae && e.material.transmission > 0 ? U.TRANSMISSIVE_MATERIAL : U.COMPONENT_MESH, W = class e extends D {
12
29
  static {
13
30
  this.alphaMap = !0;
14
31
  }
15
32
  constructor(t, n) {
16
- super(new ue(1, 1, 10, 10), new te({
33
+ super(new E(1, 1, 10, 10), new ae({
17
34
  color: e.alphaMap ? 0 : 16777215,
18
35
  transparent: !0,
19
36
  depthWrite: !1,
20
37
  polygonOffset: !0,
21
38
  name: "ShadowGroundPlaneMaterial"
22
- })), this.name = "ShadowGroundPlane", this.userData.isFloor = !0, this.renderOrder = Re.SHADOW_GROUND_PLANE, this.receiveShadow = !1, this.layers.disableAll(), n && this.updateMaterial(n), this.setShadowMap(t);
39
+ })), this.name = "ShadowGroundPlane", this.userData.isFloor = !0, this.renderOrder = U.SHADOW_GROUND_PLANE, this.receiveShadow = !1, this.layers.disableAll(), n && this.updateMaterial(n), this.setShadowMap(t);
23
40
  }
24
41
  setVisibility(e) {
25
42
  this.visible = e, this.setVisibilityLayers(e);
@@ -42,7 +59,7 @@ var W = class e extends T {
42
59
  let t = this.material;
43
60
  e.opacity && t.opacity !== e.opacity && (t.opacity = e.opacity), e.polygonOffset && t.polygonOffsetFactor !== e.polygonOffset && (t.polygonOffset = !0, t.polygonOffsetFactor = e.polygonOffset, t.polygonOffsetUnits = e.polygonOffset), t.needsUpdate = !0;
44
61
  }
45
- }, G = class extends B {
62
+ }, G = class extends He {
46
63
  get renderPassManager() {
47
64
  return this._renderPassManager;
48
65
  }
@@ -67,19 +84,19 @@ var W = class e extends T {
67
84
  render(e, t, n, r, i) {
68
85
  this.renderPass(e);
69
86
  }
70
- }, Ke = {
87
+ }, K = {
71
88
  uniforms: {
72
89
  tDiffuse: { value: null },
73
- intensity: { value: new _(1, 1) }
90
+ intensity: { value: new b(1, 1) }
74
91
  },
75
92
  vertexShader: "\n varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = (projectionMatrix * modelViewMatrix * vec4(position, 1.0)).xyww;\n }",
76
93
  fragmentShader: "\n uniform sampler2D tDiffuse;\n uniform vec2 intensity;\n varying vec2 vUv;\n\n void main() {\n vec4 textureColor = texture2D(tDiffuse, vUv);\n vec2 aoAndShadow = vec2(1.0) - intensity + intensity * textureColor.rg;\n gl_FragColor = vec4(vec3(aoAndShadow.r * aoAndShadow.g), 1.0);\n }"
77
- }, qe = class extends l {
94
+ }, qe = class extends h {
78
95
  constructor(e) {
79
96
  super({
80
- uniforms: C.clone(Ke.uniforms),
81
- vertexShader: Ke.vertexShader,
82
- fragmentShader: Ke.fragmentShader,
97
+ uniforms: T.clone(K.uniforms),
98
+ vertexShader: K.vertexShader,
99
+ fragmentShader: K.fragmentShader,
83
100
  transparent: !0,
84
101
  depthTest: !1,
85
102
  depthWrite: !1,
@@ -89,7 +106,7 @@ var W = class e extends T {
89
106
  blendSrcAlpha: 206,
90
107
  blendDstAlpha: 200,
91
108
  blendEquationAlpha: 100
92
- }), this._intensity = new _(1, 1), this.uniforms.intensity.value = this._intensity, this.update(e);
109
+ }), this._intensity = new b(1, 1), this.uniforms.intensity.value = this._intensity, this.update(e);
93
110
  }
94
111
  update(e) {
95
112
  return e?.texture !== void 0 && (this.uniforms.tDiffuse.value = e.texture), e?.blending !== void 0 && (this.blending = e.blending), e?.aoIntensity !== void 0 && (this._intensity.x = e.aoIntensity), e?.shadowIntensity !== void 0 && (this._intensity.y = e.shadowIntensity), this;
@@ -104,11 +121,11 @@ var W = class e extends T {
104
121
  }, Ye = (e, t, n, r) => {
105
122
  let i = [];
106
123
  for (let a = 0; a < e; a++) {
107
- let o = 2 * Math.PI * t * a / e, c = (1 + (n - 1) * (a / (e - 1)) ** r) / n;
108
- i.push(new s(Math.cos(o), Math.sin(o), c));
124
+ let o = 2 * Math.PI * t * a / e, s = (1 + (n - 1) * (a / (e - 1)) ** r) / n;
125
+ i.push(new p(Math.cos(o), Math.sin(o), s));
109
126
  }
110
127
  return i;
111
- }, K = {
128
+ }, q = {
112
129
  name: "PoissonDenoiseShader",
113
130
  defines: {
114
131
  SAMPLES: 16,
@@ -127,10 +144,10 @@ var W = class e extends T {
127
144
  tNormal: { value: null },
128
145
  tDepth: { value: null },
129
146
  tNoise: { value: null },
130
- resolution: { value: new _() },
131
- cameraProjectionMatrix: { value: new x() },
132
- cameraProjectionMatrixInverse: { value: new x() },
133
- cameraWorldMatrix: { value: new x() },
147
+ resolution: { value: new b() },
148
+ cameraProjectionMatrix: { value: new C() },
149
+ cameraProjectionMatrixInverse: { value: new C() },
150
+ cameraWorldMatrix: { value: new C() },
134
151
  lumaPhi: { value: 5 },
135
152
  depthPhi: { value: 1 },
136
153
  normalPhi: { value: 1 },
@@ -138,8 +155,8 @@ var W = class e extends T {
138
155
  radiusExponent: { value: 1.3 },
139
156
  iteration: { value: 0 },
140
157
  noOfIterations: { value: 2 },
141
- sceneBoxMin: { value: new s(-1, -1, -1) },
142
- sceneBoxMax: { value: new s(1, 1, 1) }
158
+ sceneBoxMin: { value: new p(-1, -1, -1) },
159
+ sceneBoxMax: { value: new p(1, 1, 1) }
143
160
  },
144
161
  vertexShader: "\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",
145
162
  fragmentShader: "\nvarying vec2 vUv;\nuniform sampler2D tDiffuse;\nuniform sampler2D tNormal;\nuniform sampler2D tDepth;\nuniform sampler2D tNoise;\nuniform vec2 resolution;\nuniform mat4 cameraProjectionMatrix;\nuniform mat4 cameraProjectionMatrixInverse;\nuniform mat4 cameraWorldMatrix;\nuniform float lumaPhi;\nuniform float depthPhi;\nuniform float normalPhi;\nuniform float radius;\nuniform float radiusExponent;\nuniform int iteration;\nuniform int noOfIterations;\n#if SCENE_CLIP_BOX == 1\n uniform vec3 sceneBoxMin;\n uniform vec3 sceneBoxMax;\n#endif\n\n#include <common>\n#include <packing>\n\n#if LUMINANCE_WEIGHTED == 1 \n\n#ifndef LUMINANCE_TYPE\n#define LUMINANCE_TYPE float\n#endif\n#ifndef SAMPLE_LUMINANCE\n#define SAMPLE_LUMINANCE dot(vec3(0.2125, 0.7154, 0.0721), a)\n#endif\n#define WEIGHT_TYPE LUMINANCE_TYPE\n\n#else\n#define WEIGHT_TYPE float\n#endif\n\n#ifndef FRAGMENT_OUTPUT\n#define FRAGMENT_OUTPUT vec4(vec3(denoised), 1.)\n#endif\n\nLUMINANCE_TYPE getLuminance(const in vec3 a) {\n return SAMPLE_LUMINANCE;\n}\n\nconst vec3 poissonDisk[SAMPLES] = SAMPLE_VECTORS;\n\nvec3 getViewPosition(const in vec2 screenPosition, const in float depth) {\n vec4 clipSpacePosition = vec4(vec3(screenPosition, depth) * 2.0 - 1.0, 1.0);\n vec4 viewSpacePosition = cameraProjectionMatrixInverse * clipSpacePosition;\n return viewSpacePosition.xyz / viewSpacePosition.w;\n}\n\nfloat getDepth(const vec2 uv) {\n#if DEPTH_VALUE_SOURCE == 1 \n return textureLod(tDepth, uv.xy, 0.0).a;\n#else\n return textureLod(tDepth, uv.xy, 0.0).r;\n#endif\n}\n\nfloat fetchDepth(const ivec2 uv) {\n#if DEPTH_VALUE_SOURCE == 1 \n return texelFetch(tDepth, uv.xy, 0).a;\n#else\n return texelFetch(tDepth, uv.xy, 0).r;\n#endif\n}\n\nvec3 computeNormalFromDepth(const vec2 uv) {\n vec2 size = vec2(textureSize(tDepth, 0));\n ivec2 p = ivec2(uv * size);\n float c0 = fetchDepth(p);\n float l2 = fetchDepth(p - ivec2(2, 0));\n float l1 = fetchDepth(p - ivec2(1, 0));\n float r1 = fetchDepth(p + ivec2(1, 0));\n float r2 = fetchDepth(p + ivec2(2, 0));\n float b2 = fetchDepth(p - ivec2(0, 2));\n float b1 = fetchDepth(p - ivec2(0, 1));\n float t1 = fetchDepth(p + ivec2(0, 1));\n float t2 = fetchDepth(p + ivec2(0, 2));\n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n vec3 ce = getViewPosition(uv, c0).xyz;\n vec3 dpdx = (dl < dr) ? ce - getViewPosition((uv - vec2(1.0 / size.x, 0.0)), l1).xyz\n : -ce + getViewPosition((uv + vec2(1.0 / size.x, 0.0)), r1).xyz;\n vec3 dpdy = (db < dt) ? ce - getViewPosition((uv - vec2(0.0, 1.0 / size.y)), b1).xyz\n : -ce + getViewPosition((uv + vec2(0.0, 1.0 / size.y)), t1).xyz;\n return normalize(cross(dpdx, dpdy));\n}\n\nvec3 getViewNormal(const vec2 uv) {\n#if NORMAL_VECTOR_TYPE == 2\n return normalize(textureLod(tNormal, uv, 0.).rgb);\n#elif NORMAL_VECTOR_TYPE == 1\n return unpackRGBToNormal(textureLod(tNormal, uv, 0.).rgb);\n#else\n return computeNormalFromDepth(uv);\n#endif\n}\n\nvoid denoiseSample(in vec3 center, in vec3 viewNormal, in vec3 viewPos, in vec2 sampleUv, inout vec3 denoised, inout WEIGHT_TYPE totalWeight) {\n vec4 sampleTexel = textureLod(tDiffuse, sampleUv, 0.0);\n float sampleDepth = getDepth(sampleUv);\n vec3 sampleNormal = getViewNormal(sampleUv);\n vec3 neighborColor = sampleTexel.rgb;\n vec3 viewPosSample = getViewPosition(sampleUv, sampleDepth);\n \n float normalDiff = dot(viewNormal, sampleNormal);\n float normalSimilarity = pow(max(normalDiff, 0.), normalPhi);\n float depthDiff = abs(dot(normalize(viewPos - viewPosSample), viewNormal));\n float depthSimilarity = max(1. - depthDiff / depthPhi, 0.);\n #if LUMINANCE_WEIGHTED == 1 \n LUMINANCE_TYPE lumaDiff = abs(getLuminance(neighborColor) - getLuminance(center));\n LUMINANCE_TYPE lumaSimilarity = max(1. - lumaDiff / lumaPhi, 0.);\n LUMINANCE_TYPE w = lumaSimilarity * depthSimilarity * normalSimilarity;\n #else\n WEIGHT_TYPE w = depthSimilarity * normalSimilarity;\n #endif\n\n denoised += w * neighborColor;\n totalWeight += w;\n}\n\nvoid main() {\n float depth = fetchDepth(ivec2(vec2(textureSize(tDepth, 0)) * vUv.xy)); \n vec3 viewNormal = getViewNormal(vUv); \n if (depth == 1. || dot(viewNormal, viewNormal) == 0.) {\n discard;\n return;\n }\n vec4 texel = textureLod(tDiffuse, vUv, 0.0);\n vec3 center = texel.rgb;\n vec3 viewPos = getViewPosition(vUv, depth);\n\n #if SCENE_CLIP_BOX == 1\n vec3 worldPos = (cameraWorldMatrix * vec4(viewPos, 1.0)).xyz;\n float boxDistance = length(max(vec3(0.0), max(sceneBoxMin - worldPos, worldPos - sceneBoxMax)));\n if (boxDistance > radius * 2.) {\n discard;\n return;\n }\n #endif\n\n vec2 noiseResolution = vec2(textureSize(tNoise, 0));\n vec2 noiseUv = vUv * resolution / noiseResolution;\n vec4 noiseTexel = textureLod(tNoise, noiseUv, 0.0);\n vec2 noiseVec = vec2(sin(noiseTexel[iteration % 4] * 2. * PI), cos(noiseTexel[iteration % 4] * 2. * PI));\n #if SAMPLE_DISTRIBUTION == 1\n vec3 randomVec = normalize(vec3(noiseVec.xy, 0.));\n vec3 tangent = normalize(randomVec - viewNormal * dot(randomVec, viewNormal));\n vec3 bitangent = cross(viewNormal, tangent);\n mat3 kernelMatrix = mat3(tangent, bitangent, viewNormal);\n #else\n mat2 rotationMatrix = mat2(noiseVec.x, -noiseVec.y, noiseVec.x, noiseVec.y);\n #endif\n\n WEIGHT_TYPE totalWeight = WEIGHT_TYPE(1.);\n vec3 denoised = texel.rgb;\n for (int i = 0; i < SAMPLES; i++) {\n vec3 sampleDir = poissonDisk[i];\n #if SAMPLE_DISTRIBUTION == 1\n vec3 offsetViewPos = viewPos + normalize(kernelMatrix * vec3(sampleDir.xy, 0.)) * sampleDir.z * radius * radius;\n vec4 samplePointNDC = cameraProjectionMatrix * vec4(offsetViewPos, 1.0); \n vec2 sampleUv = (samplePointNDC.xy / samplePointNDC.w * 0.5 + 0.5);\n #else\n vec2 offset = rotationMatrix * sampleDir.xy * (1. + sampleDir.z * (radius - 1.));\n offset *= mix(vec2(1.0), sqrt(1.0 - viewNormal.xy * viewNormal.xy), float(iteration) / float(noOfIterations-1));\n offset *= max(1.0, 1.0 / length(offset));\n vec2 sampleUv = vUv + offset / resolution;\n #endif\n denoiseSample(center, viewNormal, viewPos, sampleUv, denoised, totalWeight);\n }\n\n denoised /= totalWeight + 1.0 - step(0.0, totalWeight);\n gl_FragColor = FRAGMENT_OUTPUT;\n}"
@@ -161,50 +178,50 @@ var W = class e extends T {
161
178
  this._inputTexture = e;
162
179
  }
163
180
  constructor(e, t, n, r) {
164
- this.needsUpdate = !0, this.parameters = { ...Xe }, this._width = 0, this._height = 0, this._samples = 0, this._normalVectorSourceType = I.FLOAT_BUFFER_NORMAL, this._depthValueSourceType = F.NORMAL_VECTOR_ALPHA, this._inputTexture = null, this.depthTexture = null, this.normalTexture = null, this._noiseTexture = null, this._renderTargets = [], this._outputRenderTargetIndex = 0, this._passRenderer = new Ne(), this._rgInputTexture = !1, this._luminanceWeighted = !0, this._width = e, this._height = t, this._samples = n, this._normalVectorSourceType = r?.normalVectorSourceType || I.FLOAT_BUFFER_NORMAL, this._depthValueSourceType = r?.depthValueSourceType || F.NORMAL_VECTOR_ALPHA, this._inputTexture = r?.inputTexture || null, this.depthTexture = r?.depthTexture || null, this.normalTexture = r?.normalTexture || null, this._rgInputTexture = r?.rgInputTexture || !1, this._luminanceWeighted = r?.luminanceWeighted === !0, this._luminanceType = r?.luminanceType || "vec3", this._sampleLuminance = r?.sampleLuminance || "a", this._fragmentOutput = r?.fragmentOutput || "vec4(denoised.xyz, 1.)", r?.poissonDenoisePassParameters && (this.parameters = r.poissonDenoisePassParameters), r && this.updateTextures(r);
181
+ this.needsUpdate = !0, this.parameters = { ...Xe }, this._width = 0, this._height = 0, this._samples = 0, this._normalVectorSourceType = z.FLOAT_BUFFER_NORMAL, this._depthValueSourceType = R.NORMAL_VECTOR_ALPHA, this._inputTexture = null, this.depthTexture = null, this.normalTexture = null, this._noiseTexture = null, this._renderTargets = [], this._outputRenderTargetIndex = 0, this._passRenderer = new Ie(), this._rgInputTexture = !1, this._luminanceWeighted = !0, this._width = e, this._height = t, this._samples = n, this._normalVectorSourceType = r?.normalVectorSourceType || z.FLOAT_BUFFER_NORMAL, this._depthValueSourceType = r?.depthValueSourceType || R.NORMAL_VECTOR_ALPHA, this._inputTexture = r?.inputTexture || null, this.depthTexture = r?.depthTexture || null, this.normalTexture = r?.normalTexture || null, this._rgInputTexture = r?.rgInputTexture || !1, this._luminanceWeighted = r?.luminanceWeighted === !0, this._luminanceType = r?.luminanceType || "vec3", this._sampleLuminance = r?.sampleLuminance || "a", this._fragmentOutput = r?.fragmentOutput || "vec4(denoised.xyz, 1.)", r?.poissonDenoisePassParameters && (this.parameters = r.poissonDenoisePassParameters), r && this.updateTextures(r);
165
182
  }
166
183
  _getNoiseTexture(e = 64) {
167
184
  if (!this._noiseTexture) {
168
- let t = new Oe(), n = new Uint8Array(e * e * 4);
185
+ let t = new je(), n = new Uint8Array(e * e * 4);
169
186
  for (let r = 0; r < e; r++) for (let i = 0; i < e; i++) {
170
187
  let a = r, o = i;
171
188
  n[(r * e + i) * 4] = (t.noise(a, o) + 1) * 127.5, n[(r * e + i) * 4 + 1] = (t.noise(a + e, o) + 1) * 127.5, n[(r * e + i) * 4 + 2] = (t.noise(a, o + e) + 1) * 127.5, n[(r * e + i) * 4 + 3] = (t.noise(a + e, o + e) + 1) * 127.5;
172
189
  }
173
- this._noiseTexture = new v(n, e, e, p, b), this._noiseTexture.wrapS = h, this._noiseTexture.wrapT = h, this._noiseTexture.needsUpdate = !0;
190
+ this._noiseTexture = new re(n, e, e, v, S), this._noiseTexture.wrapS = ne, this._noiseTexture.wrapT = ne, this._noiseTexture.needsUpdate = !0;
174
191
  }
175
192
  return this._noiseTexture;
176
193
  }
177
194
  _getMaterial(e, t) {
178
195
  let n = t;
179
- return this._pdMaterial || (this._pdMaterial = new l({
180
- defines: Object.assign({}, K.defines),
181
- uniforms: C.clone(K.uniforms),
182
- vertexShader: K.vertexShader,
183
- fragmentShader: K.fragmentShader,
196
+ return this._pdMaterial || (this._pdMaterial = new h({
197
+ defines: Object.assign({}, q.defines),
198
+ uniforms: T.clone(q.uniforms),
199
+ vertexShader: q.vertexShader,
200
+ fragmentShader: q.fragmentShader,
184
201
  depthTest: !1,
185
202
  depthWrite: !1
186
203
  }), this._pdMaterial.uniforms.tNoise.value = this._getNoiseTexture(), n = !0), n && this._updateShader(this._pdMaterial), this._updateUniforms(this._pdMaterial, e, n), this._pdMaterial;
187
204
  }
188
205
  _updateShader(e) {
189
- e.defines.SAMPLES = this.parameters.samples, e.defines.SAMPLE_VECTORS = Je(this.parameters.samples, this.parameters.rings, this.parameters.radius, this.parameters.radiusExponent), e.defines.SAMPLE_DISTRIBUTION = this.parameters.nvOrientatedSamples ? 1 : 0, e.defines.NORMAL_VECTOR_TYPE = this._normalVectorSourceType === I.FLOAT_BUFFER_NORMAL ? 2 : 1, e.defines.DEPTH_VALUE_SOURCE = this._depthValueSourceType === F.NORMAL_VECTOR_ALPHA ? 1 : 0, e.needsUpdate = !0, e.defines.LUMINANCE_WEIGHTED = this._luminanceWeighted ? 1 : 0, e.defines.LUMINANCE_TYPE = this._luminanceType, e.defines.SAMPLE_LUMINANCE = this._sampleLuminance, e.defines.FRAGMENT_OUTPUT = this._fragmentOutput, e.defines.SCENE_CLIP_BOX = this._sceneClipBox ? 1 : 0, e.needsUpdate = !0;
206
+ e.defines.SAMPLES = this.parameters.samples, e.defines.SAMPLE_VECTORS = Je(this.parameters.samples, this.parameters.rings, this.parameters.radius, this.parameters.radiusExponent), e.defines.SAMPLE_DISTRIBUTION = this.parameters.nvOrientatedSamples ? 1 : 0, e.defines.NORMAL_VECTOR_TYPE = this._normalVectorSourceType === z.FLOAT_BUFFER_NORMAL ? 2 : 1, e.defines.DEPTH_VALUE_SOURCE = this._depthValueSourceType === R.NORMAL_VECTOR_ALPHA ? 1 : 0, e.needsUpdate = !0, e.defines.LUMINANCE_WEIGHTED = this._luminanceWeighted ? 1 : 0, e.defines.LUMINANCE_TYPE = this._luminanceType, e.defines.SAMPLE_LUMINANCE = this._sampleLuminance, e.defines.FRAGMENT_OUTPUT = this._fragmentOutput, e.defines.SCENE_CLIP_BOX = this._sceneClipBox ? 1 : 0, e.needsUpdate = !0;
190
207
  }
191
208
  _updateUniforms(e, t, n) {
192
- let r = this._depthValueSourceType === F.NORMAL_VECTOR_ALPHA ? this.normalTexture : this.depthTexture;
209
+ let r = this._depthValueSourceType === R.NORMAL_VECTOR_ALPHA ? this.normalTexture : this.depthTexture;
193
210
  e.uniforms.tDiffuse.value = this._inputTexture, e.uniforms.tNormal.value = this.normalTexture, e.uniforms.tDepth.value = r, e.uniforms.resolution.value.set(this._width, this._height), t.projectionMatrix && e.uniforms.cameraProjectionMatrix.value.copy(t.projectionMatrix), t.projectionMatrixInverse && e.uniforms.cameraProjectionMatrixInverse.value.copy(t.projectionMatrixInverse), t.matrixWorld && e.uniforms.cameraWorldMatrix.value.copy(t.matrixWorld), n && (e.uniforms.lumaPhi.value = this.parameters.lumaPhi, e.uniforms.depthPhi.value = this.parameters.depthPhi, e.uniforms.normalPhi.value = this.parameters.normalPhi, e.uniforms.radius.value = this.parameters.radius, e.uniforms.radiusExponent.value = this.parameters.radiusExponent, this._sceneClipBox && (e.uniforms.sceneBoxMin.value.copy(this._sceneClipBox.min), e.uniforms.sceneBoxMax.value.copy(this._sceneClipBox.max)));
194
211
  }
195
212
  _getRenderTargets() {
196
- return this._renderTargets.length < 2 && (this._renderTargets = [new t(this._width, this._height, {
213
+ return this._renderTargets.length < 2 && (this._renderTargets = [new s(this._width, this._height, {
197
214
  samples: this._samples,
198
- format: p,
199
- type: le,
200
- magFilter: O,
201
- minFilter: O
202
- }), new t(this._width, this._height, {
215
+ format: v,
216
+ type: pe,
217
+ magFilter: j,
218
+ minFilter: j
219
+ }), new s(this._width, this._height, {
203
220
  samples: this._samples,
204
- format: p,
205
- type: le,
206
- magFilter: O,
207
- minFilter: O
221
+ format: v,
222
+ type: pe,
223
+ magFilter: j,
224
+ minFilter: j
208
225
  })]), this._renderTargets;
209
226
  }
210
227
  dispose() {
@@ -214,7 +231,7 @@ var W = class e extends T {
214
231
  this._width = e, this._height = t, this._renderTargets.forEach((n) => n.setSize(e, t)), this.needsUpdate = !0;
215
232
  }
216
233
  updateBounds(e) {
217
- this._sceneClipBox = new ae().copy(e), this.needsUpdate = !0;
234
+ this._sceneClipBox = new le().copy(e), this.needsUpdate = !0;
218
235
  }
219
236
  updateParameters(e) {
220
237
  for (let t in e) this.parameters.hasOwnProperty(t) && (this.parameters[t] = e[t], this.needsUpdate = !0);
@@ -238,12 +255,12 @@ var W = class e extends T {
238
255
  let r = this._getMaterial(t, this.needsUpdate);
239
256
  this.needsUpdate = !1, this._passRenderer.renderScreenSpace(e, r, n, 16777215, 1);
240
257
  }
241
- }, q = {
258
+ }, J = {
242
259
  OFF: "off",
243
260
  HARD: "hard",
244
261
  POISSON: "poisson",
245
262
  FULL: "full"
246
- }, Qe = { shadowRadius: .05 }, J = {
263
+ }, Qe = { shadowRadius: .05 }, Y = {
247
264
  enabled: !0,
248
265
  applyToMaterial: !0,
249
266
  aoIntensity: .5,
@@ -252,12 +269,12 @@ var W = class e extends T {
252
269
  shadowOnGround: !1,
253
270
  alwaysUpdate: !1,
254
271
  progressiveDenoiseIterations: 0
255
- }, Y = class extends G {
272
+ }, X = class extends G {
256
273
  static {
257
- this.shadowTransform = new x().set(0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
274
+ this.shadowTransform = new C().set(0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
258
275
  }
259
276
  get aoAndSoftShadowRenderTarget() {
260
- return this._aoAndSoftShadowRenderTarget = this._aoAndSoftShadowRenderTarget ?? new t(this._width, this._height, {
277
+ return this._aoAndSoftShadowRenderTarget = this._aoAndSoftShadowRenderTarget ?? new s(this._width, this._height, {
261
278
  samples: this._samples,
262
279
  format: 1030,
263
280
  magFilter: this._samples > 1 ? 1006 : 1003,
@@ -265,9 +282,9 @@ var W = class e extends T {
265
282
  }), this._aoAndSoftShadowRenderTarget;
266
283
  }
267
284
  get aoRenderPass() {
268
- return this._aoPass ||= new Me(this._width, this._height, this._samples, !this.parameters.applyToMaterial, {
269
- normalVectorSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? I.FLOAT_BUFFER_NORMAL : I.INPUT_RGB_NORMAL,
270
- depthValueSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? F.NORMAL_VECTOR_ALPHA : F.SEPARATE_BUFFER,
285
+ return this._aoPass ||= new Fe(this._width, this._height, this._samples, !this.parameters.applyToMaterial, {
286
+ normalVectorSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? z.FLOAT_BUFFER_NORMAL : z.INPUT_RGB_NORMAL,
287
+ depthValueSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? R.NORMAL_VECTOR_ALPHA : R.SEPARATE_BUFFER,
271
288
  modulateRedChannel: !0,
272
289
  aoParameters: this.parameters.ao
273
290
  }), this._aoPass;
@@ -277,8 +294,8 @@ var W = class e extends T {
277
294
  inputTexture: void 0,
278
295
  depthTexture: this.gBufferTextures.depthBufferTexture,
279
296
  normalTexture: this.gBufferTextures.gBufferTexture,
280
- normalVectorSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? I.FLOAT_BUFFER_NORMAL : I.INPUT_RGB_NORMAL,
281
- depthValueSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? F.NORMAL_VECTOR_ALPHA : F.SEPARATE_BUFFER,
297
+ normalVectorSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? z.FLOAT_BUFFER_NORMAL : z.INPUT_RGB_NORMAL,
298
+ depthValueSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? R.NORMAL_VECTOR_ALPHA : R.SEPARATE_BUFFER,
282
299
  rgInputTexture: !0,
283
300
  luminanceWeighted: !1,
284
301
  fragmentOutput: "vec4(1.0, denoised.x, 0.0, 1.0)",
@@ -301,7 +318,7 @@ var W = class e extends T {
301
318
  return this._softShadowPass;
302
319
  }
303
320
  get fadeRenderTarget() {
304
- return this._fadeRenderTarget = this._fadeRenderTarget ?? new t(this._width, this._height, {
321
+ return this._fadeRenderTarget = this._fadeRenderTarget ?? new s(this._width, this._height, {
305
322
  samples: this._samples,
306
323
  format: 1030,
307
324
  magFilter: this._samples > 1 ? 1006 : 1003,
@@ -313,8 +330,8 @@ var W = class e extends T {
313
330
  inputTexture: this.aoAndSoftShadowRenderTarget.texture,
314
331
  depthTexture: this.gBufferTextures.depthBufferTexture,
315
332
  normalTexture: this.gBufferTextures.gBufferTexture,
316
- normalVectorSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? I.FLOAT_BUFFER_NORMAL : I.INPUT_RGB_NORMAL,
317
- depthValueSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? F.NORMAL_VECTOR_ALPHA : F.SEPARATE_BUFFER,
333
+ normalVectorSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? z.FLOAT_BUFFER_NORMAL : z.INPUT_RGB_NORMAL,
334
+ depthValueSourceType: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? R.NORMAL_VECTOR_ALPHA : R.SEPARATE_BUFFER,
318
335
  rgInputTexture: !0,
319
336
  luminanceWeighted: !1,
320
337
  fragmentOutput: "vec4(denoised.xy, vec2(fract(depth * 1024.0), floor(depth * 1024.0)))",
@@ -335,23 +352,23 @@ var W = class e extends T {
335
352
  constructor(e, t, n, r, i) {
336
353
  super(e), this.needsUpdate = !0, this.renderToRenderTarget = !1, this.shadowAndAoPassSettings = {
337
354
  shadowMapTexture: null,
338
- shadowBlurType: q.FULL,
339
- shadowFadeInBlurType: q.FULL,
355
+ shadowBlurType: J.FULL,
356
+ shadowFadeInBlurType: J.FULL,
340
357
  shadowFadeInMix: 0,
341
358
  noOStaticFrames: 0
342
- }, this._cameraUpdate = new De(), this._finalTexture = null, this._onlyHardShadow = !1, this._width = t, this._height = n, this._samples = r, this.parameters = {
343
- enabled: i?.enabled ?? J.enabled,
344
- applyToMaterial: i?.applyToMaterial ?? J.applyToMaterial,
345
- aoIntensity: i?.aoIntensity ?? J.aoIntensity,
346
- shadowIntensity: i?.shadowIntensity ?? J.shadowIntensity,
347
- aoOnGround: i?.aoOnGround ?? J.aoOnGround,
348
- shadowOnGround: i?.shadowOnGround ?? J.shadowOnGround,
349
- alwaysUpdate: i?.alwaysUpdate ?? J.alwaysUpdate,
350
- progressiveDenoiseIterations: i?.progressiveDenoiseIterations ?? J.progressiveDenoiseIterations,
359
+ }, this._cameraUpdate = new I(), this._finalTexture = null, this._onlyHardShadow = !1, this._width = t, this._height = n, this._samples = r, this.parameters = {
360
+ enabled: i?.enabled ?? Y.enabled,
361
+ applyToMaterial: i?.applyToMaterial ?? Y.applyToMaterial,
362
+ aoIntensity: i?.aoIntensity ?? Y.aoIntensity,
363
+ shadowIntensity: i?.shadowIntensity ?? Y.shadowIntensity,
364
+ aoOnGround: i?.aoOnGround ?? Y.aoOnGround,
365
+ shadowOnGround: i?.shadowOnGround ?? Y.shadowOnGround,
366
+ alwaysUpdate: i?.alwaysUpdate ?? Y.alwaysUpdate,
367
+ progressiveDenoiseIterations: i?.progressiveDenoiseIterations ?? Y.progressiveDenoiseIterations,
351
368
  shadow: { ...Qe },
352
- ao: { ...Fe },
369
+ ao: { ...Re },
353
370
  poissonDenoise: { ...Xe }
354
- }, this._copyMaterial = new N(), this._blendMaterial = new N({}, z.DEFAULT), this._blendAoAndShadowMaterial = new qe();
371
+ }, this._copyMaterial = new F(), this._blendMaterial = new F({}, V.DEFAULT), this._blendAoAndShadowMaterial = new qe();
355
372
  }
356
373
  dispose() {
357
374
  super.dispose(), this._aoAndSoftShadowRenderTarget?.dispose(), this._softShadowPass?.dispose(), this._aoPass?.dispose(), this._fadeRenderTarget?.dispose(), this._poissonDenoisePass?.dispose(), this._copyMaterial?.dispose(), this._blendMaterial?.dispose(), this._blendAoAndShadowMaterial?.dispose();
@@ -377,19 +394,19 @@ var W = class e extends T {
377
394
  updateBounds(e, t) {
378
395
  this._softShadowPass?.updateBounds(e.bounds), this._aoPass?.updateBounds(e.bounds, t);
379
396
  }
380
- _getRenderConditions(e = q.FULL, t = 0, n = 0) {
381
- let r = e === q.POISSON && t > .001, i = e === q.HARD && t > .001 && t < .999;
397
+ _getRenderConditions(e = J.FULL, t = 0, n = 0) {
398
+ let r = e === J.POISSON && t > .001, i = e === J.HARD && t > .001 && t < .999;
382
399
  return {
383
400
  fadeInPoissonShadow: r,
384
401
  fadeInHardShadow: i,
385
- onlyHardShadow: e === q.HARD && !i,
402
+ onlyHardShadow: e === J.HARD && !i,
386
403
  progressiveDenoise: !r && !i && n > 1 && n <= this.parameters.progressiveDenoiseIterations + 1
387
404
  };
388
405
  }
389
406
  renderPass(e) {
390
407
  if (!this._setRenderState()) return;
391
408
  let t = this._getRenderConditions(this.shadowAndAoPassSettings.shadowFadeInBlurType, this.shadowAndAoPassSettings.shadowFadeInMix, this.shadowAndAoPassSettings.noOStaticFrames), n = !1;
392
- !t.onlyHardShadow && this.shadowAndAoPassSettings.shadowBlurType === q.FULL && this._evaluateIfUpdateIsNeeded(this.camera) && (this._renderShadowAndAo(e, this.scene, this.camera, this.shadowAndAoPassSettings.shadowMapTexture), n = !0);
409
+ !t.onlyHardShadow && this.shadowAndAoPassSettings.shadowBlurType === J.FULL && this._evaluateIfUpdateIsNeeded(this.camera) && (this._renderShadowAndAo(e, this.scene, this.camera, this.shadowAndAoPassSettings.shadowMapTexture), n = !0);
393
410
  let r = t.onlyHardShadow ? this.shadowAndAoPassSettings.shadowMapTexture : this.denoiseRenderTargetTexture;
394
411
  t.fadeInPoissonShadow && (r = this._renderDynamicShadow(e, this.aoAndSoftShadowRenderTarget.texture, this.shadowAndAoPassSettings.shadowMapTexture, this.shadowAndAoPassSettings.shadowFadeInMix), n = !0), n ? r = this._renderDenoise(e, this.camera, t.fadeInPoissonShadow, !1) : t.progressiveDenoise && (r = this._renderDenoise(e, this.camera, !1, !0)), t.fadeInHardShadow && (r = this._renderDynamicShadow(e, this.denoiseRenderTargetTexture, this.shadowAndAoPassSettings.shadowMapTexture, this.shadowAndAoPassSettings.shadowFadeInMix)), this._finalTexture = r, this._onlyHardShadow = t.onlyHardShadow, this.renderToRenderTarget && this.renderToTarget(e);
395
412
  }
@@ -420,13 +437,13 @@ var W = class e extends T {
420
437
  return i && (this._copyMaterial.update({
421
438
  texture: t,
422
439
  blending: 0,
423
- colorTransform: R,
424
- colorBase: j,
440
+ colorTransform: B,
441
+ colorBase: N,
425
442
  multiplyChannels: 0
426
443
  }), this.passRenderer.renderScreenSpace(e, this._copyMaterial, this.fadeRenderTarget)), r > .001 && (this._blendMaterial.update({
427
444
  texture: n,
428
445
  blending: i ? 5 : 0,
429
- colorTransform: new x().set(0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, i ? r : 1),
446
+ colorTransform: new C().set(0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, i ? r : 1),
430
447
  multiplyChannels: 0
431
448
  }), this.passRenderer.renderScreenSpace(e, this._blendMaterial, this.fadeRenderTarget)), this.fadeRenderTarget.texture;
432
449
  }
@@ -495,15 +512,15 @@ var W = class e extends T {
495
512
  let e = this._sharedShadowGroundPlane;
496
513
  return e ||= (this._shadowGroundPlane ??= new W(this.renderTarget.texture, this.parameters), this._shadowGroundPlane), e.parent !== this._groundGroup && this._groundGroup.add(e), e;
497
514
  }
498
- constructor(e, n, r, i) {
499
- super(e), this.limitPlaneSize = !0, this.needsUpdate = !0, this.noNeedOfUpdateCount = 0, this._blurScale = 1, this._shadowScale = 1, this._groundGroup = r, this.shadowMapSize = i.shadowMapSize ?? 2048, this.parameters = this._getDefaultParameters(i), this._groundShadowFar = this.parameters.cameraFar, this._renderer = n, this.renderCacheManager?.registerCache(this, new U((e) => e.isMesh && !et(e) || e.name !== void 0 && ["Ground", "Floor"].includes(e.name))), this.renderTarget = new t(this.shadowMapSize, this.shadowMapSize), this.renderTarget.texture.generateMipmaps = !1, this._renderTargetBlur = new t(this.shadowMapSize, this.shadowMapSize), this._renderTargetBlur.texture.generateMipmaps = !1, this._sharedShadowGroundPlane = i?.sharedShadowGroundPlane, this.shadowGroundPlane.setShadowMap(this.renderTarget.texture), this.shadowGroundPlane.updateMaterial(this.parameters), this._groundContactCamera = new nt(), this._groundGroup.add(this._groundContactCamera), this._depthMaterial = new ie(), this._depthMaterial.userData.fadeoutBias = { value: this.parameters.fadeoutBias }, this._depthMaterial.userData.fadeoutFalloff = { value: this.parameters.fadeoutFalloff }, this._depthMaterial.onBeforeCompile = (e) => {
515
+ constructor(e, t, n, r) {
516
+ super(e), this.limitPlaneSize = !0, this.needsUpdate = !0, this.noNeedOfUpdateCount = 0, this._blurScale = 1, this._shadowScale = 1, this._groundGroup = n, this.shadowMapSize = r.shadowMapSize ?? 2048, this.parameters = this._getDefaultParameters(r), this._groundShadowFar = this.parameters.cameraFar, this._renderer = t, this.renderCacheManager?.registerCache(this, new a((e) => e.isMesh && !et(e) || e.name !== void 0 && ["Ground", "Floor"].includes(e.name))), this.renderTarget = new s(this.shadowMapSize, this.shadowMapSize), this.renderTarget.texture.generateMipmaps = !1, this._renderTargetBlur = new s(this.shadowMapSize, this.shadowMapSize), this._renderTargetBlur.texture.generateMipmaps = !1, this._sharedShadowGroundPlane = r?.sharedShadowGroundPlane, this.shadowGroundPlane.setShadowMap(this.renderTarget.texture), this.shadowGroundPlane.updateMaterial(this.parameters), this._groundContactCamera = new nt(), this._groundGroup.add(this._groundContactCamera), this._depthMaterial = new ce(), this._depthMaterial.userData.fadeoutBias = { value: this.parameters.fadeoutBias }, this._depthMaterial.userData.fadeoutFalloff = { value: this.parameters.fadeoutFalloff }, this._depthMaterial.onBeforeCompile = (e) => {
500
517
  e.uniforms.fadeoutBias = this._depthMaterial.userData.fadeoutBias, e.uniforms.fadeoutFalloff = this._depthMaterial.userData.fadeoutFalloff, e.fragmentShader = `
501
518
  uniform float fadeoutBias;
502
519
  uniform float fadeoutFalloff;
503
520
  ${e.fragmentShader.replace("gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );", W.alphaMap ? "gl_FragColor = vec4(clamp(pow(1.0 + fadeoutBias - fragCoordZ, 1.0/(1.0-fadeoutFalloff)), 0.0, 1.0));" : "gl_FragColor = vec4(vec3(0.0), clamp(pow(1.0 + fadeoutBias - fragCoordZ, 1.0/(1.0-fadeoutFalloff)), 0.0, 1.0));")}
504
521
  `;
505
- }, this._depthMaterial.side = 2, this._depthMaterial.depthTest = !0, this._depthMaterial.depthWrite = !0, this._blurPass = new Ee(Le, {
506
- ...i,
522
+ }, this._depthMaterial.side = 2, this._depthMaterial.depthTest = !0, this._depthMaterial.depthWrite = !0, this._blurPass = new Ae(Be, {
523
+ ...r,
507
524
  passRenderer: this.renderPassManager.passRenderer
508
525
  }), this.updatePlaneAndShadowCamera();
509
526
  }
@@ -592,7 +609,7 @@ var W = class e extends T {
592
609
  this.renderTarget
593
610
  ], [e, e], [t, t]);
594
611
  }
595
- }, nt = class extends a {
612
+ }, nt = class extends d {
596
613
  constructor() {
597
614
  super(-1, 1, -1, 1, -1, 1), this.rotation.x = Math.PI;
598
615
  }
@@ -603,12 +620,12 @@ var W = class e extends T {
603
620
  this.far = e, this.updateProjectionMatrix(), this.cameraHelper?.update();
604
621
  }
605
622
  updateCameraHelper(e, t) {
606
- e ? (this.cameraHelper = this.cameraHelper ?? new ve(this), this.cameraHelper.visible = !0, t?.add(this.cameraHelper)) : this.cameraHelper?.parent && this.cameraHelper?.removeFromParent();
623
+ e ? (this.cameraHelper = this.cameraHelper ?? new xe(this), this.cameraHelper.visible = !0, t?.add(this.cameraHelper)) : this.cameraHelper?.parent && this.cameraHelper?.removeFromParent();
607
624
  }
608
625
  setCameraHelperVisibility(e) {
609
626
  this.cameraHelper && (this.cameraHelper.visible = e);
610
627
  }
611
- }, rt = "varying vec3 vNormal;\n#if LINEAR_DEPTH == 1\n varying float vZ; \n#endif\n\n void main() {\n vNormal = normalMatrix * normal;\n vec4 viewPosition = modelViewMatrix * vec4(position, 1.0);\n #if LINEAR_DEPTH == 1\n vZ = viewPosition.z; \n #endif\n gl_Position = projectionMatrix * viewPosition;\n }", it = "varying vec3 vNormal;\n#if LINEAR_DEPTH == 1\n varying float vZ; \n uniform float cameraNear;\n uniform float cameraFar;\n#endif\n\n void main() {\n #if FLOAT_BUFFER == 1\n vec3 normal = normalize(vNormal);\n #else\n vec3 normal = normalize(vNormal) * 0.5 + 0.5;\n #endif\n #if LINEAR_DEPTH == 1\n float depth = (-vZ - cameraNear) / (cameraFar - cameraNear);\n #else\n float depth = gl_FragCoord.z;\n #endif\n gl_FragColor = vec4(normal, depth);\n }", at = class e extends l {
628
+ }, rt = "varying vec3 vNormal;\n#if LINEAR_DEPTH == 1\n varying float vZ; \n#endif\n\n void main() {\n vNormal = normalMatrix * normal;\n vec4 viewPosition = modelViewMatrix * vec4(position, 1.0);\n #if LINEAR_DEPTH == 1\n vZ = viewPosition.z; \n #endif\n gl_Position = projectionMatrix * viewPosition;\n }", it = "varying vec3 vNormal;\n#if LINEAR_DEPTH == 1\n varying float vZ; \n uniform float cameraNear;\n uniform float cameraFar;\n#endif\n\n void main() {\n #if FLOAT_BUFFER == 1\n vec3 normal = normalize(vNormal);\n #else\n vec3 normal = normalize(vNormal) * 0.5 + 0.5;\n #endif\n #if LINEAR_DEPTH == 1\n float depth = (-vZ - cameraNear) / (cameraFar - cameraNear);\n #else\n float depth = gl_FragCoord.z;\n #endif\n gl_FragColor = vec4(normal, depth);\n }", at = class e extends h {
612
629
  static {
613
630
  this._normalAndDepthShader = {
614
631
  uniforms: {
@@ -630,7 +647,7 @@ var W = class e extends T {
630
647
  FLOAT_BUFFER: t?.floatBufferType ? 1 : 0,
631
648
  LINEAR_DEPTH: t?.linearDepth ? 1 : 0
632
649
  }),
633
- uniforms: C.clone(e._normalAndDepthShader.uniforms),
650
+ uniforms: T.clone(e._normalAndDepthShader.uniforms),
634
651
  vertexShader: e._normalAndDepthShader.vertexShader,
635
652
  fragmentShader: e._normalAndDepthShader.fragmentShader,
636
653
  blending: t?.blending ?? 0
@@ -664,18 +681,18 @@ var W = class e extends T {
664
681
  blending: 0,
665
682
  floatBufferType: !0,
666
683
  linearDepth: !1
667
- }) : new ce({ blending: 0 })), this._gBufferRenderMaterial instanceof at && this._gBufferRenderMaterial.update({ camera: e }), this._gBufferRenderMaterial;
684
+ }) : new fe({ blending: 0 })), this._gBufferRenderMaterial instanceof at && this._gBufferRenderMaterial.update({ camera: e }), this._gBufferRenderMaterial;
668
685
  }
669
686
  get depthNormalRenderTarget() {
670
- if (!this._depthNormalRenderTarget) if (this.floatRgbNormalAlphaDepth) this._depthNormalRenderTarget = new t(this._width * this.parameters.depthNormalScale, this._height * this.parameters.depthNormalScale, {
687
+ if (!this._depthNormalRenderTarget) if (this.floatRgbNormalAlphaDepth) this._depthNormalRenderTarget = new s(this._width * this.parameters.depthNormalScale, this._height * this.parameters.depthNormalScale, {
671
688
  minFilter: this._targetMinificationTextureFilter,
672
689
  magFilter: this._targetMagnificationTextureFilter,
673
- type: S,
690
+ type: w,
674
691
  samples: this._samples
675
692
  });
676
693
  else {
677
- let e = new ee(this._width * this.parameters.depthNormalScale, this._height * this.parameters.depthNormalScale);
678
- e.format = d, e.type = ye, this._depthNormalRenderTarget = new t(this._width * this.parameters.depthNormalScale, this._height * this.parameters.depthNormalScale, {
694
+ let e = new ie(this._width * this.parameters.depthNormalScale, this._height * this.parameters.depthNormalScale);
695
+ e.format = ee, e.type = Se, this._depthNormalRenderTarget = new s(this._width * this.parameters.depthNormalScale, this._height * this.parameters.depthNormalScale, {
679
696
  minFilter: this._targetMinificationTextureFilter,
680
697
  magFilter: this._targetMagnificationTextureFilter,
681
698
  depthTexture: e
@@ -684,10 +701,10 @@ var W = class e extends T {
684
701
  return this._depthNormalRenderTarget;
685
702
  }
686
703
  get separateDeptRenderTarget() {
687
- return this._separateDeptRenderTarget ||= new t(this._width * this.parameters.depthNormalScale, this._height * this.parameters.depthNormalScale, {
704
+ return this._separateDeptRenderTarget ||= new s(this._width * this.parameters.depthNormalScale, this._height * this.parameters.depthNormalScale, {
688
705
  minFilter: this._targetMinificationTextureFilter,
689
706
  magFilter: this._targetMagnificationTextureFilter,
690
- type: S,
707
+ type: w,
691
708
  samples: 0
692
709
  }), this._separateDeptRenderTarget;
693
710
  }
@@ -709,19 +726,19 @@ var W = class e extends T {
709
726
  this.passRenderer.renderWithOverrideMaterial(e, t, n, this.updateGBufferRenderMaterial(n), this.depthNormalRenderTarget, 7829503, 1);
710
727
  }
711
728
  getCopyMaterial(e) {
712
- return this._copyMaterial ??= new N(), this._copyMaterial.update(e);
729
+ return this._copyMaterial ??= new F(), this._copyMaterial.update(e);
713
730
  }
714
731
  _copyDepthToSeparateDepthTexture(e, t) {
715
732
  this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
716
733
  texture: t.texture,
717
734
  blending: 0,
718
- colorTransform: we,
719
- colorBase: P,
735
+ colorTransform: Oe,
736
+ colorBase: L,
720
737
  multiplyChannels: 0,
721
- uvTransform: M
738
+ uvTransform: P
722
739
  }), this.separateDeptRenderTarget);
723
740
  }
724
- }, st = class extends He {
741
+ }, st = class extends n {
725
742
  set groundDepthWrite(e) {
726
743
  this._groundDepthWrite = e;
727
744
  }
@@ -733,7 +750,7 @@ var W = class e extends T {
733
750
  this.addToCache(e, { visible: !1 });
734
751
  }
735
752
  addMesh(e) {
736
- e.userData.isFloor ? this.addToCache(e, { visible: this._groundDepthWrite }) : e.visible && (Ue(e.material, .7) || H(e.material)) && this.addToCache(e, { visible: !1 });
753
+ e.userData.isFloor ? this.addToCache(e, { visible: this._groundDepthWrite }) : e.visible && (t(e.material, .7) || o(e.material)) && this.addToCache(e, { visible: !1 });
737
754
  }
738
755
  addObject(e) {
739
756
  e.name === "dimensioning" && this.addToCache(e, { visible: !1 });
@@ -762,19 +779,19 @@ var W = class e extends T {
762
779
  groundReflectionScale: 1,
763
780
  renderTargetDownScale: 4,
764
781
  ...i
765
- }, this._copyMaterial = new N({}, z.ADDITIVE, !0, !0), this._updateCopyMaterial(null), this._reflectionIntensityMaterial = new dt({
782
+ }, this._copyMaterial = new F({}, V.ADDITIVE, !0, !0), this._updateCopyMaterial(null), this._reflectionIntensityMaterial = new dt({
766
783
  width: this._width / this.parameters.renderTargetDownScale,
767
784
  height: this._height / this.parameters.renderTargetDownScale
768
- }), this._blurPass = new Ee(Le, {
785
+ }), this._blurPass = new Ae(Be, {
769
786
  ...i,
770
787
  passRenderer: this.renderPassManager.passRenderer
771
788
  });
772
789
  }
773
790
  _newRenderTarget(e) {
774
- let n = this._width / this.parameters.renderTargetDownScale, r = this._height / this.parameters.renderTargetDownScale, i = {};
775
- return e ? (i.depthTexture = new ee(n, r), i.samples = this._samples) : i.samples = 1, new t(n, r, {
776
- format: p,
777
- ...i
791
+ let t = this._width / this.parameters.renderTargetDownScale, n = this._height / this.parameters.renderTargetDownScale, r = {};
792
+ return e ? (r.depthTexture = new ie(t, n), r.samples = this._samples) : r.samples = 1, new s(t, n, {
793
+ format: v,
794
+ ...r
778
795
  });
779
796
  }
780
797
  dispose() {
@@ -796,13 +813,13 @@ var W = class e extends T {
796
813
  let n = this.parameters.intensity * t, r = this.parameters.brightness;
797
814
  this._copyMaterial.update({
798
815
  texture: e?.texture ?? void 0,
799
- colorTransform: new x().set(r, 0, 0, 0, 0, r, 0, 0, 0, 0, r, 0, 0, 0, 0, n),
816
+ colorTransform: new C().set(r, 0, 0, 0, 0, r, 0, 0, 0, 0, r, 0, 0, 0, 0, n),
800
817
  multiplyChannels: 0,
801
- uvTransform: A
818
+ uvTransform: M
802
819
  }), this._copyMaterial.depthTest = !0, this._copyMaterial.depthWrite = !1;
803
820
  }
804
821
  renderPass(e) {
805
- if (!this.parameters.enabled || !(this.camera instanceof de)) return;
822
+ if (!this.parameters.enabled || !(this.camera instanceof he)) return;
806
823
  let t = this._createGroundReflectionCamera(this.camera);
807
824
  this.renderCacheManager.render("groundReflection", this.scene, () => {
808
825
  this._renderGroundReflection(e, this.scene, t, this.reflectionRenderTarget);
@@ -828,7 +845,7 @@ var W = class e extends T {
828
845
  }), e.getRenderTarget()), e.setRenderTarget(r);
829
846
  }
830
847
  blurReflection(e, t, n) {
831
- let r = new s(t.matrixWorld.elements[4], t.matrixWorld.elements[5], t.matrixWorld.elements[6]), i = this.parameters.blurHorizontal / this._width, a = this.parameters.blurVertical / this._height * Math.abs(r.dot(new s(0, 0, 1)));
848
+ let r = new p(t.matrixWorld.elements[4], t.matrixWorld.elements[5], t.matrixWorld.elements[6]), i = this.parameters.blurHorizontal / this._width, a = this.parameters.blurVertical / this._height * Math.abs(r.dot(new p(0, 0, 1)));
832
849
  this._blurPass.render(e, n, [i * 4, a * 4], [i * 4 * (1 + this.parameters.blurAscent), a * 4 * (1 + this.parameters.blurAscent)]);
833
850
  }
834
851
  _createGroundReflectionCamera(e) {
@@ -840,18 +857,18 @@ var W = class e extends T {
840
857
  bottom: 1 - n._offset.top
841
858
  }, t.position.set(e.position.x, -e.position.y + 2 * this.parameters.groundLevel, e.position.z), t.rotation.set(-e.rotation.x, e.rotation.y, -e.rotation.z), t.updateMatrixWorld(), t.updateProjectionMatrix(), t;
842
859
  }
843
- }, lt = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }", ut = "\n uniform sampler2D tDiffuse;\n uniform sampler2D tDepth;\n uniform vec2 resolution;\n uniform float cameraNear;\n uniform float cameraFar;\n uniform mat4 cameraProjectionMatrix;\n uniform mat4 cameraInverseProjectionMatrix;\n uniform mat4 inverseViewMatrix;\n uniform float groundLevel;\n uniform float fadeOutDistance;\n uniform float fadeOutExponent;\n varying vec2 vUv;\n\n #include <packing>\n\n float getDepth(const in vec2 screenPosition) {\n return texture2D(tDepth, screenPosition).x;\n }\n\n float getLinearDepth(const in vec2 screenPosition) {\n #if PERSPECTIVE_CAMERA == 1\n float fragCoordZ = texture2D(tDepth, screenPosition).x;\n float viewZ = perspectiveDepthToViewZ(fragCoordZ, cameraNear, cameraFar);\n return viewZToOrthographicDepth(viewZ, cameraNear, cameraFar);\n #else\n return texture2D(tDepth, screenPosition).x;\n #endif\n }\n\n float getViewZ(const in float depth) {\n #if PERSPECTIVE_CAMERA == 1\n return perspectiveDepthToViewZ(depth, cameraNear, cameraFar);\n #else\n return 0.0;//orthographicDepthToViewZ(depth, cameraNear, cameraFar);\n #endif\n }\n\n vec3 getViewPosition(const in vec2 screenPosition, const in float depth, const in float viewZ ) {\n float clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];\n vec4 clipPosition = vec4((vec3(screenPosition, depth) - 0.5) * 2.0, 1.0);\n clipPosition *= clipW;\n return (cameraInverseProjectionMatrix * clipPosition).xyz;\n }\n\n void main() {\n float verticalBias = 1.5 / resolution.y;\n vec2 uv = vUv.xy + vec2(0.0, verticalBias);\n float depth = getDepth(uv);\n float viewZ = getViewZ(depth);\n vec4 worldPosition = inverseViewMatrix * vec4(getViewPosition(uv, depth, viewZ), 1.0);\n float distance = worldPosition.y - groundLevel;\n vec2 diffuseTextureSize = vec2(textureSize(tDiffuse, 0 ));\n vec4 fragColor = texelFetch(tDiffuse, ivec2(uv * diffuseTextureSize), 0).rgba;\n #if LINEAR_TO_SRGB == 1\n fragColor.rgb = mix(fragColor.rgb * 12.92, 1.055 * pow(fragColor.rgb, vec3(0.41666)) - 0.055, step(0.0031308, fragColor.rgb));\n #endif\n float fadeOutAlpha = pow(clamp(1.0 - distance / fadeOutDistance, 0.0, 1.0), fadeOutExponent);\n fragColor.a *= fadeOutAlpha * step(depth, 0.9999);\n #if PREMULTIPLIED_ALPHA == 1\n gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\n #else\n gl_FragColor = fragColor;\n #endif\n }", dt = class e extends l {
860
+ }, lt = "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }", ut = "\n uniform sampler2D tDiffuse;\n uniform sampler2D tDepth;\n uniform vec2 resolution;\n uniform float cameraNear;\n uniform float cameraFar;\n uniform mat4 cameraProjectionMatrix;\n uniform mat4 cameraInverseProjectionMatrix;\n uniform mat4 inverseViewMatrix;\n uniform float groundLevel;\n uniform float fadeOutDistance;\n uniform float fadeOutExponent;\n varying vec2 vUv;\n\n #include <packing>\n\n float getDepth(const in vec2 screenPosition) {\n return texture2D(tDepth, screenPosition).x;\n }\n\n float getLinearDepth(const in vec2 screenPosition) {\n #if PERSPECTIVE_CAMERA == 1\n float fragCoordZ = texture2D(tDepth, screenPosition).x;\n float viewZ = perspectiveDepthToViewZ(fragCoordZ, cameraNear, cameraFar);\n return viewZToOrthographicDepth(viewZ, cameraNear, cameraFar);\n #else\n return texture2D(tDepth, screenPosition).x;\n #endif\n }\n\n float getViewZ(const in float depth) {\n #if PERSPECTIVE_CAMERA == 1\n return perspectiveDepthToViewZ(depth, cameraNear, cameraFar);\n #else\n return 0.0;//orthographicDepthToViewZ(depth, cameraNear, cameraFar);\n #endif\n }\n\n vec3 getViewPosition(const in vec2 screenPosition, const in float depth, const in float viewZ ) {\n float clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];\n vec4 clipPosition = vec4((vec3(screenPosition, depth) - 0.5) * 2.0, 1.0);\n clipPosition *= clipW;\n return (cameraInverseProjectionMatrix * clipPosition).xyz;\n }\n\n void main() {\n float verticalBias = 1.5 / resolution.y;\n vec2 uv = vUv.xy + vec2(0.0, verticalBias);\n float depth = getDepth(uv);\n float viewZ = getViewZ(depth);\n vec4 worldPosition = inverseViewMatrix * vec4(getViewPosition(uv, depth, viewZ), 1.0);\n float distance = worldPosition.y - groundLevel;\n vec2 diffuseTextureSize = vec2(textureSize(tDiffuse, 0 ));\n vec4 fragColor = texelFetch(tDiffuse, ivec2(uv * diffuseTextureSize), 0).rgba;\n #if LINEAR_TO_SRGB == 1\n fragColor.rgb = mix(fragColor.rgb * 12.92, 1.055 * pow(fragColor.rgb, vec3(0.41666)) - 0.055, step(0.0031308, fragColor.rgb));\n #endif\n float fadeOutAlpha = pow(clamp(1.0 - distance / fadeOutDistance, 0.0, 1.0), fadeOutExponent);\n fragColor.a *= fadeOutAlpha * step(depth, 0.9999);\n #if PREMULTIPLIED_ALPHA == 1\n gl_FragColor = vec4(fragColor.rgb * fragColor.a, fragColor.a);\n #else\n gl_FragColor = fragColor;\n #endif\n }", dt = class e extends h {
844
861
  static {
845
862
  this.shader = {
846
863
  uniforms: {
847
864
  tDiffuse: { value: null },
848
865
  tDepth: { value: null },
849
- resolution: { value: new _() },
866
+ resolution: { value: new b() },
850
867
  cameraNear: { value: .1 },
851
868
  cameraFar: { value: 1 },
852
- cameraProjectionMatrix: { value: new x() },
853
- cameraInverseProjectionMatrix: { value: new x() },
854
- inverseViewMatrix: { value: new x() },
869
+ cameraProjectionMatrix: { value: new C() },
870
+ cameraInverseProjectionMatrix: { value: new C() },
871
+ inverseViewMatrix: { value: new C() },
855
872
  groundLevel: { value: 0 },
856
873
  fadeOutDistance: { value: 1 },
857
874
  fadeOutExponent: { value: 1 }
@@ -868,7 +885,7 @@ var W = class e extends T {
868
885
  constructor(t) {
869
886
  super({
870
887
  defines: Object.assign({}, e.shader.defines),
871
- uniforms: C.clone(e.shader.uniforms),
888
+ uniforms: T.clone(e.shader.uniforms),
872
889
  vertexShader: e.shader.vertexShader,
873
890
  fragmentShader: e.shader.fragmentShader,
874
891
  blending: 0
@@ -885,7 +902,7 @@ var W = class e extends T {
885
902
  }
886
903
  return e?.groundLevel !== void 0 && (this.uniforms.groundLevel.value = e?.groundLevel), e?.fadeOutDistance !== void 0 && (this.uniforms.fadeOutDistance.value = e?.fadeOutDistance), e?.fadeOutExponent !== void 0 && (this.uniforms.fadeOutExponent.value = e?.fadeOutExponent), this;
887
904
  }
888
- }, ft = class extends r {
905
+ }, ft = class extends l {
889
906
  constructor(e, t) {
890
907
  let n = [
891
908
  1,
@@ -903,9 +920,9 @@ var W = class e extends T {
903
920
  1,
904
921
  1,
905
922
  0
906
- ], r = new se();
907
- r.setAttribute("position", new he(n, 3)), r.computeBoundingSphere();
908
- let i = new u({ fog: !1 });
923
+ ], r = new de();
924
+ r.setAttribute("position", new ye(n, 3)), r.computeBoundingSphere();
925
+ let i = new g({ fog: !1 });
909
926
  super(r, i), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
910
927
  let a = [
911
928
  1,
@@ -926,8 +943,8 @@ var W = class e extends T {
926
943
  1,
927
944
  -1,
928
945
  0
929
- ], o = new se();
930
- o.setAttribute("position", new he(a, 3)), o.computeBoundingSphere(), this.add(new T(o, new E({
946
+ ], o = new de();
947
+ o.setAttribute("position", new ye(a, 3)), o.computeBoundingSphere(), this.add(new D(o, new O({
931
948
  side: 1,
932
949
  fog: !1
933
950
  })));
@@ -944,21 +961,21 @@ var W = class e extends T {
944
961
  dispose() {
945
962
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
946
963
  }
947
- }, pt = class e extends me {
964
+ }, pt = class e extends ve {
948
965
  static {
949
966
  this._enableGroundBoundary = !1;
950
967
  }
951
968
  static {
952
- this._shadowFadeOut = new _(.1, 20);
969
+ this._shadowFadeOut = new b(.1, 20);
953
970
  }
954
971
  static {
955
- this._sceneBoxMin = new s(-1, -1, -1);
972
+ this._sceneBoxMin = new p(-1, -1, -1);
956
973
  }
957
974
  static {
958
- this._sceneBoxMax = new s(1, 1, 1);
975
+ this._sceneBoxMax = new p(1, 1, 1);
959
976
  }
960
977
  static {
961
- this._distributionProperties = new i(1, 1, 1, 1);
978
+ this._distributionProperties = new u(1, 1, 1, 1);
962
979
  }
963
980
  constructor(e) {
964
981
  super(e), this.customProgramCacheKey = this._customProgramCacheKey, this.onBeforeCompile = this._onBeforeCompile;
@@ -1003,14 +1020,14 @@ var W = class e extends T {
1003
1020
  set shadowOnGround(e) {
1004
1021
  this._shadowMapPassOverrideMaterialCache.shadowOnGround = e;
1005
1022
  }
1006
- constructor(e, r, i) {
1007
- super(e), this.needsUpdate = !1, this.drawGround = !0, this.shadowTypeNeedsUpdate = !0, this.shadowConfiguration = new bt(), this._shadowLightSources = [], this._shadowScale = 1, this._groundMapScale = 1, this._cameraUpdate = new De(), this._viewportSize = new _(r.x, r.y), this._samples = i?.samples ?? 0, this._shadowMapSize = i?.shadowMapSize ?? 1024, this.parameters = this._getScreenSpaceShadowMapParameters(i), this.castShadow = this.parameters.enableShadowMap, this._shadowMapPassOverrideMaterialCache = new yt(), this.renderCacheManager?.registerCache(this, this._shadowMapPassOverrideMaterialCache);
1008
- let a = this._samples;
1009
- this._shadowRenderTarget = new t(this._viewportSize.x, this._viewportSize.y, {
1010
- samples: a,
1011
- format: n,
1012
- magFilter: this._samples > 0 ? f : O,
1013
- minFilter: this._samples > 0 ? f : O
1023
+ constructor(e, t, n) {
1024
+ super(e), this.needsUpdate = !1, this.drawGround = !0, this.shadowTypeNeedsUpdate = !0, this.shadowConfiguration = new bt(), this._shadowLightSources = [], this._shadowScale = 1, this._groundMapScale = 1, this._cameraUpdate = new I(), this._viewportSize = new b(t.x, t.y), this._samples = n?.samples ?? 0, this._shadowMapSize = n?.shadowMapSize ?? 1024, this.parameters = this._getScreenSpaceShadowMapParameters(n), this.castShadow = this.parameters.enableShadowMap, this._shadowMapPassOverrideMaterialCache = new yt(), this.renderCacheManager?.registerCache(this, this._shadowMapPassOverrideMaterialCache);
1025
+ let r = this._samples;
1026
+ this._shadowRenderTarget = new s(this._viewportSize.x, this._viewportSize.y, {
1027
+ samples: r,
1028
+ format: c,
1029
+ magFilter: this._samples > 0 ? _ : j,
1030
+ minFilter: this._samples > 0 ? _ : j
1014
1031
  });
1015
1032
  }
1016
1033
  _getScreenSpaceShadowMapParameters(e) {
@@ -1029,7 +1046,7 @@ var W = class e extends T {
1029
1046
  let n = this._shadowScale;
1030
1047
  if (this._shadowScale = t, Math.abs(n - this._shadowScale) > 1e-5 && (this.shadowTypeNeedsUpdate = !0), this._shadowLightSources.forEach((t) => t.updateBounds(e)), this._shadowLightSources.length > 0) {
1031
1048
  let e = this._shadowLightSources[0].getShadowLight().shadow?.camera;
1032
- e instanceof a && (this._groundMapScale = 2 * this._shadowMapSize / (Math.abs(e.right - e.left) + Math.abs(e.top - e.bottom)));
1049
+ e instanceof d && (this._groundMapScale = 2 * this._shadowMapSize / (Math.abs(e.right - e.left) + Math.abs(e.top - e.bottom)));
1033
1050
  } else this._groundMapScale = 1;
1034
1051
  this._shadowMapPassOverrideMaterialCache.setBoundingBox(e.bounds);
1035
1052
  }
@@ -1075,7 +1092,7 @@ var W = class e extends T {
1075
1092
  e.forEach((e) => {
1076
1093
  let n = e.maxIntensity * t;
1077
1094
  if (n >= .1 && e.position.z >= 0) {
1078
- let t = new Ct(new s(e.position.x, e.position.z, e.position.y).multiplyScalar(7), n, {
1095
+ let t = new Ct(new p(e.position.x, e.position.z, e.position.y).multiplyScalar(7), n, {
1079
1096
  shadowMapSize: this._shadowMapSize,
1080
1097
  shadowLightSourceType: this.parameters.shadowLightSourceType
1081
1098
  });
@@ -1086,13 +1103,13 @@ var W = class e extends T {
1086
1103
  _createShadowLightSourceArray(e) {
1087
1104
  let t = [];
1088
1105
  if (e) {
1089
- let e = new wt(new s(0, 7, 0), { shadowMapSize: this._shadowMapSize });
1106
+ let e = new wt(new p(0, 7, 0), { shadowMapSize: this._shadowMapSize });
1090
1107
  t.push(e);
1091
1108
  }
1092
1109
  return this.parameters.enableGroundBoundary = e, t;
1093
1110
  }
1094
1111
  setSize(e, t) {
1095
- this._viewportSize = new _(e, t), this._shadowRenderTarget.setSize(this._viewportSize.x, this._viewportSize.y);
1112
+ this._viewportSize = new b(e, t), this._shadowRenderTarget.setSize(this._viewportSize.x, this._viewportSize.y);
1096
1113
  }
1097
1114
  updatePositionAndTarget() {
1098
1115
  this._shadowLightSources.forEach((e) => e.updatePositionAndTarget());
@@ -1130,12 +1147,12 @@ var W = class e extends T {
1130
1147
  switchType(e) {
1131
1148
  return this.shadowConfiguration.switchType(e) ? (this.needsUpdate = !0, this.shadowTypeNeedsUpdate = !0, !0) : !1;
1132
1149
  }
1133
- }, X = {
1150
+ }, Z = {
1134
1151
  DEFAULT: "default",
1135
1152
  UNLIT: "unlit",
1136
1153
  EMISSIVE: "emissive",
1137
1154
  SHADOW: "shadow"
1138
- }, yt = class e extends He {
1155
+ }, yt = class e extends n {
1139
1156
  static {
1140
1157
  this.useModifiedMaterial = !0;
1141
1158
  }
@@ -1143,7 +1160,7 @@ var W = class e extends T {
1143
1160
  this._shadowOnGround = e;
1144
1161
  }
1145
1162
  constructor() {
1146
- super(), this._boundingBoxSet = !1, this._shadowOnGround = !0, this._shadowObjectMaterial = this._createShadowMaterial(X.DEFAULT), this._unlitMaterial = this._createShadowMaterial(X.UNLIT), this._emissiveMaterial = this._createShadowMaterial(X.EMISSIVE), this._receiveShadowMaterial = this._createShadowMaterial(X.SHADOW);
1163
+ super(), this._boundingBoxSet = !1, this._shadowOnGround = !0, this._shadowObjectMaterial = this._createShadowMaterial(Z.DEFAULT), this._unlitMaterial = this._createShadowMaterial(Z.UNLIT), this._emissiveMaterial = this._createShadowMaterial(Z.EMISSIVE), this._receiveShadowMaterial = this._createShadowMaterial(Z.SHADOW);
1147
1164
  }
1148
1165
  dispose() {
1149
1166
  this._shadowObjectMaterial.dispose(), this._unlitMaterial.dispose(), this._emissiveMaterial.dispose(), this._receiveShadowMaterial.dispose();
@@ -1156,10 +1173,10 @@ var W = class e extends T {
1156
1173
  }
1157
1174
  _createShadowMaterial(t) {
1158
1175
  let n;
1159
- return n = t === X.EMISSIVE || t === X.UNLIT ? new E({
1176
+ return n = t === Z.EMISSIVE || t === Z.UNLIT ? new O({
1160
1177
  color: 16777215,
1161
1178
  side: 2
1162
- }) : t === X.SHADOW ? new m({ side: 2 }) : e.useModifiedMaterial ? this._createCustomerShadowMaterial() : new oe({
1179
+ }) : t === Z.SHADOW ? new te({ side: 2 }) : e.useModifiedMaterial ? this._createCustomerShadowMaterial() : new ue({
1163
1180
  color: 16777215,
1164
1181
  shininess: 0,
1165
1182
  polygonOffsetFactor: 0,
@@ -1180,14 +1197,14 @@ var W = class e extends T {
1180
1197
  e.isLight && !e.userData.shadowLightSource && this.addToCache(e, { visible: !1 });
1181
1198
  }
1182
1199
  _setMeshMaterialAndVisibility(e) {
1183
- e.userData.isFloor ? this._setMeshShadowFloorMaterial(e) : e.material && e.receiveShadow && !Array.isArray(e.material) && !(e.material.transparent === !0 && e.material.opacity < .9) ? this._setShadowMaterialForOpaqueObject(e) : Ue(e.material, .9) ? this.addToCache(e, { visible: !1 }) : e.receiveShadow ? this.addToCache(e, {
1200
+ e.userData.isFloor ? this._setMeshShadowFloorMaterial(e) : e.material && e.receiveShadow && !Array.isArray(e.material) && !(e.material.transparent === !0 && e.material.opacity < .9) ? this._setShadowMaterialForOpaqueObject(e) : t(e.material, .9) ? this.addToCache(e, { visible: !1 }) : e.receiveShadow ? this.addToCache(e, {
1184
1201
  castShadow: !1,
1185
1202
  material: this._receiveShadowMaterial
1186
1203
  }) : this.addToCache(e, { visible: !1 });
1187
1204
  }
1188
1205
  _setShadowMaterialForOpaqueObject(e) {
1189
1206
  let t = e.material;
1190
- t instanceof u || t instanceof E ? this.addToCache(e, { material: this._unlitMaterial }) : t instanceof _e ? this._setMeshShadowStandardMaterial(e, t) : this.addToCache(e, { material: e.receiveShadow ? this._shadowObjectMaterial : this._unlitMaterial });
1207
+ t instanceof g || t instanceof O ? this.addToCache(e, { material: this._unlitMaterial }) : t instanceof k ? this._setMeshShadowStandardMaterial(e, t) : this.addToCache(e, { material: e.receiveShadow ? this._shadowObjectMaterial : this._unlitMaterial });
1191
1208
  }
1192
1209
  _setMeshShadowStandardMaterial(e, t) {
1193
1210
  let n = t.emissiveIntensity > 0 && (t.emissive.r > 0 || t.emissive.g > 0 || t.emissive.b > 0);
@@ -1257,7 +1274,7 @@ var W = class e extends T {
1257
1274
  }
1258
1275
  }, xt = class {
1259
1276
  constructor(e, t) {
1260
- this._isVisibleBackup = !0, this._castShadowBackup = !0, this._shadowMapSize = t?.shadowMapSize ?? 1024, this._blurSamples = t?.blurSamples ?? 8, this._shadowLightSource = e, this._shadowLightSource.visible = !1, this._shadowLightSource.castShadow = !0, this._shadowLightSource.shadow && (this._shadowLightSource.shadow.mapSize = new _(this._shadowMapSize, this._shadowMapSize), this._shadowLightSource.shadow.blurSamples = this._blurSamples, this._shadowLightSource.shadow.autoUpdate = !1), this._shadowLightSource.userData.shadowLightSource = this;
1277
+ this._isVisibleBackup = !0, this._castShadowBackup = !0, this._shadowMapSize = t?.shadowMapSize ?? 1024, this._blurSamples = t?.blurSamples ?? 8, this._shadowLightSource = e, this._shadowLightSource.visible = !1, this._shadowLightSource.castShadow = !0, this._shadowLightSource.shadow && (this._shadowLightSource.shadow.mapSize = new b(this._shadowMapSize, this._shadowMapSize), this._shadowLightSource.shadow.blurSamples = this._blurSamples, this._shadowLightSource.shadow.autoUpdate = !1), this._shadowLightSource.userData.shadowLightSource = this;
1261
1278
  }
1262
1279
  getPosition() {
1263
1280
  return this._shadowLightSource.position;
@@ -1278,10 +1295,10 @@ var W = class e extends T {
1278
1295
  e.remove(this._shadowLightSource);
1279
1296
  }
1280
1297
  updatePositionAndTarget() {
1281
- this._updateShadowPositionAndTarget(this.getPosition(), new s(0, 0, 0));
1298
+ this._updateShadowPositionAndTarget(this.getPosition(), new p(0, 0, 0));
1282
1299
  }
1283
1300
  updateBounds(e) {
1284
- if (this._shadowLightSource instanceof w) {
1301
+ if (this._shadowLightSource instanceof me) {
1285
1302
  let t = this._shadowLightSource.shadow.camera, n = e.bounds.clone().applyMatrix4(t.matrixWorldInverse), r = Math.max(.001, Math.min(-n.min.z, -n.max.z)), i = Math.max(-n.min.z, -n.max.z), a = Math.max(Math.abs(n.min.x), Math.abs(n.max.x)), o = Math.max(Math.abs(n.min.y), Math.abs(n.max.y)), s = Math.atan2(Math.hypot(o, a) * 1.05, r);
1286
1303
  t.aspect = 1, t.near = r, t.far = i, this._shadowLightSource.angle = s;
1287
1304
  } else if (this._shadowLightSource.shadow) {
@@ -1296,7 +1313,7 @@ var W = class e extends T {
1296
1313
  this._shadowLightSource.shadow && (this._shadowLightSource.shadow.needsUpdate = !0);
1297
1314
  }
1298
1315
  _updateShadowPositionAndTarget(e, t) {
1299
- if (this._shadowLightSource instanceof w) {
1316
+ if (this._shadowLightSource instanceof me) {
1300
1317
  let n = t.clone().sub(e), r = n.length();
1301
1318
  n.normalize();
1302
1319
  let i = t.clone().sub(n.clone().multiplyScalar(r * 4));
@@ -1318,10 +1335,10 @@ var W = class e extends T {
1318
1335
  switch (t?.shadowLightSourceType) {
1319
1336
  default:
1320
1337
  case gt.DIRECTION_LIGHT_SHADOW:
1321
- n = new y(16777215, 1);
1338
+ n = new x(16777215, 1);
1322
1339
  break;
1323
1340
  case gt.SPOT_LIGHT_SHADOW:
1324
- n = new w(16777215, 1, 0, Math.PI / 4, 0);
1341
+ n = new me(16777215, 1, 0, Math.PI / 4, 0);
1325
1342
  break;
1326
1343
  }
1327
1344
  n.position.copy(e.position), n.lookAt(0, 0, 0), super(n, t), this._rectAreaLight = e, this._rectAreaLight.userData.shadowLightSource = this, t?.addHelper && (this._rectLightHelper = new ft(this._rectAreaLight), this._rectLightHelper.material.depthWrite = !1, this._rectAreaLight.add(this._rectLightHelper));
@@ -1347,7 +1364,7 @@ var W = class e extends T {
1347
1364
  }
1348
1365
  }, Ct = class extends xt {
1349
1366
  constructor(e, t, n) {
1350
- let r = new y(16777215, t);
1367
+ let r = new x(16777215, t);
1351
1368
  r.position.copy(e), r.lookAt(0, 0, 0), r.updateMatrix(), r.castShadow = !0, super(r, n), this._position = e.clone(), this._intensity = t;
1352
1369
  }
1353
1370
  getPosition() {
@@ -1365,7 +1382,7 @@ var W = class e extends T {
1365
1382
  }
1366
1383
  }, wt = class extends xt {
1367
1384
  constructor(e, t) {
1368
- let n = new y(16777215, 1);
1385
+ let n = new x(16777215, 1);
1369
1386
  n.position.copy(e), n.lookAt(0, 0, 0), n.updateMatrix(), n.castShadow = !0, super(n, t), this._position = e.clone();
1370
1387
  }
1371
1388
  getPosition() {
@@ -1393,35 +1410,35 @@ var W = class e extends T {
1393
1410
  name: "FXAAShader",
1394
1411
  uniforms: {
1395
1412
  tDiffuse: { value: null },
1396
- resolution: { value: new _(1 / 1024, 1 / 512) }
1413
+ resolution: { value: new b(1 / 1024, 1 / 512) }
1397
1414
  },
1398
1415
  vertexShader: "\n\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }",
1399
1416
  fragmentShader: "\n\n uniform sampler2D tDiffuse;\n uniform vec2 resolution;\n varying vec2 vUv;\n\n #define EDGE_STEP_COUNT 6\n #define EDGE_GUESS 8.0\n #define EDGE_STEPS 1.0, 1.5, 2.0, 2.0, 2.0, 4.0\n const float edgeSteps[EDGE_STEP_COUNT] = float[EDGE_STEP_COUNT]( EDGE_STEPS );\n\n float _ContrastThreshold = 0.0312;\n float _RelativeThreshold = 0.063;\n float _SubpixelBlending = 1.0;\n\n vec4 Sample( sampler2D tex2D, vec2 uv ) {\n\n return texture( tex2D, uv );\n\n }\n\n float SampleLuminance( sampler2D tex2D, vec2 uv ) {\n\n return dot( Sample( tex2D, uv ).rgb, vec3( 0.3, 0.59, 0.11 ) );\n\n }\n\n float SampleLuminance( sampler2D tex2D, vec2 texSize, vec2 uv, float uOffset, float vOffset ) {\n\n uv += texSize * vec2(uOffset, vOffset);\n return SampleLuminance(tex2D, uv);\n\n }\n\n struct LuminanceData {\n\n float m, n, e, s, w;\n float ne, nw, se, sw;\n float highest, lowest, contrast;\n\n };\n\n LuminanceData SampleLuminanceNeighborhood( sampler2D tex2D, vec2 texSize, vec2 uv ) {\n\n LuminanceData l;\n l.m = SampleLuminance( tex2D, uv );\n l.n = SampleLuminance( tex2D, texSize, uv, 0.0, 1.0 );\n l.e = SampleLuminance( tex2D, texSize, uv, 1.0, 0.0 );\n l.s = SampleLuminance( tex2D, texSize, uv, 0.0, -1.0 );\n l.w = SampleLuminance( tex2D, texSize, uv, -1.0, 0.0 );\n\n l.ne = SampleLuminance( tex2D, texSize, uv, 1.0, 1.0 );\n l.nw = SampleLuminance( tex2D, texSize, uv, -1.0, 1.0 );\n l.se = SampleLuminance( tex2D, texSize, uv, 1.0, -1.0 );\n l.sw = SampleLuminance( tex2D, texSize, uv, -1.0, -1.0 );\n\n l.highest = max( max( max( max( l.n, l.e ), l.s ), l.w ), l.m );\n l.lowest = min( min( min( min( l.n, l.e ), l.s ), l.w ), l.m );\n l.contrast = l.highest - l.lowest;\n return l;\n\n }\n\n bool ShouldSkipPixel( LuminanceData l ) {\n\n float threshold = max( _ContrastThreshold, _RelativeThreshold * l.highest );\n return l.contrast < threshold;\n\n }\n\n float DeterminePixelBlendFactor( LuminanceData l ) {\n\n float f = 2.0 * ( l.n + l.e + l.s + l.w );\n f += l.ne + l.nw + l.se + l.sw;\n f *= 1.0 / 12.0;\n f = abs( f - l.m );\n f = clamp( f / l.contrast, 0.0, 1.0 );\n\n float blendFactor = smoothstep( 0.0, 1.0, f );\n return blendFactor * blendFactor * _SubpixelBlending;\n\n }\n\n struct EdgeData {\n\n bool isHorizontal;\n float pixelStep;\n float oppositeLuminance, gradient;\n\n };\n\n EdgeData DetermineEdge( vec2 texSize, LuminanceData l ) {\n\n EdgeData e;\n float horizontal =\n abs( l.n + l.s - 2.0 * l.m ) * 2.0 +\n abs( l.ne + l.se - 2.0 * l.e ) +\n abs( l.nw + l.sw - 2.0 * l.w );\n float vertical =\n abs( l.e + l.w - 2.0 * l.m ) * 2.0 +\n abs( l.ne + l.nw - 2.0 * l.n ) +\n abs( l.se + l.sw - 2.0 * l.s );\n e.isHorizontal = horizontal >= vertical;\n\n float pLuminance = e.isHorizontal ? l.n : l.e;\n float nLuminance = e.isHorizontal ? l.s : l.w;\n float pGradient = abs( pLuminance - l.m );\n float nGradient = abs( nLuminance - l.m );\n\n e.pixelStep = e.isHorizontal ? texSize.y : texSize.x;\n\n if (pGradient < nGradient) {\n\n e.pixelStep = -e.pixelStep;\n e.oppositeLuminance = nLuminance;\n e.gradient = nGradient;\n\n } else {\n\n e.oppositeLuminance = pLuminance;\n e.gradient = pGradient;\n\n }\n\n return e;\n\n }\n\n float DetermineEdgeBlendFactor( sampler2D tex2D, vec2 texSize, LuminanceData l, EdgeData e, vec2 uv ) {\n\n vec2 uvEdge = uv;\n vec2 edgeStep;\n if (e.isHorizontal) {\n\n uvEdge.y += e.pixelStep * 0.5;\n edgeStep = vec2( texSize.x, 0.0 );\n\n } else {\n\n uvEdge.x += e.pixelStep * 0.5;\n edgeStep = vec2( 0.0, texSize.y );\n\n }\n\n float edgeLuminance = ( l.m + e.oppositeLuminance ) * 0.5;\n float gradientThreshold = e.gradient * 0.25;\n\n vec2 puv = uvEdge + edgeStep * edgeSteps[0];\n float pLuminanceDelta = SampleLuminance( tex2D, puv ) - edgeLuminance;\n bool pAtEnd = abs( pLuminanceDelta ) >= gradientThreshold;\n\n for ( int i = 1; i < EDGE_STEP_COUNT && !pAtEnd; i++ ) {\n\n puv += edgeStep * edgeSteps[i];\n pLuminanceDelta = SampleLuminance( tex2D, puv ) - edgeLuminance;\n pAtEnd = abs( pLuminanceDelta ) >= gradientThreshold;\n\n }\n\n if ( !pAtEnd ) {\n\n puv += edgeStep * EDGE_GUESS;\n\n }\n\n vec2 nuv = uvEdge - edgeStep * edgeSteps[0];\n float nLuminanceDelta = SampleLuminance( tex2D, nuv ) - edgeLuminance;\n bool nAtEnd = abs( nLuminanceDelta ) >= gradientThreshold;\n\n for ( int i = 1; i < EDGE_STEP_COUNT && !nAtEnd; i++ ) {\n\n nuv -= edgeStep * edgeSteps[i];\n nLuminanceDelta = SampleLuminance( tex2D, nuv ) - edgeLuminance;\n nAtEnd = abs( nLuminanceDelta ) >= gradientThreshold;\n\n }\n\n if ( !nAtEnd ) {\n\n nuv -= edgeStep * EDGE_GUESS;\n\n }\n\n float pDistance, nDistance;\n if ( e.isHorizontal ) {\n\n pDistance = puv.x - uv.x;\n nDistance = uv.x - nuv.x;\n\n } else {\n\n pDistance = puv.y - uv.y;\n nDistance = uv.y - nuv.y;\n\n }\n\n float shortestDistance;\n bool deltaSign;\n if ( pDistance <= nDistance ) {\n\n shortestDistance = pDistance;\n deltaSign = pLuminanceDelta >= 0.0;\n\n } else {\n\n shortestDistance = nDistance;\n deltaSign = nLuminanceDelta >= 0.0;\n\n }\n\n if ( deltaSign == ( l.m - edgeLuminance >= 0.0 ) ) {\n\n return 0.0;\n\n }\n\n return 0.5 - shortestDistance / ( pDistance + nDistance );\n\n }\n\n vec4 ApplyFXAA( sampler2D tex2D, vec2 texSize, vec2 uv ) {\n\n LuminanceData luminance = SampleLuminanceNeighborhood( tex2D, texSize, uv );\n if ( ShouldSkipPixel( luminance ) ) {\n\n return Sample( tex2D, uv );\n\n }\n\n float pixelBlend = DeterminePixelBlendFactor( luminance );\n EdgeData edge = DetermineEdge( texSize, luminance );\n float edgeBlend = DetermineEdgeBlendFactor( tex2D, texSize, luminance, edge, uv );\n float finalBlend = max( pixelBlend, edgeBlend );\n\n if (edge.isHorizontal) {\n\n uv.y += edge.pixelStep * finalBlend;\n\n } else {\n\n uv.x += edge.pixelStep * finalBlend;\n\n }\n\n return Sample( tex2D, uv );\n\n }\n\n void main() {\n\n gl_FragColor = ApplyFXAA( tDiffuse, resolution.xy, vUv );\n\n }"
1400
1417
  }, Dt = class e extends G {
1401
1418
  static {
1402
- this.BlurDirectionX = new _(1, 0);
1419
+ this.BlurDirectionX = new b(1, 0);
1403
1420
  }
1404
1421
  static {
1405
- this.BlurDirectionY = new _(0, 1);
1422
+ this.BlurDirectionY = new b(0, 1);
1406
1423
  }
1407
1424
  static {
1408
1425
  this.highlightLines = !0;
1409
1426
  }
1410
- constructor(e, n, r, i, a, o) {
1411
- super(e), this.patternTexture = null, this.clearBackground = !1, this.renderScene = r, this.renderCamera = i, this.selectedObjects = a === void 0 ? [] : a, this.visibleEdgeColor = new D(1, 1, 1), this.hiddenEdgeColor = new D(.1, .04, .02), this.edgeGlow = 0, this.usePatternTexture = !1, this.edgeThickness = 1, this.edgeStrength = 3, this.downSampleRatio = o?.downSampleRatio || 2, this.pulsePeriod = 0, this.edgeDetectionFxaa = o?.edgeDetectionFxaa || !1, this._visibilityCache = /* @__PURE__ */ new Map(), this.resolution = n === void 0 ? new _(256, 256) : new _(n.x, n.y);
1412
- let s = Math.round(this.resolution.x / this.downSampleRatio), c = Math.round(this.resolution.y / this.downSampleRatio);
1413
- this.renderTargetMaskBuffer = new t(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.prepareMaskMaterial = this._getPrepareMaskMaterial(this.gBufferTextures?.isFloatGBufferWithRgbNormalAlphaDepth), this.prepareMaskMaterial.side = 2, this.prepareMaskMaterial.fragmentShader = d(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.edgeDetectionFxaa && (this.fxaaRenderMaterial = new l(Et), this.fxaaRenderMaterial.uniforms.tDiffuse.value = this.renderTargetMaskBuffer.texture, this.fxaaRenderMaterial.uniforms.resolution.value.set(1 / this.resolution.x, 1 / this.resolution.y), this.renderTargetFxaaBuffer = new t(this.resolution.x, this.resolution.y), this.renderTargetFxaaBuffer.texture.name = "OutlinePass.fxaa", this.renderTargetFxaaBuffer.texture.generateMipmaps = !1), this.renderTargetMaskDownSampleBuffer = new t(s, c), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new t(s, c), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new t(Math.round(s / 2), Math.round(c / 2)), this.renderTargetBlurBuffer2.texture.name = "OutlinePass.blur2", this.renderTargetBlurBuffer2.texture.generateMipmaps = !1, this.edgeDetectionMaterial = this._getEdgeDetectionMaterial(), this.renderTargetEdgeBuffer1 = new t(s, c), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new t(Math.round(s / 2), Math.round(c / 2)), this.renderTargetEdgeBuffer2.texture.name = "OutlinePass.edge2", this.renderTargetEdgeBuffer2.texture.generateMipmaps = !1, this.separableBlurMaterial1 = this._getSeperableBlurMaterial(4), this.separableBlurMaterial1.uniforms.texSize.value.set(s, c), this.separableBlurMaterial1.uniforms.kernelRadius.value = 1, this.separableBlurMaterial2 = this._getSeperableBlurMaterial(4), this.separableBlurMaterial2.uniforms.texSize.value.set(Math.round(s / 2), Math.round(c / 2)), this.separableBlurMaterial2.uniforms.kernelRadius.value = 4, this.overlayMaterial = this._getOverlayMaterial();
1414
- let u = Tt;
1415
- this.copyUniforms = C.clone(u.uniforms), this.copyUniforms.opacity.value = 1, this.materialCopy = new l({
1427
+ constructor(e, t, n, r, i, a) {
1428
+ super(e), this.patternTexture = null, this.clearBackground = !1, this.renderScene = n, this.renderCamera = r, this.selectedObjects = i === void 0 ? [] : i, this.visibleEdgeColor = new A(1, 1, 1), this.hiddenEdgeColor = new A(.1, .04, .02), this.edgeGlow = 0, this.usePatternTexture = !1, this.edgeThickness = 1, this.edgeStrength = 3, this.downSampleRatio = a?.downSampleRatio || 2, this.pulsePeriod = 0, this.edgeDetectionFxaa = a?.edgeDetectionFxaa || !1, this._visibilityCache = /* @__PURE__ */ new Map(), this.resolution = t === void 0 ? new b(256, 256) : new b(t.x, t.y);
1429
+ let o = Math.round(this.resolution.x / this.downSampleRatio), c = Math.round(this.resolution.y / this.downSampleRatio);
1430
+ this.renderTargetMaskBuffer = new s(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.prepareMaskMaterial = this._getPrepareMaskMaterial(this.gBufferTextures?.isFloatGBufferWithRgbNormalAlphaDepth), this.prepareMaskMaterial.side = 2, this.prepareMaskMaterial.fragmentShader = u(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.edgeDetectionFxaa && (this.fxaaRenderMaterial = new h(Et), this.fxaaRenderMaterial.uniforms.tDiffuse.value = this.renderTargetMaskBuffer.texture, this.fxaaRenderMaterial.uniforms.resolution.value.set(1 / this.resolution.x, 1 / this.resolution.y), this.renderTargetFxaaBuffer = new s(this.resolution.x, this.resolution.y), this.renderTargetFxaaBuffer.texture.name = "OutlinePass.fxaa", this.renderTargetFxaaBuffer.texture.generateMipmaps = !1), this.renderTargetMaskDownSampleBuffer = new s(o, c), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new s(o, c), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new s(Math.round(o / 2), Math.round(c / 2)), this.renderTargetBlurBuffer2.texture.name = "OutlinePass.blur2", this.renderTargetBlurBuffer2.texture.generateMipmaps = !1, this.edgeDetectionMaterial = this._getEdgeDetectionMaterial(), this.renderTargetEdgeBuffer1 = new s(o, c), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new s(Math.round(o / 2), Math.round(c / 2)), this.renderTargetEdgeBuffer2.texture.name = "OutlinePass.edge2", this.renderTargetEdgeBuffer2.texture.generateMipmaps = !1, this.separableBlurMaterial1 = this._getSeperableBlurMaterial(4), this.separableBlurMaterial1.uniforms.texSize.value.set(o, c), this.separableBlurMaterial1.uniforms.kernelRadius.value = 1, this.separableBlurMaterial2 = this._getSeperableBlurMaterial(4), this.separableBlurMaterial2.uniforms.texSize.value.set(Math.round(o / 2), Math.round(c / 2)), this.separableBlurMaterial2.uniforms.kernelRadius.value = 4, this.overlayMaterial = this._getOverlayMaterial();
1431
+ let l = Tt;
1432
+ this.copyUniforms = T.clone(l.uniforms), this.copyUniforms.opacity.value = 1, this.materialCopy = new h({
1416
1433
  uniforms: this.copyUniforms,
1417
- vertexShader: u.vertexShader,
1418
- fragmentShader: u.fragmentShader,
1434
+ vertexShader: l.vertexShader,
1435
+ fragmentShader: l.fragmentShader,
1419
1436
  blending: 0,
1420
1437
  depthTest: !1,
1421
1438
  depthWrite: !1,
1422
1439
  transparent: !0
1423
- }), this.enabled = !0, this.needsSwap = !1, this.oldClearColor = new D(), this.oldClearAlpha = 1, this.fsQuad = new V(void 0), this.tempPulseColor1 = new D(), this.tempPulseColor2 = new D(), this.textureMatrix = new x();
1424
- function d(e, t) {
1440
+ }), this.enabled = !0, this.needsSwap = !1, this.oldClearColor = new A(), this.oldClearAlpha = 1, this.fsQuad = new H(void 0), this.tempPulseColor1 = new A(), this.tempPulseColor2 = new A(), this.textureMatrix = new C();
1441
+ function u(e, t) {
1425
1442
  let n = t.isPerspectiveCamera ? "perspective" : "orthographic";
1426
1443
  return e.replace(/DEPTH_TO_VIEW_Z/g, n + "DepthToViewZ");
1427
1444
  }
@@ -1479,10 +1496,10 @@ var W = class e extends T {
1479
1496
  this.render(e, null, null, 0, !1);
1480
1497
  }
1481
1498
  _getPrepareMaskMaterial(e) {
1482
- return new l({
1499
+ return new h({
1483
1500
  uniforms: {
1484
1501
  depthTexture: { value: null },
1485
- cameraNearFar: { value: new _(.5, .5) },
1502
+ cameraNearFar: { value: new b(.5, .5) },
1486
1503
  textureMatrix: { value: null }
1487
1504
  },
1488
1505
  defines: { FLOAT_ALPHA_DEPTH: e ? 1 : 0 },
@@ -1491,24 +1508,24 @@ var W = class e extends T {
1491
1508
  });
1492
1509
  }
1493
1510
  _getEdgeDetectionMaterial() {
1494
- return new l({
1511
+ return new h({
1495
1512
  uniforms: {
1496
1513
  maskTexture: { value: null },
1497
- texSize: { value: new _(.5, .5) },
1498
- visibleEdgeColor: { value: new s(1, 1, 1) },
1499
- hiddenEdgeColor: { value: new s(1, 1, 1) }
1514
+ texSize: { value: new b(.5, .5) },
1515
+ visibleEdgeColor: { value: new p(1, 1, 1) },
1516
+ hiddenEdgeColor: { value: new p(1, 1, 1) }
1500
1517
  },
1501
1518
  vertexShader: "varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",
1502
1519
  fragmentShader: "varying vec2 vUv;\n\n uniform sampler2D maskTexture;\n uniform vec2 texSize;\n uniform vec3 visibleEdgeColor;\n uniform vec3 hiddenEdgeColor;\n\n void main() {\n vec2 invSize = 1.0 / texSize;\n vec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);\n vec4 c1 = texture2D( maskTexture, vUv + uvOffset.xy);\n vec4 c2 = texture2D( maskTexture, vUv - uvOffset.xy);\n vec4 c3 = texture2D( maskTexture, vUv + uvOffset.yw);\n vec4 c4 = texture2D( maskTexture, vUv - uvOffset.yw);\n float diff1 = (c1.r - c2.r)*0.5;\n float diff2 = (c3.r - c4.r)*0.5;\n float d = length( vec2(diff1, diff2) );\n float a1 = min(c1.g, c2.g);\n float a2 = min(c3.g, c4.g);\n float visibilityFactor = min(a1, a2);\n vec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;\n gl_FragColor = vec4(edgeColor, 1.0) * vec4(d);\n }"
1503
1520
  });
1504
1521
  }
1505
1522
  _getSeperableBlurMaterial(e) {
1506
- return new l({
1523
+ return new h({
1507
1524
  defines: { MAX_RADIUS: e },
1508
1525
  uniforms: {
1509
1526
  colorTexture: { value: null },
1510
- texSize: { value: new _(.5, .5) },
1511
- direction: { value: new _(.5, .5) },
1527
+ texSize: { value: new b(.5, .5) },
1528
+ direction: { value: new b(.5, .5) },
1512
1529
  kernelRadius: { value: 1 }
1513
1530
  },
1514
1531
  vertexShader: "varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",
@@ -1516,7 +1533,7 @@ var W = class e extends T {
1516
1533
  });
1517
1534
  }
1518
1535
  _getOverlayMaterial() {
1519
- return new l({
1536
+ return new h({
1520
1537
  uniforms: {
1521
1538
  maskTexture: { value: null },
1522
1539
  edgeTexture1: { value: null },
@@ -1538,10 +1555,10 @@ var W = class e extends T {
1538
1555
  uniforms: { tDiffuse: { value: null } },
1539
1556
  vertexShader: "\n varying vec2 vUv;\n\n void main() {\n vUv = uv;\n gl_Position = (projectionMatrix * modelViewMatrix * vec4(position, 1.0)).xyww;\n }",
1540
1557
  fragmentShader: "\n uniform highp sampler2D tDiffuse;\n varying vec2 vUv;\n\n void main() {\n vec4 textureColor = texture2D(tDiffuse, vUv);\n float aoPassDepth = dot(textureColor.wz, vec2(1.0/1024.0));\n gl_FragColor = vec4(vec3(aoPassDepth * aoPassDepth), 1.0);\n }"
1541
- }, kt = class extends l {
1558
+ }, kt = class extends h {
1542
1559
  constructor(e) {
1543
1560
  super({
1544
- uniforms: C.clone(Ot.uniforms),
1561
+ uniforms: T.clone(Ot.uniforms),
1545
1562
  vertexShader: Ot.vertexShader,
1546
1563
  fragmentShader: Ot.fragmentShader,
1547
1564
  transparent: !0,
@@ -1553,27 +1570,27 @@ var W = class e extends T {
1553
1570
  blendSrcAlpha: 206,
1554
1571
  blendDstAlpha: 200,
1555
1572
  blendEquationAlpha: 100
1556
- }), this._intensity = new _(1, 1), this.update(e);
1573
+ }), this._intensity = new b(1, 1), this.update(e);
1557
1574
  }
1558
1575
  update(e) {
1559
1576
  return e?.texture !== void 0 && (this.uniforms.tDiffuse.value = e.texture), e?.blending !== void 0 && (this.blending = e.blending), this;
1560
1577
  }
1561
- }, At = (e) => new _(Math.atan2(e.y, e.x) / (2 * Math.PI) + .5, Math.asin(e.z) / Math.PI + .5), jt = class {
1578
+ }, At = (e) => new b(Math.atan2(e.y, e.x) / (2 * Math.PI) + .5, Math.asin(e.z) / Math.PI + .5), jt = class {
1562
1579
  get colorRenderTarget() {
1563
- return this._colorRenderTarget = this._colorRenderTarget ?? new t(), this._colorRenderTarget;
1580
+ return this._colorRenderTarget = this._colorRenderTarget ?? new s(), this._colorRenderTarget;
1564
1581
  }
1565
1582
  environmentMapDecodeTarget(e) {
1566
- let n = e instanceof be && e.capabilities.isWebGL2 ? S : b;
1567
- return this._environmentMapDecodeTarget = this._environmentMapDecodeTarget ?? new t(1, 1, { type: n }), this._environmentMapDecodeTarget;
1583
+ let t = e instanceof we && e.capabilities.isWebGL2 ? w : S;
1584
+ return this._environmentMapDecodeTarget = this._environmentMapDecodeTarget ?? new s(1, 1, { type: t }), this._environmentMapDecodeTarget;
1568
1585
  }
1569
1586
  environmentMapDecodeMaterial(e) {
1570
1587
  return e ? (this._equirectangularDecodeMaterial = this._equirectangularDecodeMaterial ?? new Q(!0, !1), this._equirectangularDecodeMaterial) : (this._pmremDecodeMaterial = this._pmremDecodeMaterial ?? new Q(!1, !1), this._pmremDecodeMaterial);
1571
1588
  }
1572
1589
  get camera() {
1573
- return this._camera = this._camera ?? new a(-1, 1, 1, -1, -1, 1), this._camera;
1590
+ return this._camera = this._camera ?? new d(-1, 1, 1, -1, -1, 1), this._camera;
1574
1591
  }
1575
1592
  scaleTexture(e, t, n, r) {
1576
- this.colorRenderTarget.setSize(n, r), this._planeMesh = this._planeMesh ?? new T(new ue(2, 2), new E({ map: t }));
1593
+ this.colorRenderTarget.setSize(n, r), this._planeMesh = this._planeMesh ?? new D(new E(2, 2), new O({ map: t }));
1577
1594
  let i = e.getRenderTarget();
1578
1595
  e.setRenderTarget(this.colorRenderTarget), e.render(this._planeMesh, this.camera), e.setRenderTarget(i);
1579
1596
  let a = this.environmentMapDecodeTarget(e).texture, o = new Uint8Array(n * r * 4);
@@ -1585,26 +1602,26 @@ var W = class e extends T {
1585
1602
  }
1586
1603
  newGrayscaleTexture(e, t, n, r) {
1587
1604
  let i = this.environmentMapDecodeMaterial(t.name === "PMREM.cubeUv"), a = this.environmentMapDecodeTarget(e);
1588
- a.setSize(n, r), i.setSourceTexture(t), this._planeMesh = this._planeMesh ?? new T(new ue(2, 2), i);
1605
+ a.setSize(n, r), i.setSourceTexture(t), this._planeMesh = this._planeMesh ?? new D(new E(2, 2), i);
1589
1606
  let o = e.getRenderTarget();
1590
1607
  e.setRenderTarget(a), e.render(this._planeMesh, this.camera), e.setRenderTarget(o);
1591
- let s = a.texture, c = a.texture.type === S, l = c ? new Float32Array(n * r * 4) : new Uint8Array(n * r * 4);
1608
+ let s = a.texture, c = a.texture.type === w, l = c ? new Float32Array(n * r * 4) : new Uint8Array(n * r * 4);
1592
1609
  return e.readRenderTargetPixels(a, 0, 0, n, r, l), {
1593
1610
  texture: s,
1594
1611
  pixels: l,
1595
1612
  sRgbaPixels: c
1596
1613
  };
1597
1614
  }
1598
- }, Z = {
1615
+ }, Mt = {
1599
1616
  uniforms: { tDiffuse: { value: null } },
1600
1617
  vertexShader: "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = (projectionMatrix * modelViewMatrix * vec4(position, 1.0)).xyww;\n }",
1601
1618
  fragmentShader: "\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n }\n return 0.5 * ( uv + 1.0 );\n }\n\n void main() {\n #if PMREM_DECODE == 1\n float altitude = (vUv.y - 0.5) * 3.141593;\n float azimuth = vUv.x * 2.0 * 3.141593;\n vec3 direction = vec3(\n cos(altitude) * cos(azimuth) * -1.0,\n sin(altitude),\n cos(altitude) * sin(azimuth) * -1.0\n );\n float face = getFace(direction);\n vec2 uv = getUV(direction, face) / vec2(3.0, 4.0);\n if (face > 2.5) {\n uv.y += 0.25;\n face -= 3.0;\n }\n uv.x += face / 3.0;\n vec4 color = texture2D(tDiffuse, uv);\n #else\n vec4 color = texture2D(tDiffuse, vUv);\n #endif\n #if GRAYSCALE_CONVERT == 1\n float grayscale = dot(color.rgb, vec3(0.2126, 0.7152, 0.0722));\n //float grayscale = dot(color.rgb, vec3(1.0/3.0));\n gl_FragColor = vec4(vec3(grayscale), 1.0);\n #else\n gl_FragColor = vec4(color.rgb, 1.0);\n #endif\n }"
1602
- }, Q = class extends l {
1619
+ }, Q = class extends h {
1603
1620
  constructor(e, t) {
1604
1621
  super({
1605
- uniforms: C.clone(Z.uniforms),
1606
- vertexShader: Z.vertexShader,
1607
- fragmentShader: Z.fragmentShader,
1622
+ uniforms: T.clone(Mt.uniforms),
1623
+ vertexShader: Mt.vertexShader,
1624
+ fragmentShader: Mt.fragmentShader,
1608
1625
  defines: {
1609
1626
  PMREM_DECODE: e ? 1 : 0,
1610
1627
  GRAYSCALE_CONVERT: t ? 1 : 0
@@ -1614,17 +1631,17 @@ var W = class e extends T {
1614
1631
  setSourceTexture(e) {
1615
1632
  this.uniforms.tDiffuse.value = e;
1616
1633
  }
1617
- }, Mt = class {
1634
+ }, Nt = class {
1618
1635
  constructor(e) {
1619
1636
  this.samplePoints = [], this.sampleUVs = [], this.grayscaleTexture = {
1620
- texture: new re(),
1637
+ texture: new se(),
1621
1638
  pixels: new Uint8Array(),
1622
1639
  sRgbaPixels: !1
1623
- }, this.detectorTexture = new re(), this.detectorArray = new Float32Array(), this.lightSamples = [], this.lightGraph = new Pt(0), this.lightSources = [], this._grayScale = new s(.2126, .7152, .0722), this._createEquirectangularSamplePoints = (e) => {
1640
+ }, this.detectorTexture = new se(), this.detectorArray = new Float32Array(), this.lightSamples = [], this.lightGraph = new Ft(0), this.lightSources = [], this._grayScale = new p(.2126, .7152, .0722), this._createEquirectangularSamplePoints = (e) => {
1624
1641
  let t = [];
1625
1642
  for (let n = 0; n < e; n++) {
1626
- let r = n * Math.PI * (3 - Math.sqrt(5)), i = 1 - n / (e - 1) * 2, a = Math.sqrt(1 - i * i), o = Math.cos(r) * a, c = Math.sin(r) * a;
1627
- t.push(new s(o, c, i));
1643
+ let r = n * Math.PI * (3 - Math.sqrt(5)), i = 1 - n / (e - 1) * 2, a = Math.sqrt(1 - i * i), o = Math.cos(r) * a, s = Math.sin(r) * a;
1644
+ t.push(new p(o, s, i));
1628
1645
  }
1629
1646
  return t;
1630
1647
  }, this._numberOfSamples = e?.numberOfSamples ?? 1e3, this._width = e?.width ?? 1024, this._height = e?.height ?? 512, this._sampleThreshold = e?.sampleThreshold ?? .707, this.pointDistance = Math.sqrt(4 * Math.PI) / Math.sqrt(this._numberOfSamples), this.pixelDistance = Math.sqrt(2) * Math.PI * 2 / this._width, this.samplePoints = this._createEquirectangularSamplePoints(this._numberOfSamples), this.sampleUVs = this.samplePoints.map((e) => At(e));
@@ -1635,9 +1652,9 @@ var W = class e extends T {
1635
1652
  _redFromRgbaToNormalizedFloatArray(e, t, n) {
1636
1653
  let r = new Float32Array(e.length / 4), i = 1, a = 0;
1637
1654
  for (let t = 0; t < e.length / 4; ++t) {
1638
- let n = new D(...e.slice(t * 4, t * 4 + 3));
1655
+ let n = new A(...e.slice(t * 4, t * 4 + 3));
1639
1656
  e instanceof Float32Array && n.convertSRGBToLinear();
1640
- let o = new s(n.r, n.g, n.b).dot(this._grayScale);
1657
+ let o = new p(n.r, n.g, n.b).dot(this._grayScale);
1641
1658
  i = Math.min(i, o), a = Math.max(a, o), r[t] = o;
1642
1659
  }
1643
1660
  if (n) for (let e = 0; e < r.length; ++e) r[e] = (t ? r[e] : (r[e] - i) / (a - i)) ** +n;
@@ -1650,14 +1667,14 @@ var W = class e extends T {
1650
1667
  let n = e[t] * 255;
1651
1668
  i[t * 4 + 0] = n, i[t * 4 + 1] = n, i[t * 4 + 2] = n, i[t * 4 + 3] = 255;
1652
1669
  }
1653
- let a = new v(i, t, n);
1670
+ let a = new re(i, t, n);
1654
1671
  return a.needsUpdate = !0, a;
1655
1672
  }
1656
1673
  _filterLightSamples(e) {
1657
1674
  let t = [];
1658
1675
  for (let n = 0; n < this.sampleUVs.length; n++) {
1659
1676
  let r = this.sampleUVs[n];
1660
- this._detectorTextureLuminanceValueFromUV(r) > e && t.push(new Nt(this.samplePoints[n], r));
1677
+ this._detectorTextureLuminanceValueFromUV(r) > e && t.push(new Pt(this.samplePoints[n], r));
1661
1678
  }
1662
1679
  return t;
1663
1680
  }
@@ -1669,7 +1686,7 @@ var W = class e extends T {
1669
1686
  return this._detectorTextureLuminanceValueFromUV(e) * 256;
1670
1687
  }
1671
1688
  _findClusterSegments(e, t) {
1672
- let n = this.pixelDistance * 2, r = this.pointDistance * 1.5, i = new Pt(e.length);
1689
+ let n = this.pixelDistance * 2, r = this.pointDistance * 1.5, i = new Ft(e.length);
1673
1690
  for (let a = 0; a < e.length; a++) for (let o = a + 1; o < e.length; o++) if (e[a].position.angleTo(e[o].position) < r) {
1674
1691
  let r = e[o].position.clone().sub(e[a].position), s = Math.floor(r.length() / n), c = !0, l = 0;
1675
1692
  for (let n = 1; n < s; n++) {
@@ -1686,14 +1703,14 @@ var W = class e extends T {
1686
1703
  return i;
1687
1704
  }
1688
1705
  createLightSourcesFromLightGraph(e, t) {
1689
- let n = t.components.filter((e) => e.length > 1).map((t) => new Ft(t.map((t) => e[t])));
1706
+ let n = t.components.filter((e) => e.length > 1).map((t) => new It(t.map((t) => e[t])));
1690
1707
  return n.forEach((e) => e.calculateLightSourceProperties((e) => this._originalLuminanceValueFromUV(e))), n;
1691
1708
  }
1692
- }, Nt = class {
1709
+ }, Pt = class {
1693
1710
  constructor(e, t) {
1694
1711
  this.position = e, this.uv = t;
1695
1712
  }
1696
- }, Pt = class {
1713
+ }, Ft = class {
1697
1714
  constructor(e) {
1698
1715
  this.edges = [], this.adjacent = [], this.components = [], this.noOfNodes = e;
1699
1716
  for (let t = 0; t < e; t++) this.adjacent.push([]);
@@ -1711,12 +1728,12 @@ var W = class e extends T {
1711
1728
  t[e] = !0, n.push(e);
1712
1729
  for (let r of this.adjacent[e]) t[r] || this._dfs(r, t, n);
1713
1730
  }
1714
- }, Ft = class {
1731
+ }, It = class {
1715
1732
  constructor(e) {
1716
- this.position = new s(), this.uv = new _(), this.averageIntensity = 0, this.maxIntensity = 0, this.size = 0, this.lightSamples = e;
1733
+ this.position = new p(), this.uv = new b(), this.averageIntensity = 0, this.maxIntensity = 0, this.size = 0, this.lightSamples = e;
1717
1734
  }
1718
1735
  calculateLightSourceProperties(e) {
1719
- this.position = new s(), this.averageIntensity = 0, this.maxIntensity = 0;
1736
+ this.position = new p(), this.averageIntensity = 0, this.maxIntensity = 0;
1720
1737
  for (let t of this.lightSamples) {
1721
1738
  this.position.add(t.position);
1722
1739
  let n = e(t.uv);
@@ -1727,7 +1744,7 @@ var W = class e extends T {
1727
1744
  for (let e of this.lightSamples) t += e.position.distanceTo(this.position);
1728
1745
  t /= this.lightSamples.length, this.size = t / Math.PI;
1729
1746
  }
1730
- }, It = class extends G {
1747
+ }, Lt = class extends G {
1731
1748
  constructor(e) {
1732
1749
  super(e), this.debugOutput = "", this._environmentMapDecodeMaterial = new Q(!0, !1), this._environmentMapDecodeMaterial.blending = 0, this._environmentMapDecodeMaterial.depthTest = !1;
1733
1750
  }
@@ -1735,7 +1752,7 @@ var W = class e extends T {
1735
1752
  this._depthRenderMaterial?.dispose(), this._copyMaterial?.dispose(), this._srgbToLinearCopyMaterial?.dispose();
1736
1753
  }
1737
1754
  getCopyMaterial(e) {
1738
- return this._copyMaterial = this._copyMaterial ?? new N(), this._copyMaterial.update(e);
1755
+ return this._copyMaterial = this._copyMaterial ?? new F(), this._copyMaterial.update(e);
1739
1756
  }
1740
1757
  getBlendAoAndShadowMaterial(e) {
1741
1758
  return this._blendAoAndShadowMaterial = this._blendAoAndShadowMaterial ?? new qe({ blending: 0 }), this._blendAoAndShadowMaterial.update(e);
@@ -1744,12 +1761,12 @@ var W = class e extends T {
1744
1761
  return this._blendAoPassDepthMaterial = this._blendAoPassDepthMaterial ?? new kt({ blending: 0 }), this._blendAoPassDepthMaterial.update(e);
1745
1762
  }
1746
1763
  getSrgbToLinearCopyMaterial(e) {
1747
- return this._srgbToLinearCopyMaterial = this._copyMaterial ?? new N({}, z.ADDITIVE, !0, !0), this._srgbToLinearCopyMaterial.update(e);
1764
+ return this._srgbToLinearCopyMaterial = this._copyMaterial ?? new F({}, V.ADDITIVE, !0, !0), this._srgbToLinearCopyMaterial.update(e);
1748
1765
  }
1749
1766
  _getDepthRenderMaterial(e) {
1750
- return this._depthRenderMaterial = this._depthRenderMaterial ?? new Ce({
1767
+ return this._depthRenderMaterial = this._depthRenderMaterial ?? new De({
1751
1768
  depthTexture: this.gBufferTextures.textureWithDepthValue,
1752
- depthFilter: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? new i(0, 0, 0, 1) : new i(1, 0, 0, 0)
1769
+ depthFilter: this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? new u(0, 0, 0, 1) : new u(1, 0, 0, 0)
1753
1770
  }), this._depthRenderMaterial.update({ camera: e });
1754
1771
  }
1755
1772
  renderPass(e) {
@@ -1762,94 +1779,94 @@ var W = class e extends T {
1762
1779
  this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1763
1780
  texture: this.gBufferTextures?.gBufferTexture,
1764
1781
  blending: 0,
1765
- colorTransform: new x().set(.5, 0, 0, 0, 0, .5, 0, 0, 0, 0, .5, 0, 0, 0, 0, 0),
1766
- colorBase: new i(.5, .5, .5, 1),
1782
+ colorTransform: new C().set(.5, 0, 0, 0, 0, .5, 0, 0, 0, 0, .5, 0, 0, 0, 0, 0),
1783
+ colorBase: new u(.5, .5, .5, 1),
1767
1784
  multiplyChannels: 0,
1768
- uvTransform: M
1785
+ uvTransform: P
1769
1786
  }), null) : this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1770
1787
  texture: this.gBufferTextures?.gBufferTexture,
1771
1788
  blending: 0,
1772
- colorTransform: xe,
1773
- colorBase: P,
1789
+ colorTransform: Te,
1790
+ colorBase: L,
1774
1791
  multiplyChannels: 0,
1775
- uvTransform: M
1792
+ uvTransform: P
1776
1793
  }), null);
1777
1794
  break;
1778
1795
  case "g-depth":
1779
1796
  this.gBufferTextures.isFloatGBufferWithRgbNormalAlphaDepth ? this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1780
1797
  texture: this.gBufferTextures?.gBufferTexture,
1781
1798
  blending: 0,
1782
- colorTransform: we,
1783
- colorBase: P,
1799
+ colorTransform: Oe,
1800
+ colorBase: L,
1784
1801
  multiplyChannels: 0,
1785
- uvTransform: M
1802
+ uvTransform: P
1786
1803
  }), null) : this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1787
1804
  texture: this.gBufferTextures?.depthBufferTexture,
1788
1805
  blending: 0,
1789
- colorTransform: Se,
1790
- colorBase: P,
1806
+ colorTransform: Ee,
1807
+ colorBase: L,
1791
1808
  multiplyChannels: 0,
1792
- uvTransform: M
1809
+ uvTransform: P
1793
1810
  }), null);
1794
1811
  break;
1795
1812
  case "ssao":
1796
1813
  this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1797
1814
  texture: this.renderPassManager.shadowAndAoPass.aoAndSoftShadowRenderTarget.texture,
1798
1815
  blending: 0,
1799
- colorTransform: L,
1800
- colorBase: j,
1816
+ colorTransform: Ve,
1817
+ colorBase: N,
1801
1818
  multiplyChannels: 0,
1802
- uvTransform: M
1819
+ uvTransform: P
1803
1820
  }), null);
1804
1821
  break;
1805
1822
  case "ssaodenoise":
1806
1823
  this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1807
1824
  texture: this.renderPassManager.shadowAndAoPass.denoiseRenderTargetTexture,
1808
1825
  blending: 0,
1809
- colorTransform: L,
1810
- colorBase: j,
1826
+ colorTransform: Ve,
1827
+ colorBase: N,
1811
1828
  multiplyChannels: 0,
1812
- uvTransform: M
1829
+ uvTransform: P
1813
1830
  }), null);
1814
1831
  break;
1815
1832
  case "shadowmap":
1816
1833
  this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1817
1834
  texture: this.renderPassManager.screenSpaceShadowMapPass.shadowTexture,
1818
1835
  blending: 0,
1819
- colorTransform: L,
1820
- colorBase: j,
1836
+ colorTransform: Ve,
1837
+ colorBase: N,
1821
1838
  multiplyChannels: 0,
1822
- uvTransform: M
1839
+ uvTransform: P
1823
1840
  }), null);
1824
1841
  break;
1825
1842
  case "shadowsoft":
1826
1843
  this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1827
1844
  texture: this.renderPassManager.shadowAndAoPass.aoAndSoftShadowRenderTarget.texture,
1828
1845
  blending: 0,
1829
- colorTransform: Y.shadowTransform,
1830
- colorBase: j,
1846
+ colorTransform: X.shadowTransform,
1847
+ colorBase: N,
1831
1848
  multiplyChannels: 0,
1832
- uvTransform: M
1849
+ uvTransform: P
1833
1850
  }), null);
1834
1851
  break;
1835
1852
  case "shadowdenoise":
1836
1853
  this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1837
1854
  texture: this.renderPassManager.shadowAndAoPass.denoiseRenderTargetTexture,
1838
1855
  blending: 0,
1839
- colorTransform: Y.shadowTransform,
1840
- colorBase: j,
1856
+ colorTransform: X.shadowTransform,
1857
+ colorBase: N,
1841
1858
  multiplyChannels: 0,
1842
- uvTransform: M
1859
+ uvTransform: P
1843
1860
  }), null);
1844
1861
  break;
1845
1862
  case "shadowfadein":
1846
1863
  this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1847
1864
  texture: this.renderPassManager.shadowAndAoPass.fadeRenderTarget.texture,
1848
1865
  blending: 0,
1849
- colorTransform: Y.shadowTransform,
1850
- colorBase: j,
1866
+ colorTransform: X.shadowTransform,
1867
+ colorBase: N,
1851
1868
  multiplyChannels: 0,
1852
- uvTransform: M
1869
+ uvTransform: P
1853
1870
  }), null);
1854
1871
  break;
1855
1872
  case "shadowandao":
@@ -1870,40 +1887,40 @@ var W = class e extends T {
1870
1887
  this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1871
1888
  texture: this.renderPassManager.aoPassMapTexture,
1872
1889
  blending: 0,
1873
- colorTransform: R,
1874
- colorBase: j,
1890
+ colorTransform: B,
1891
+ colorBase: N,
1875
1892
  multiplyChannels: 0,
1876
- uvTransform: M
1893
+ uvTransform: P
1877
1894
  }), null);
1878
1895
  break;
1879
1896
  case "groundreflection":
1880
1897
  this.passRenderer.renderScreenSpace(e, this.getSrgbToLinearCopyMaterial({
1881
1898
  texture: this.renderPassManager.groundReflectionPass.reflectionRenderTarget.texture,
1882
1899
  blending: 0,
1883
- colorTransform: R,
1884
- colorBase: j,
1900
+ colorTransform: B,
1901
+ colorBase: N,
1885
1902
  multiplyChannels: 0,
1886
- uvTransform: A
1903
+ uvTransform: M
1887
1904
  }), null);
1888
1905
  break;
1889
1906
  case "groundreflectionfinal":
1890
1907
  this.passRenderer.renderScreenSpace(e, this.getSrgbToLinearCopyMaterial({
1891
1908
  texture: this.renderPassManager.groundReflectionPass.intensityRenderTarget.texture,
1892
1909
  blending: 0,
1893
- colorTransform: R,
1894
- colorBase: j,
1910
+ colorTransform: B,
1911
+ colorBase: N,
1895
1912
  multiplyChannels: 0,
1896
- uvTransform: A
1913
+ uvTransform: M
1897
1914
  }), null);
1898
1915
  break;
1899
1916
  case "bakedgroundshadow":
1900
1917
  this.passRenderer.renderScreenSpace(e, this.getCopyMaterial({
1901
1918
  texture: this.renderPassManager.bakedGroundContactShadowPass.renderTarget.texture,
1902
1919
  blending: 0,
1903
- colorTransform: R,
1904
- colorBase: j,
1920
+ colorTransform: B,
1921
+ colorBase: N,
1905
1922
  multiplyChannels: 0,
1906
- uvTransform: M
1923
+ uvTransform: P
1907
1924
  }), null);
1908
1925
  break;
1909
1926
  case "environmentmap":
@@ -1911,15 +1928,15 @@ var W = class e extends T {
1911
1928
  break;
1912
1929
  case "lightsourcedetection":
1913
1930
  if (this.scene.userData?.environmentDefinition) {
1914
- let t = this.renderPassManager.aspect, n = new a(-1, 1, 1 / t, -1 / t, -1, 1), r = this.scene.userData?.environmentDefinition.createDebugScene(e, this.scene, this.renderPassManager.screenSpaceShadowMapPass.parameters.maximumNumberOfLightSources);
1915
- r.background = new D(16777215), e.render(r, n);
1931
+ let t = this.renderPassManager.aspect, n = new d(-1, 1, 1 / t, -1 / t, -1, 1), r = this.scene.userData?.environmentDefinition.createDebugScene(e, this.scene, this.renderPassManager.screenSpaceShadowMapPass.parameters.maximumNumberOfLightSources);
1932
+ r.background = new A(16777215), e.render(r, n);
1916
1933
  }
1917
1934
  break;
1918
1935
  }
1919
1936
  }
1920
- }, Lt = class extends G {
1937
+ }, Rt = class extends G {
1921
1938
  constructor(e) {
1922
- super(e), this.drawGround = !0, this.drawWithDebugMaterial = !1, this.grayDebugMaterial = new _e({
1939
+ super(e), this.drawGround = !0, this.drawWithDebugMaterial = !1, this.grayDebugMaterial = new k({
1923
1940
  color: 12632256,
1924
1941
  side: 2,
1925
1942
  envMapIntensity: .4
@@ -1933,7 +1950,7 @@ var W = class e extends T {
1933
1950
  this.passRenderer.renderWithOverrideMaterial(e, this.scene, this.camera, this.grayDebugMaterial, null, 0, 1);
1934
1951
  }) : e.render(this.scene, this.camera), this.renderPassManager.setGroundVisibility(!1), this.renderCacheManager.onAfterRender("floorDepthWrite");
1935
1952
  }
1936
- }, Rt = class e {
1953
+ }, zt = class e {
1937
1954
  constructor() {
1938
1955
  this.applyAoAndShadowToAlpha = !1, this._aoPassMapUniform = { value: null }, this._aoPassMapScaleUniform = { value: 1 }, this._aoPassMapIntensityUniform = { value: 1 }, this._shPassMapIntensityUniform = { value: 1 }, this._reflectionPassMapUniform = { value: null }, this._reflectionPassMapScaleUniform = { value: 1 }, this._reflectionPassMapIntensityUniform = { value: 0 }, this.applyReflectionPassMap = !1;
1939
1956
  }
@@ -1959,7 +1976,7 @@ var W = class e extends T {
1959
1976
  this._reflectionPassMapIntensityUniform.value = e;
1960
1977
  }
1961
1978
  static addPlugin(t) {
1962
- if (H(t)) return null;
1979
+ if (o(t)) return null;
1963
1980
  if (t.userData.postProcessingMaterialPlugin !== void 0) return t.userData.postProcessingMaterialPlugin instanceof e ? t.userData.postProcessingMaterialPlugin : null;
1964
1981
  let n = new e();
1965
1982
  return t.userData.postProcessingMaterialPlugin = n, t.onBeforeCompile = (e, t) => n._onBeforeCompile(e, t), t.customProgramCacheKey = () => n._customProgramCacheKey(), n;
@@ -1974,21 +1991,21 @@ var W = class e extends T {
1974
1991
  _onBeforeCompile(e, t) {
1975
1992
  if (this._isEnabled() || this.applyReflectionPassMap) {
1976
1993
  let t = this.applyAoAndShadowToAlpha ? "#define USE_APPLY_AO_AND_SHADOW_TO_ALPHA\n" : "";
1977
- t += this.applyReflectionPassMap ? "#define USE_REFLECTION_PASS_MAP\n" : "", t += zt, e.fragmentShader = e.fragmentShader.replace("#include <aomap_pars_fragment>", t), e.fragmentShader = e.fragmentShader.replace("#include <aomap_fragment>", Bt), this._initUniforms(e);
1994
+ t += this.applyReflectionPassMap ? "#define USE_REFLECTION_PASS_MAP\n" : "", t += Bt, e.fragmentShader = e.fragmentShader.replace("#include <aomap_pars_fragment>", t), e.fragmentShader = e.fragmentShader.replace("#include <aomap_fragment>", Vt), this._initUniforms(e);
1978
1995
  }
1979
1996
  }
1980
1997
  _initUniforms(e) {
1981
1998
  e && (e.uniforms.tAoPassMap = this._aoPassMapUniform, e.uniforms.aoPassMapScale = this._aoPassMapScaleUniform, e.uniforms.aoPassMapIntensity = this._aoPassMapIntensityUniform, e.uniforms.shPassMapIntensity = this._shPassMapIntensityUniform, e.uniforms.tReflectionPassMap = this._reflectionPassMapUniform, e.uniforms.reflectionPassMapScale = this._reflectionPassMapScaleUniform, e.uniforms.reflectionPassMapIntensity = this._reflectionPassMapIntensityUniform);
1982
1999
  }
1983
- }, zt = "\n#ifdef USE_AOMAP\n\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n\n#endif\n\n uniform highp sampler2D tAoPassMap;\n uniform float aoPassMapScale;\n uniform float aoPassMapIntensity;\n uniform float shPassMapIntensity;\n uniform sampler2D tReflectionPassMap;\n uniform float reflectionPassMapScale;\n uniform float reflectionPassMapIntensity;\n", Bt = "\n#ifndef AOPASSMAP_SWIZZLE\n #define AOPASSMAP_SWIZZLE rg\n#endif\n\nfloat ambientOcclusion = 1.0;\nfloat shadowValue = 1.0;\n\n#ifdef USE_AOMAP\n\n // reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n ambientOcclusion = texture2D( aoMap, vAoMapUv ).r;\n ambientOcclusion = ( ambientOcclusion - 1.0 ) * aoMapIntensity + 1.0;\n\n#endif\n\n vec4 aoAndShadowMap = texelFetch( tAoPassMap, ivec2( gl_FragCoord.xy * aoPassMapScale ), 0 );\n vec2 aoAndShadow = aoAndShadowMap.rg;\n float depthDelta = abs( dot(aoAndShadowMap.wz, vec2(1.0/1024.0)) - gl_FragCoord.z );\n const ivec2 aoOffsetArray[8] = ivec2[8](\n ivec2(1, 0), ivec2(-1, 0), ivec2(0, 1), ivec2(0, -1), ivec2(1, 1), ivec2(-1, 1), ivec2(1, -1), ivec2(-1, -1));\n for (int aoOffsetI = 0; aoOffsetI < 8; aoOffsetI++) {\n aoAndShadowMap = texelFetch( tAoPassMap, ivec2( gl_FragCoord.xy * aoPassMapScale ) + aoOffsetArray[aoOffsetI], 0 );\n float testDepthDelta = abs( dot(aoAndShadowMap.wz, vec2(1.0/1024.0)) - gl_FragCoord.z );\n if (testDepthDelta < depthDelta) {\n aoAndShadow = aoAndShadowMap.rg;\n depthDelta = testDepthDelta;\n }\n }\n\n float aoPassMapValue = aoPassMapIntensity < 0.0 ? 1.0 : max(0.0, (aoAndShadow.r - 1.0) * aoPassMapIntensity + 1.0);\n shadowValue = shPassMapIntensity < 0.0 ? 1.0 : max(0.0, (aoAndShadow.g - 1.0) * shPassMapIntensity + 1.0);\n\n #ifdef USE_REFLECTION_PASS_MAP\n\n ivec2 reflectionPassMapSize = textureSize( tReflectionPassMap, 0 );\n vec2 reflectionPassMapUv = vec2( gl_FragCoord.x * reflectionPassMapScale, float(reflectionPassMapSize.y) - gl_FragCoord.y * reflectionPassMapScale );\n vec4 reflectionPassMapColor = texture2D( tReflectionPassMap, reflectionPassMapUv / vec2(reflectionPassMapSize) );\n if (reflectionPassMapColor.a > 0.0) reflectionPassMapColor.rgb /= reflectionPassMapColor.a;\n vec3 diffuseReflectionPassMapColor = reflectionPassMapColor.rgb * material.diffuseColor;\n reflectedLight.indirectDiffuse += diffuseReflectionPassMapColor * reflectionPassMapColor.a * reflectionPassMapIntensity;\n //reflectedLight.indirectDiffuse = mix(reflectedLight.indirectDiffuse, diffuseReflectionPassMapColor, reflectionPassMapColor.a * reflectionPassMapIntensity);\n\n #endif\n\n #if defined ( USE_APPLY_AO_AND_SHADOW_TO_ALPHA )\n diffuseColor.a = 1.0 - (1.0 - diffuseColor.a) * aoPassMapValue * shadowValue;\n #else\n ambientOcclusion = min( ambientOcclusion, aoPassMapValue );\n #endif\n\n reflectedLight.indirectDiffuse *= ambientOcclusion * shadowValue;\n\n #if defined( USE_CLEARCOAT )\n clearcoatSpecularIndirect *= ambientOcclusion * shadowValue;\n #endif\n\n #if defined( USE_SHEEN )\n sheenSpecularIndirect *= ambientOcclusion * shadowValue;\n #endif\n\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n\n float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\n float specularOcclusion = computeSpecularOcclusion( dotNV, ambientOcclusion * shadowValue, material.roughness );\n reflectedLight.indirectSpecular *= specularOcclusion;\n\n #ifdef USE_REFLECTION_PASS_MAP\n reflectedLight.indirectSpecular += material.specularColor * reflectionPassMapColor.rgb * reflectionPassMapColor.a * reflectionPassMapIntensity * specularOcclusion;\n #endif\n\n #endif\n", Vt = class extends B {
2000
+ }, Bt = "\n#ifdef USE_AOMAP\n\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n\n#endif\n\n uniform highp sampler2D tAoPassMap;\n uniform float aoPassMapScale;\n uniform float aoPassMapIntensity;\n uniform float shPassMapIntensity;\n uniform sampler2D tReflectionPassMap;\n uniform float reflectionPassMapScale;\n uniform float reflectionPassMapIntensity;\n", Vt = "\n#ifndef AOPASSMAP_SWIZZLE\n #define AOPASSMAP_SWIZZLE rg\n#endif\n\nfloat ambientOcclusion = 1.0;\nfloat shadowValue = 1.0;\n\n#ifdef USE_AOMAP\n\n // reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n ambientOcclusion = texture2D( aoMap, vAoMapUv ).r;\n ambientOcclusion = ( ambientOcclusion - 1.0 ) * aoMapIntensity + 1.0;\n\n#endif\n\n vec4 aoAndShadowMap = texelFetch( tAoPassMap, ivec2( gl_FragCoord.xy * aoPassMapScale ), 0 );\n vec2 aoAndShadow = aoAndShadowMap.rg;\n float depthDelta = abs( dot(aoAndShadowMap.wz, vec2(1.0/1024.0)) - gl_FragCoord.z );\n const ivec2 aoOffsetArray[8] = ivec2[8](\n ivec2(1, 0), ivec2(-1, 0), ivec2(0, 1), ivec2(0, -1), ivec2(1, 1), ivec2(-1, 1), ivec2(1, -1), ivec2(-1, -1));\n for (int aoOffsetI = 0; aoOffsetI < 8; aoOffsetI++) {\n aoAndShadowMap = texelFetch( tAoPassMap, ivec2( gl_FragCoord.xy * aoPassMapScale ) + aoOffsetArray[aoOffsetI], 0 );\n float testDepthDelta = abs( dot(aoAndShadowMap.wz, vec2(1.0/1024.0)) - gl_FragCoord.z );\n if (testDepthDelta < depthDelta) {\n aoAndShadow = aoAndShadowMap.rg;\n depthDelta = testDepthDelta;\n }\n }\n\n float aoPassMapValue = aoPassMapIntensity < 0.0 ? 1.0 : max(0.0, (aoAndShadow.r - 1.0) * aoPassMapIntensity + 1.0);\n shadowValue = shPassMapIntensity < 0.0 ? 1.0 : max(0.0, (aoAndShadow.g - 1.0) * shPassMapIntensity + 1.0);\n\n #ifdef USE_REFLECTION_PASS_MAP\n\n ivec2 reflectionPassMapSize = textureSize( tReflectionPassMap, 0 );\n vec2 reflectionPassMapUv = vec2( gl_FragCoord.x * reflectionPassMapScale, float(reflectionPassMapSize.y) - gl_FragCoord.y * reflectionPassMapScale );\n vec4 reflectionPassMapColor = texture2D( tReflectionPassMap, reflectionPassMapUv / vec2(reflectionPassMapSize) );\n if (reflectionPassMapColor.a > 0.0) reflectionPassMapColor.rgb /= reflectionPassMapColor.a;\n vec3 diffuseReflectionPassMapColor = reflectionPassMapColor.rgb * material.diffuseColor;\n reflectedLight.indirectDiffuse += diffuseReflectionPassMapColor * reflectionPassMapColor.a * reflectionPassMapIntensity;\n //reflectedLight.indirectDiffuse = mix(reflectedLight.indirectDiffuse, diffuseReflectionPassMapColor, reflectionPassMapColor.a * reflectionPassMapIntensity);\n\n #endif\n\n #if defined ( USE_APPLY_AO_AND_SHADOW_TO_ALPHA )\n diffuseColor.a = 1.0 - (1.0 - diffuseColor.a) * aoPassMapValue * shadowValue;\n #else\n ambientOcclusion = min( ambientOcclusion, aoPassMapValue );\n #endif\n\n reflectedLight.indirectDiffuse *= ambientOcclusion * shadowValue;\n\n #if defined( USE_CLEARCOAT )\n clearcoatSpecularIndirect *= ambientOcclusion * shadowValue;\n #endif\n\n #if defined( USE_SHEEN )\n sheenSpecularIndirect *= ambientOcclusion * shadowValue;\n #endif\n\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n\n float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\n float specularOcclusion = computeSpecularOcclusion( dotNV, ambientOcclusion * shadowValue, material.roughness );\n reflectedLight.indirectSpecular *= specularOcclusion;\n\n #ifdef USE_REFLECTION_PASS_MAP\n reflectedLight.indirectSpecular += material.specularColor * reflectionPassMapColor.rgb * reflectionPassMapColor.a * reflectionPassMapIntensity * specularOcclusion;\n #endif\n\n #endif\n", Ht = class extends He {
1984
2001
  constructor(e, t = "tDiffuse") {
1985
- super(), this.textureID = t, this.uniforms = null, this.material = null, e instanceof l ? (this.uniforms = e.uniforms, this.material = e) : e && (this.uniforms = C.clone(e.uniforms), this.material = new l({
2002
+ super(), this.textureID = t, this.uniforms = null, this.material = null, e instanceof h ? (this.uniforms = e.uniforms, this.material = e) : e && (this.uniforms = T.clone(e.uniforms), this.material = new h({
1986
2003
  name: e.name === void 0 ? "unspecified" : e.name,
1987
2004
  defines: Object.assign({}, e.defines),
1988
2005
  uniforms: this.uniforms,
1989
2006
  vertexShader: e.vertexShader,
1990
2007
  fragmentShader: e.fragmentShader
1991
- })), this._fsQuad = new V(this.material);
2008
+ })), this._fsQuad = new H(this.material);
1992
2009
  }
1993
2010
  render(e, t, n) {
1994
2011
  this.uniforms[this.textureID] && (this.uniforms[this.textureID].value = n.texture), this._fsQuad.material = this.material, this.renderToScreen ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
@@ -1996,7 +2013,7 @@ var W = class e extends T {
1996
2013
  dispose() {
1997
2014
  this.material.dispose(), this._fsQuad.dispose();
1998
2015
  }
1999
- }, Ht = {
2016
+ }, Ut = {
2000
2017
  name: "LUTShader",
2001
2018
  uniforms: {
2002
2019
  lut: { value: null },
@@ -2006,9 +2023,9 @@ var W = class e extends T {
2006
2023
  },
2007
2024
  vertexShader: "\n\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ",
2008
2025
  fragmentShader: "\n\n uniform float lutSize;\n uniform sampler3D lut;\n\n varying vec2 vUv;\n uniform float intensity;\n uniform sampler2D tDiffuse;\n void main() {\n\n vec4 val = texture2D( tDiffuse, vUv );\n vec4 lutVal;\n\n // pull the sample in by half a pixel so the sample begins\n // at the center of the edge pixels.\n float pixelWidth = 1.0 / lutSize;\n float halfPixelWidth = 0.5 / lutSize;\n vec3 uvw = vec3( halfPixelWidth ) + val.rgb * ( 1.0 - pixelWidth );\n\n\n lutVal = vec4( texture( lut, uvw ).rgb, val.a );\n\n gl_FragColor = vec4( mix( val, lutVal, intensity ) );\n\n }\n\n "
2009
- }, Ut = class extends Vt {
2026
+ }, Wt = class extends Ht {
2010
2027
  constructor(e = {}) {
2011
- super(Ht), this.lut = e.lut || null, this.intensity = "intensity" in e ? e.intensity : 1;
2028
+ super(Ut), this.lut = e.lut || null, this.intensity = "intensity" in e ? e.intensity : 1;
2012
2029
  }
2013
2030
  set lut(e) {
2014
2031
  let t = this.material;
@@ -2023,15 +2040,15 @@ var W = class e extends T {
2023
2040
  get intensity() {
2024
2041
  return this.material.uniforms.intensity.value;
2025
2042
  }
2026
- }, Wt = class extends ge {
2043
+ }, Gt = class extends be {
2027
2044
  constructor(e) {
2028
- super(e), this.type = b;
2045
+ super(e), this.type = S;
2029
2046
  }
2030
2047
  setType(e) {
2031
2048
  return this.type = e, this;
2032
2049
  }
2033
2050
  load(e, t, n, r) {
2034
- let i = new ne(this.manager);
2051
+ let i = new oe(this.manager);
2035
2052
  i.setPath(this.path), i.setResponseType("text"), i.load(e, (n) => {
2036
2053
  try {
2037
2054
  t(this.parse(n));
@@ -2041,27 +2058,27 @@ var W = class e extends T {
2041
2058
  }, n, r);
2042
2059
  }
2043
2060
  parse(e) {
2044
- let t = /TITLE +"([^"]*)"/, n = /LUT_3D_SIZE +(\d+)/, r = /DOMAIN_MIN +([\d.]+) +([\d.]+) +([\d.]+)/, i = /DOMAIN_MAX +([\d.]+) +([\d.]+) +([\d.]+)/, a = /^([\d.e+-]+) +([\d.e+-]+) +([\d.e+-]+) *$/gm, o = t.exec(e), c = o === null ? null : o[1];
2061
+ let t = /TITLE +"([^"]*)"/, n = /LUT_3D_SIZE +(\d+)/, r = /DOMAIN_MIN +([\d.]+) +([\d.]+) +([\d.]+)/, i = /DOMAIN_MAX +([\d.]+) +([\d.]+) +([\d.]+)/, a = /^([\d.e+-]+) +([\d.e+-]+) +([\d.e+-]+) *$/gm, o = t.exec(e), s = o === null ? null : o[1];
2045
2062
  if (o = n.exec(e), o === null) throw Error("THREE.LUTCubeLoader: Missing LUT_3D_SIZE information");
2046
- let l = Number(o[1]), u = l ** 3 * 4, d = this.type === 1009 ? new Uint8Array(u) : new Float32Array(u), p = new s(0, 0, 0), m = new s(1, 1, 1);
2047
- if (o = r.exec(e), o !== null && p.set(Number(o[1]), Number(o[2]), Number(o[3])), o = i.exec(e), o !== null && m.set(Number(o[1]), Number(o[2]), Number(o[3])), p.x > m.x || p.y > m.y || p.z > m.z) throw Error("THREE.LUTCubeLoader: Invalid input domain");
2048
- let h = this.type === 1009 ? 255 : 1, _ = 0;
2049
- for (; (o = a.exec(e)) !== null;) d[_++] = Number(o[1]) * h, d[_++] = Number(o[2]) * h, d[_++] = Number(o[3]) * h, d[_++] = h;
2050
- let v = new k();
2051
- return v.image.data = d, v.image.width = l, v.image.height = l, v.image.depth = l, v.type = this.type, v.magFilter = f, v.minFilter = f, v.wrapS = g, v.wrapT = g, v.wrapR = g, v.generateMipmaps = !1, v.needsUpdate = !0, {
2052
- title: c,
2053
- size: l,
2054
- domainMin: p,
2055
- domainMax: m,
2056
- texture3D: v
2063
+ let c = Number(o[1]), l = c ** 3 * 4, u = this.type === 1009 ? new Uint8Array(l) : new Float32Array(l), d = new p(0, 0, 0), f = new p(1, 1, 1);
2064
+ if (o = r.exec(e), o !== null && d.set(Number(o[1]), Number(o[2]), Number(o[3])), o = i.exec(e), o !== null && f.set(Number(o[1]), Number(o[2]), Number(o[3])), d.x > f.x || d.y > f.y || d.z > f.z) throw Error("THREE.LUTCubeLoader: Invalid input domain");
2065
+ let m = this.type === 1009 ? 255 : 1, h = 0;
2066
+ for (; (o = a.exec(e)) !== null;) u[h++] = Number(o[1]) * m, u[h++] = Number(o[2]) * m, u[h++] = Number(o[3]) * m, u[h++] = m;
2067
+ let g = new Ce();
2068
+ return g.image.data = u, g.image.width = c, g.image.height = c, g.image.depth = c, g.type = this.type, g.magFilter = _, g.minFilter = _, g.wrapS = y, g.wrapT = y, g.wrapR = y, g.generateMipmaps = !1, g.needsUpdate = !0, {
2069
+ title: s,
2070
+ size: c,
2071
+ domainMin: d,
2072
+ domainMax: f,
2073
+ texture3D: g
2057
2074
  };
2058
2075
  }
2059
- }, Gt = class extends ge {
2076
+ }, Kt = class extends be {
2060
2077
  constructor(e) {
2061
2078
  super(e), this.flip = !1;
2062
2079
  }
2063
2080
  load(e, t, n, r) {
2064
- let i = new fe(this.manager);
2081
+ let i = new ge(this.manager);
2065
2082
  i.setCrossOrigin(this.crossOrigin), i.setPath(this.path), i.load(e, (n) => {
2066
2083
  try {
2067
2084
  let e;
@@ -2072,8 +2089,8 @@ var W = class e extends T {
2072
2089
  }, n, r);
2073
2090
  }
2074
2091
  parse(e, t) {
2075
- let n = new Uint8Array(e), r = new k();
2076
- return r.image.data = n, r.image.width = t, r.image.height = t, r.image.depth = t, r.format = p, r.type = b, r.magFilter = f, r.minFilter = f, r.wrapS = g, r.wrapT = g, r.wrapR = g, r.generateMipmaps = !1, r.needsUpdate = !0, {
2092
+ let n = new Uint8Array(e), r = new Ce();
2093
+ return r.image.data = n, r.image.width = t, r.image.height = t, r.image.depth = t, r.format = v, r.type = S, r.magFilter = _, r.minFilter = _, r.wrapS = y, r.wrapT = y, r.wrapR = y, r.generateMipmaps = !1, r.needsUpdate = !0, {
2077
2094
  size: t,
2078
2095
  texture3D: r
2079
2096
  };
@@ -2095,15 +2112,15 @@ var W = class e extends T {
2095
2112
  }
2096
2113
  return i.getImageData(0, 0, t, n);
2097
2114
  }
2098
- }, Kt = class extends ge {
2115
+ }, qt = class extends be {
2099
2116
  constructor(e) {
2100
- super(e), this.type = b;
2117
+ super(e), this.type = S;
2101
2118
  }
2102
2119
  setType(e) {
2103
2120
  return this.type = e, this;
2104
2121
  }
2105
2122
  load(e, t, n, r) {
2106
- let i = new ne(this.manager);
2123
+ let i = new oe(this.manager);
2107
2124
  i.setPath(this.path), i.setResponseType("text"), i.load(e, (n) => {
2108
2125
  try {
2109
2126
  t(this.parse(n));
@@ -2124,15 +2141,15 @@ var W = class e extends T {
2124
2141
  let i = u % o, a = Math.floor(u / o) % o, d = Math.floor(u / s) % o, f = (i * s + a * o + d) * 4;
2125
2142
  c[f + 0] = e, c[f + 1] = t, c[f + 2] = n, ++u;
2126
2143
  }
2127
- let d = 2 ** Math.ceil(Math.log2(l)), m = this.type === 1009 ? new Uint8Array(c.length) : c, h = this.type === 1009 ? 255 : 1;
2128
- for (let e = 0, t = m.length; e < t; e += 4) {
2144
+ let d = 2 ** Math.ceil(Math.log2(l)), f = this.type === 1009 ? new Uint8Array(c.length) : c, p = this.type === 1009 ? 255 : 1;
2145
+ for (let e = 0, t = f.length; e < t; e += 4) {
2129
2146
  let t = e + 1, n = e + 2, r = e + 3;
2130
- m[e] = c[e] / d * h, m[t] = c[t] / d * h, m[n] = c[n] / d * h, m[r] = h;
2147
+ f[e] = c[e] / d * p, f[t] = c[t] / d * p, f[n] = c[n] / d * p, f[r] = p;
2131
2148
  }
2132
- let _ = new k();
2133
- return _.image.data = m, _.image.width = o, _.image.height = o, _.image.depth = o, _.format = p, _.type = this.type, _.magFilter = f, _.minFilter = f, _.wrapS = g, _.wrapT = g, _.wrapR = g, _.generateMipmaps = !1, _.needsUpdate = !0, {
2149
+ let m = new Ce();
2150
+ return m.image.data = f, m.image.width = o, m.image.height = o, m.image.depth = o, m.format = v, m.type = this.type, m.magFilter = _, m.minFilter = _, m.wrapS = y, m.wrapT = y, m.wrapR = y, m.generateMipmaps = !1, m.needsUpdate = !0, {
2134
2151
  size: o,
2135
- texture3D: _
2152
+ texture3D: m
2136
2153
  };
2137
2154
  }
2138
2155
  }, $ = {
@@ -2143,26 +2160,26 @@ var W = class e extends T {
2143
2160
  },
2144
2161
  vertexShader: "\n precision highp float;\n\n uniform mat4 modelViewMatrix;\n uniform mat4 projectionMatrix;\n\n attribute vec3 position;\n attribute vec2 uv;\n\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }",
2145
2162
  fragmentShader: "\n\n precision highp float;\n\n uniform sampler2D tDiffuse;\n\n #include <tonemapping_pars_fragment>\n #include <colorspace_pars_fragment>\n\n varying vec2 vUv;\n\n void main() {\n\n gl_FragColor = texture2D( tDiffuse, vUv );\n\n // tone mapping\n\n #ifdef LINEAR_TONE_MAPPING\n\n gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );\n\n #elif defined( REINHARD_TONE_MAPPING )\n\n gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );\n\n #elif defined( CINEON_TONE_MAPPING )\n\n gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );\n\n #elif defined( ACES_FILMIC_TONE_MAPPING )\n\n gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );\n\n #elif defined( AGX_TONE_MAPPING )\n\n gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );\n\n #elif defined( NEUTRAL_TONE_MAPPING )\n\n gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );\n\n #elif defined( CUSTOM_TONE_MAPPING )\n\n gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );\n\n #endif\n\n // color space\n\n #ifdef SRGB_TRANSFER\n\n gl_FragColor = sRGBTransferOETF( gl_FragColor );\n\n #endif\n\n }"
2146
- }, qt = class extends B {
2163
+ }, Jt = class extends He {
2147
2164
  constructor() {
2148
- super(), this.isOutputPass = !0, this.uniforms = C.clone($.uniforms), this.material = new c({
2165
+ super(), this.isOutputPass = !0, this.uniforms = T.clone($.uniforms), this.material = new m({
2149
2166
  name: $.name,
2150
2167
  uniforms: this.uniforms,
2151
2168
  vertexShader: $.vertexShader,
2152
2169
  fragmentShader: $.fragmentShader
2153
- }), this._fsQuad = new V(this.material), this._outputColorSpace = null, this._toneMapping = null;
2170
+ }), this._fsQuad = new H(this.material), this._outputColorSpace = null, this._toneMapping = null;
2154
2171
  }
2155
2172
  render(e, t, n) {
2156
- this.uniforms.tDiffuse.value = n.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {}, o.getTransfer(this._outputColorSpace) === "srgb" && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === 1 ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === 2 ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === 3 ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === 4 ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === 6 ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === 7 ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === 5 && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
2173
+ this.uniforms.tDiffuse.value = n.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {}, f.getTransfer(this._outputColorSpace) === "srgb" && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === 1 ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === 2 ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === 3 ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === 4 ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === 6 ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === 7 ? this.material.defines.NEUTRAL_TONE_MAPPING = "" : this._toneMapping === 5 && (this.material.defines.CUSTOM_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (e.setRenderTarget(null), this._fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this._fsQuad.render(e));
2157
2174
  }
2158
2175
  dispose() {
2159
2176
  this.material.dispose(), this._fsQuad.dispose();
2160
2177
  }
2161
- }, Jt = {
2178
+ }, Yt = {
2162
2179
  enabled: !1,
2163
2180
  intensity: 1,
2164
2181
  lut: "Bourbon 64"
2165
- }, Yt = class {
2182
+ }, Xt = class {
2166
2183
  get passRenderer() {
2167
2184
  return this._passRenderer;
2168
2185
  }
@@ -2218,36 +2235,36 @@ var W = class e extends T {
2218
2235
  return this._sceneRenderer.outlineRenderer;
2219
2236
  }
2220
2237
  get debugPass() {
2221
- return this._debugPass ??= new It(this), this._debugPass;
2238
+ return this._debugPass ??= new Lt(this), this._debugPass;
2222
2239
  }
2223
2240
  get debugOutput() {
2224
2241
  return this._sceneRenderer.debugOutput;
2225
2242
  }
2226
- constructor(t, n) {
2227
- this.materialsNeedUpdate = !0, this._passRenderer = new Ne(), this._outlinePass = null, this._debugPass = null, this._cameraUpdate = new De(), this._cameraChanged = !0, this._noUpdateNeededCount = 0, this._noOStaticFrames = 0, this._maxSamples = 1, this._passUpdateStates = {
2243
+ constructor(e, t) {
2244
+ this.materialsNeedUpdate = !0, this._passRenderer = new Ie(), this._outlinePass = null, this._debugPass = null, this._cameraUpdate = new I(), this._cameraChanged = !0, this._noUpdateNeededCount = 0, this._noOStaticFrames = 0, this._maxSamples = 1, this._passUpdateStates = {
2228
2245
  updateGroundReflection: !1,
2229
2246
  updateGBuffer: !1,
2230
2247
  updateScreenSpaceShadow: !1,
2231
2248
  updateShadowAndAoPass: !1,
2232
2249
  updateOutlinePass: !1,
2233
2250
  updateDebugPass: !1
2234
- }, this.aoPassMapTexture = null, this._lutMap = /* @__PURE__ */ new Map(), this._lutPassParameters = Jt, this.lutPassNeedsUpdate = !1, this._renderToRenderTarget = !1, this._creator_ = t, this._sceneRenderer = n, this._maxSamples = e(this._sceneRenderer.renderer);
2235
- let r = this._sceneRenderer.linearAoFilter, i = r ? this._maxSamples : 0, a = r ? this._maxSamples : 0;
2236
- this._sceneRenderPass = new Lt(this), this._bakedGroundContactShadowPass = new tt(this, this._sceneRenderer.renderer, this._sceneRenderer.groundGroup, { sharedShadowGroundPlane: this._sceneRenderer.shadowAndAoGroundPlane }), this._gBufferRenderPass = new ot(this, {
2251
+ }, this.aoPassMapTexture = null, this._lutMap = /* @__PURE__ */ new Map(), this._lutPassParameters = Yt, this.lutPassNeedsUpdate = !1, this._renderToRenderTarget = !1, this._creator_ = e, this._sceneRenderer = t, this._maxSamples = i(this._sceneRenderer.renderer);
2252
+ let n = this._sceneRenderer.linearAoFilter, r = n ? this._maxSamples : 0, a = n ? this._maxSamples : 0;
2253
+ this._sceneRenderPass = new Rt(this), this._bakedGroundContactShadowPass = new tt(this, this._sceneRenderer.renderer, this._sceneRenderer.groundGroup, { sharedShadowGroundPlane: this._sceneRenderer.shadowAndAoGroundPlane }), this._gBufferRenderPass = new ot(this, {
2237
2254
  shared: !0,
2238
2255
  capabilities: this._sceneRenderer.renderer.capabilities,
2239
2256
  width: this._sceneRenderer.width,
2240
2257
  height: this._sceneRenderer.height,
2241
- samples: i,
2242
- textureMinificationFilter: r ? f : O,
2243
- textureMagnificationFilter: r ? f : O
2244
- }), this._groundReflectionPass = new ct(this, this._sceneRenderer.width, this._sceneRenderer.height, this._maxSamples, {}), this._screenSpaceShadowMapPass = new vt(this, new _(this._sceneRenderer.width, this._sceneRenderer.height), {
2258
+ samples: r,
2259
+ textureMinificationFilter: n ? _ : j,
2260
+ textureMagnificationFilter: n ? _ : j
2261
+ }), this._groundReflectionPass = new ct(this, this._sceneRenderer.width, this._sceneRenderer.height, this._maxSamples, {}), this._screenSpaceShadowMapPass = new vt(this, new b(this._sceneRenderer.width, this._sceneRenderer.height), {
2245
2262
  samples: a,
2246
2263
  alwaysUpdate: !1
2247
- }), this._shadowAndAoPass = new Y(this, this._sceneRenderer.width, this._sceneRenderer.height, i), this._lutPass = new Ut({
2264
+ }), this._shadowAndAoPass = new X(this, this._sceneRenderer.width, this._sceneRenderer.height, r), this._lutPass = new Wt({
2248
2265
  lut: void 0,
2249
2266
  intensity: 1
2250
- }), this._outputPass = new qt();
2267
+ }), this._outputPass = new Jt();
2251
2268
  }
2252
2269
  dispose() {
2253
2270
  this._sceneRenderPass.dispose(), this._bakedGroundContactShadowPass.dispose(), this._gBufferRenderPass.dispose(), this._groundReflectionPass.dispose(), this._screenSpaceShadowMapPass.dispose(), this._shadowAndAoPass.dispose(), this._outlinePass?.dispose(), this._lutPass.dispose(), this._outputPass.dispose(), this._passRenderTarget?.dispose(), this._passPassRenderTarget?.dispose();
@@ -2258,34 +2275,34 @@ var W = class e extends T {
2258
2275
  this._lutPass.setSize(r, i), this._outputPass.setSize(r, i), this._passRenderTarget?.setSize(r, i), this._passPassRenderTarget?.setSize(r, i);
2259
2276
  }
2260
2277
  loadLutImage(e, t) {
2261
- this._lutMap.set(e, null), new Gt().load(t, (t) => {
2278
+ this._lutMap.set(e, null), new Kt().load(t, (t) => {
2262
2279
  this._lutMap.set(e, t);
2263
2280
  });
2264
2281
  }
2265
2282
  loadLutCube(e, t) {
2266
- this._lutMap.set(e, null), new Wt().load(t, (t) => {
2283
+ this._lutMap.set(e, null), new Gt().load(t, (t) => {
2267
2284
  this._lutMap.set(e, t);
2268
2285
  });
2269
2286
  }
2270
2287
  loadLut3dl(e, t) {
2271
- this._lutMap.set(e, null), new Kt().load(t, (t) => {
2288
+ this._lutMap.set(e, null), new qt().load(t, (t) => {
2272
2289
  this._lutMap.set(e, t);
2273
2290
  });
2274
2291
  }
2275
2292
  createOutlinePass() {
2276
- return this._outlinePass ||= new Dt(this, new _(this._sceneRenderer.width, this._sceneRenderer.height), this.scene, this.camera, [], {
2293
+ return this._outlinePass ||= new Dt(this, new b(this._sceneRenderer.width, this._sceneRenderer.height), this.scene, this.camera, [], {
2277
2294
  downSampleRatio: 2,
2278
2295
  edgeDetectionFxaa: !0
2279
2296
  }), this._outlinePass;
2280
2297
  }
2281
2298
  getRenderPassRenderTarget(e) {
2282
- return this._lutPassParameters.enabled ? (this._passRenderTarget = this._passRenderTarget ?? new t(this._sceneRenderer.width * e.getPixelRatio(), this._sceneRenderer.height * e.getPixelRatio(), {
2299
+ return this._lutPassParameters.enabled ? (this._passRenderTarget = this._passRenderTarget ?? new s(this._sceneRenderer.width * e.getPixelRatio(), this._sceneRenderer.height * e.getPixelRatio(), {
2283
2300
  type: 1016,
2284
2301
  samples: this._maxSamples
2285
2302
  }), this._passRenderTarget) : null;
2286
2303
  }
2287
2304
  getPostPassRenderTarget(e) {
2288
- return this._lutPassParameters.enabled ? (this._passPassRenderTarget = this._passPassRenderTarget ?? new t(this._sceneRenderer.width * e.getPixelRatio(), this._sceneRenderer.height * e.getPixelRatio(), { type: 1016 }), this._passPassRenderTarget) : null;
2305
+ return this._lutPassParameters.enabled ? (this._passPassRenderTarget = this._passPassRenderTarget ?? new s(this._sceneRenderer.width * e.getPixelRatio(), this._sceneRenderer.height * e.getPixelRatio(), { type: 1016 }), this._passPassRenderTarget) : null;
2289
2306
  }
2290
2307
  setGroundVisibility(e) {
2291
2308
  this._sceneRenderer.shadowAndAoGroundPlane.setVisibility(e);
@@ -2298,7 +2315,7 @@ var W = class e extends T {
2298
2315
  _evaluateIfShadowAndAoUpdateIsNeeded() {
2299
2316
  let e = this._shadowAndAoPass.parameters.alwaysUpdate || this._screenSpaceShadowMapPass.needsUpdate || this._screenSpaceShadowMapPass.shadowTypeNeedsUpdate, t = (this._shadowAndAoPass.parameters.enabled || this._groundReflectionPass.parameters.enabled) && this._cameraChanged, n = 1;
2300
2317
  t && (this._noUpdateNeededCount = 0, this._noOStaticFrames = 0), e || (this._noUpdateNeededCount++, t = this._noUpdateNeededCount >= this.parameters.effectSuspendFrames, n = Math.max(0, Math.min(1, (this._noUpdateNeededCount - this.parameters.effectSuspendFrames) / this.parameters.effectFadeInFrames))), !e && n === 1 && this._noOStaticFrames++, t = e || t;
2301
- let r = !t || n < .99 ? this.parameters.shadowOnCameraChange : q.OFF;
2318
+ let r = !t || n < .99 ? this.parameters.shadowOnCameraChange : J.OFF;
2302
2319
  return {
2303
2320
  needsUpdate: t,
2304
2321
  shadowOnCameraChange: r,
@@ -2306,7 +2323,7 @@ var W = class e extends T {
2306
2323
  };
2307
2324
  }
2308
2325
  _dynamicChanges(e) {
2309
- return e.needsUpdate || e.shadowOnCameraChange !== q.OFF;
2326
+ return e.needsUpdate || e.shadowOnCameraChange !== J.OFF;
2310
2327
  }
2311
2328
  _updateSceneRenderPass() {
2312
2329
  this._sceneRenderPass.drawWithDebugMaterial = !1;
@@ -2316,7 +2333,7 @@ var W = class e extends T {
2316
2333
  this._bakedGroundContactShadowPass.limitPlaneSize = this._bakedGroundContactShadowPass.parameters.enabled, (e !== this._bakedGroundContactShadowPass.limitPlaneSize || this._bakedGroundContactShadowPass.needsUpdate) && this._bakedGroundContactShadowPass.updateBounds(this._sceneRenderer.boundingVolume, this._sceneRenderer.groundLevel), this._sceneRenderPass.drawGround = this._bakedGroundContactShadowPass.parameters.enabled || this._shadowAndAoPass.parameters.applyToMaterial;
2317
2334
  }
2318
2335
  _updateGBufferPass(e) {
2319
- this._passUpdateStates.updateGBuffer = !1, this._gBufferRenderPass.needsUpdate = e.needsUpdate || e.shadowOnCameraChange === q.POISSON, this.gBufferRenderPass.drawGround = this._sceneRenderer.boundingVolumeSet && this._shadowAndAoPass.parameters.aoOnGround;
2336
+ this._passUpdateStates.updateGBuffer = !1, this._gBufferRenderPass.needsUpdate = e.needsUpdate || e.shadowOnCameraChange === J.POISSON, this.gBufferRenderPass.drawGround = this._sceneRenderer.boundingVolumeSet && this._shadowAndAoPass.parameters.aoOnGround;
2320
2337
  }
2321
2338
  _updateGroundReflectionPass(e) {
2322
2339
  this._passUpdateStates.updateGroundReflection = !1, this._groundReflectionPass.parameters.enabled && this._dynamicChanges(e) && (!this.parameters.suspendGroundReflection || e.needsUpdate) && (this._groundReflectionPass.reflectionFadeInScale = this.parameters.suspendGroundReflection ? e.intensityScale : 1, this._passUpdateStates.updateGroundReflection = !0);
@@ -2335,7 +2352,7 @@ var W = class e extends T {
2335
2352
  }
2336
2353
  this._shadowAndAoPass.shadowAndAoPassSettings = {
2337
2354
  shadowMapTexture: this._screenSpaceShadowMapPass.shadowTexture,
2338
- shadowBlurType: e.needsUpdate ? q.FULL : e.shadowOnCameraChange,
2355
+ shadowBlurType: e.needsUpdate ? J.FULL : e.shadowOnCameraChange,
2339
2356
  shadowFadeInBlurType: e.shadowOnCameraChange,
2340
2357
  shadowFadeInMix: 1 - e.intensityScale,
2341
2358
  noOStaticFrames: this.noOStaticFrames
@@ -2376,12 +2393,12 @@ var W = class e extends T {
2376
2393
  this.materialsNeedUpdate = !1, t.traverse((e) => {
2377
2394
  if (e.isMesh) {
2378
2395
  let t = e.material;
2379
- t instanceof _e && this._updateMaterial(e, t, n);
2396
+ t instanceof k && this._updateMaterial(e, t, n);
2380
2397
  }
2381
2398
  });
2382
2399
  }
2383
2400
  _updateMaterial(e, t, n) {
2384
- let r = Rt.addPlugin(t);
2401
+ let r = zt.addPlugin(t);
2385
2402
  r && (this._updatePlugInAo(r, e, t, n), this._updatePlugInReflection(r, e), t.needsUpdate = !1);
2386
2403
  }
2387
2404
  _updatePlugInAo(e, t, n, r) {
@@ -2397,15 +2414,15 @@ var W = class e extends T {
2397
2414
  e.setRenderTarget(n), this._bakedGroundContactShadowPass.renderPass(e), this._passUpdateStates.updateGBuffer && this._gBufferRenderPass.renderPass(e), this._passUpdateStates.updateScreenSpaceShadow && this._screenSpaceShadowMapPass.renderPass(e), this._passUpdateStates.updateShadowAndAoPass && this._shadowAndAoPass.renderPass(e), this._updateMaterials(e, t), this._sceneRenderPass.renderPass(e), this._passUpdateStates.updateGroundReflection && this._groundReflectionPass.renderPass(e), this._passUpdateStates.updateShadowAndAoPass && !this._shadowAndAoPass.parameters.applyToMaterial && this._shadowAndAoPass.renderToTarget(e), this._lutPassParameters.enabled && (e.setRenderTarget(r), this._outputPass.renderToScreen = !1, this._outputPass.render(e, e.getRenderTarget(), n, 0, !1), e.setRenderTarget(null), this._lutPass.renderToScreen = !0, this._lutPass.render(e, e.getRenderTarget(), r, 0, !1)), this._passUpdateStates.updateOutlinePass && this._outlinePass?.renderPass(e), this._passUpdateStates.updateDebugPass && this._debugPass?.renderPass(e);
2398
2415
  }
2399
2416
  };
2400
- Ve([Be, ze("design:type", Object)], Yt.prototype, "_initData", void 0);
2417
+ Ge([We, Ue("design:type", Object)], Xt.prototype, "_initData", void 0);
2401
2418
  //#endregion
2402
2419
  //#region packages/common-core/src/webgl/renderer/scene-renderer.ts
2403
- var Xt = {
2420
+ var Zt = {
2404
2421
  HIGHEST: "highest",
2405
2422
  HIGH: "high",
2406
2423
  MEDIUM: "medium",
2407
2424
  LOW: "low"
2408
- }, Zt = class {
2425
+ }, Qt = class {
2409
2426
  get sceneRenderPass() {
2410
2427
  return this._renderPassManager.sceneRenderPass;
2411
2428
  }
@@ -2436,8 +2453,8 @@ var Xt = {
2436
2453
  get shadowAndAoGroundPlane() {
2437
2454
  return this._shadowAndAoGroundPlane;
2438
2455
  }
2439
- constructor(e, t, n, r, i) {
2440
- this.debugOutput = "off", this.outputColorSpace = "", this.toneMapping = "", this.linearAoFilter = !0, this.environmentLights = !1, this.enableObjectSelection = !0, this.groundLevel = 0, this.uiInteractionMode = !1, this.width = 0, this.height = 0, this.boundingVolume = new Ae(), this.boundingVolumeSet = !1, this.renderCacheManager = new We(), this.selectedObjects = [], this.groundGroup = new pe(), this._shadingType = Ie.DEFAULT, this._qualityLevel = Xt.HIGHEST, this._qualityMap = /* @__PURE__ */ new Map(), this._customShadingParameters = null, this._creator_ = e, this.width = n, this.height = r, this.linearAoFilter = i ?? !0, this.renderer = t, this.renderCacheManager.registerCache("inivisibleGround", new U((e) => e === this.groundGroup)), this.renderCacheManager.registerCache("groundReflection", new U((e) => e === this.groundGroup || e.name === "dimensioning" ? !0 : !!(e instanceof T && H(e.material)))), this.renderCacheManager.registerCache("debug", new U()), this.renderCacheManager.registerCache("floorDepthWrite", new Ge((e) => e.userData?.isFloor)), this._shadowAndAoGroundPlane = new W(null), this.groundGroup.rotateX(-Math.PI / 2), this._renderPassManager = new Yt(e, this), this.outlineRenderer = new $e(this._renderPassManager, null, {}), this.parameters = {
2456
+ constructor(t, n, i, s, c) {
2457
+ this.debugOutput = "off", this.outputColorSpace = "", this.toneMapping = "", this.linearAoFilter = !0, this.environmentLights = !1, this.enableObjectSelection = !0, this.groundLevel = 0, this.uiInteractionMode = !1, this.width = 0, this.height = 0, this.boundingVolume = new Ne(), this.boundingVolumeSet = !1, this.renderCacheManager = new e(), this.selectedObjects = [], this.groundGroup = new _e(), this._shadingType = ze.DEFAULT, this._qualityLevel = Zt.HIGHEST, this._qualityMap = /* @__PURE__ */ new Map(), this._customShadingParameters = null, this._creator_ = t, this.width = i, this.height = s, this.linearAoFilter = c ?? !0, this.renderer = n, this.renderCacheManager.registerCache("inivisibleGround", new a((e) => e === this.groundGroup)), this.renderCacheManager.registerCache("groundReflection", new a((e) => e === this.groundGroup || e.name === "dimensioning" ? !0 : !!(e instanceof D && o(e.material)))), this.renderCacheManager.registerCache("debug", new a()), this.renderCacheManager.registerCache("floorDepthWrite", new r((e) => e.userData?.isFloor)), this._shadowAndAoGroundPlane = new W(null), this.groundGroup.rotateX(-Math.PI / 2), this._renderPassManager = new Xt(t, this), this.outlineRenderer = new $e(this._renderPassManager, null, {}), this.parameters = {
2441
2458
  gBufferRenderTargetParameters: this.gBufferRenderPass.parameters,
2442
2459
  bakedGroundContactShadowParameters: this.bakedGroundContactShadowPass.parameters,
2443
2460
  screenSpaceShadowMapParameters: this.screenSpaceShadowMapPass.parameters,
@@ -2447,7 +2464,7 @@ var Xt = {
2447
2464
  effectSuspendFrames: 0,
2448
2465
  effectFadeInFrames: 0,
2449
2466
  suspendGroundReflection: !1,
2450
- shadowOnCameraChange: q.OFF
2467
+ shadowOnCameraChange: J.OFF
2451
2468
  }, this._addEventListeners(this.renderer);
2452
2469
  }
2453
2470
  _addEventListeners(e) {
@@ -2493,14 +2510,14 @@ var Xt = {
2493
2510
  applyCurrentParameters() {
2494
2511
  let e = [];
2495
2512
  this._qualityMap.has(this._qualityLevel) && e.push(this._qualityMap.get(this._qualityLevel));
2496
- let t = Pe(this._shadingType);
2513
+ let t = Le(this._shadingType);
2497
2514
  t && e.push(t);
2498
- let n = je(this.uiInteractionMode);
2499
- if (n && e.push(n), this._customShadingParameters && e.push(ke(this._customShadingParameters)), this._customOutlineParameters && e.push({ outlineParameters: {
2515
+ let n = Pe(this.uiInteractionMode);
2516
+ if (n && e.push(n), this._customShadingParameters && e.push(Me(this._customShadingParameters)), this._customOutlineParameters && e.push({ outlineParameters: {
2500
2517
  visibleEdgeColor: this._customOutlineParameters.outlineVisibleEdgeColor,
2501
2518
  hiddenEdgeColor: this._customOutlineParameters.outlineHiddenEdgeColor
2502
2519
  } }), e.length > 0) {
2503
- let t = Te(...e);
2520
+ let t = ke(...e);
2504
2521
  this.updateParameters(t), this.bakedGroundContactShadowPass.applyParameters();
2505
2522
  }
2506
2523
  }
@@ -2566,8 +2583,8 @@ var Xt = {
2566
2583
  t?.projectionMatrix && (e.add(this.groundGroup), this._updateEnvironment(this.renderer, e), this.outlineRenderer.updateOutline(e, t, this.enableObjectSelection ? this.selectedObjects : []), this._renderPassManager.updatePasses(this.renderer, e, t), this._renderPassManager.renderPasses(this.renderer, e), e.remove(this.groundGroup));
2567
2584
  }
2568
2585
  };
2569
- Ve([Be, ze("design:type", Object)], Zt.prototype, "_initData", void 0);
2586
+ Ge([We, Ue("design:type", Object)], Qt.prototype, "_initData", void 0);
2570
2587
  //#endregion
2571
- export { ft as a, Mt as i, Zt as n, q as o, Q as r, Xt as t };
2588
+ export { ft as a, Ke as c, Nt as i, Qt as n, J as o, Q as r, U as s, Zt as t };
2572
2589
 
2573
- //# sourceMappingURL=scene-renderer--DzrpIl_.mjs.map
2590
+ //# sourceMappingURL=scene-renderer-CoPV8z_q.mjs.map