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

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 (87) hide show
  1. package/lib/ConfiguratorKernel.wasm +0 -0
  2. package/lib/{GaussianBlurNode-DEczNsyD.mjs → GaussianBlurNode-Bjszve7N.mjs} +15 -15
  3. package/lib/{GaussianBlurNode-DEczNsyD.mjs.map → GaussianBlurNode-Bjszve7N.mjs.map} +1 -1
  4. package/lib/RoomleCore.wasm +0 -0
  5. package/lib/RoomleToolsCore.wasm +0 -0
  6. package/lib/{api-B6sLiuiL.mjs → api-C0UElaCW.mjs} +2 -2
  7. package/lib/{api-B6sLiuiL.mjs.map → api-C0UElaCW.mjs.map} +1 -1
  8. package/lib/asset-loader.worker-eqHzNAwa.mjs.map +1 -1
  9. package/lib/{banana-for-scale-C-grIlTK.mjs → banana-for-scale-DGYmxeBG.mjs} +3 -3
  10. package/lib/{banana-for-scale-C-grIlTK.mjs.map → banana-for-scale-DGYmxeBG.mjs.map} +1 -1
  11. package/lib/budgeteer.sw-BUMElkO1.mjs.map +1 -1
  12. package/lib/{common-utils-6T8eGlhX.mjs → common-utils-CyQUubmw.mjs} +29 -15
  13. package/lib/{common-utils-6T8eGlhX.mjs.map → common-utils-CyQUubmw.mjs.map} +1 -1
  14. package/lib/{component-dimensioning-DJuokZnv.mjs → component-dimensioning--4sX2AgY.mjs} +4 -4
  15. package/lib/{component-dimensioning-DJuokZnv.mjs.map → component-dimensioning--4sX2AgY.mjs.map} +1 -1
  16. package/lib/{component-raycast-helper-SZg14d7A.mjs → component-raycast-helper-CskJedpv.mjs} +3 -3
  17. package/lib/{component-raycast-helper-SZg14d7A.mjs.map → component-raycast-helper-CskJedpv.mjs.map} +1 -1
  18. package/lib/configurator-CjFo24FH.mjs +2 -0
  19. package/lib/{configurator-Cbof6AET.mjs → configurator-vxRFxJ-B.mjs} +4 -4
  20. package/lib/{configurator-Cbof6AET.mjs.map → configurator-vxRFxJ-B.mjs.map} +1 -1
  21. package/lib/{decorate-CX1ZGuFY.mjs → decorate-CjaqqbUP.mjs} +12 -9
  22. package/lib/decorate-CjaqqbUP.mjs.map +1 -0
  23. package/lib/dimensioning-helper-0s61LK9R.mjs +2 -0
  24. package/lib/{dimensioning-helper-BwvR76_I.mjs → dimensioning-helper-Cgao7A18.mjs} +2 -2
  25. package/lib/{dimensioning-helper-BwvR76_I.mjs.map → dimensioning-helper-Cgao7A18.mjs.map} +1 -1
  26. package/lib/{glb-viewer-DmVh1uJg.mjs → glb-viewer-B-r0E1aa.mjs} +6 -6
  27. package/lib/{glb-viewer-DmVh1uJg.mjs.map → glb-viewer-B-r0E1aa.mjs.map} +1 -1
  28. package/lib/glb-viewer-BnJkmakv.mjs +2 -0
  29. package/lib/{highlight-coordinator-Qonmfsu1.mjs → highlight-coordinator-CR5rcFh_.mjs} +2 -2
  30. package/lib/{highlight-coordinator-Qonmfsu1.mjs.map → highlight-coordinator-CR5rcFh_.mjs.map} +1 -1
  31. package/lib/{homag-intelligence-CzD_RMQo.mjs → homag-intelligence-DHTCBB64.mjs} +8 -5
  32. package/lib/{homag-intelligence-CzD_RMQo.mjs.map → homag-intelligence-DHTCBB64.mjs.map} +1 -1
  33. package/lib/{imos-ix-poc-export-helper-Q6-OXziY.mjs → imos-ix-poc-export-helper-DRQK_p2h.mjs} +2 -2
  34. package/lib/{imos-ix-poc-export-helper-Q6-OXziY.mjs.map → imos-ix-poc-export-helper-DRQK_p2h.mjs.map} +1 -1
  35. package/lib/{material-viewer-BkSh-aG7.mjs → material-viewer-ZlNDhA8D.mjs} +6 -6
  36. package/lib/{material-viewer-BkSh-aG7.mjs.map → material-viewer-ZlNDhA8D.mjs.map} +1 -1
  37. package/lib/{packages-BGVMQMZK.mjs → packages-C9J0u-cc.mjs} +5 -5
  38. package/lib/{packages-BGVMQMZK.mjs.map → packages-C9J0u-cc.mjs.map} +1 -1
  39. package/lib/planner-C-5Mg-Lv.mjs +2 -0
  40. package/lib/{planner-DFa8uJOF.mjs → planner-ClY-VUWt.mjs} +3 -3
  41. package/lib/{planner-DFa8uJOF.mjs.map → planner-ClY-VUWt.mjs.map} +1 -1
  42. package/lib/{plugin-system-CqXT37-v.mjs → plugin-system-vlnG8j2T.mjs} +3 -3
  43. package/lib/{plugin-system-CqXT37-v.mjs.map → plugin-system-vlnG8j2T.mjs.map} +1 -1
  44. package/lib/{roomle-headless-setup-7xnQlZl3.mjs → roomle-headless-setup-DbO_rLjK.mjs} +54 -40
  45. package/lib/roomle-headless-setup-DbO_rLjK.mjs.map +1 -0
  46. package/lib/roomle-headless.d.ts +125 -115
  47. package/lib/roomle-headless.js +289 -358
  48. package/lib/roomle-headless.js.map +1 -1
  49. package/lib/roomle-renderer-FUqNfNIf.mjs.map +1 -1
  50. package/lib/{roomle-sdk-B73VmWod.mjs → roomle-sdk-BpCPIwDm.mjs} +2447 -2306
  51. package/lib/roomle-sdk-BpCPIwDm.mjs.map +1 -0
  52. package/lib/roomle-sdk.d.ts +79 -4
  53. package/lib/roomle-sdk.js +7 -7
  54. package/lib/{roomle-webgpu-renderer-Dzuy_Y39.mjs → roomle-webgpu-renderer-Lt55gNj5.mjs} +370 -303
  55. package/lib/roomle-webgpu-renderer-Lt55gNj5.mjs.map +1 -0
  56. package/lib/{scene-renderer-DR7EFd-8.mjs → scene-renderer-CLkhNnnv.mjs} +5 -5
  57. package/lib/{scene-renderer-DR7EFd-8.mjs.map → scene-renderer-CLkhNnnv.mjs.map} +1 -1
  58. package/lib/{script-loader-BlsGBrYo.mjs → script-loader-9GrUxzSB.mjs} +3 -3
  59. package/lib/{script-loader-BlsGBrYo.mjs.map → script-loader-9GrUxzSB.mjs.map} +1 -1
  60. package/lib/{shading-settings-Bnt9v9xJ.mjs → shading-settings-CRNmMpcn.mjs} +2 -2
  61. package/lib/{shading-settings-Bnt9v9xJ.mjs.map → shading-settings-CRNmMpcn.mjs.map} +1 -1
  62. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  63. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  64. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  65. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  66. package/lib/{stats-helper-vEwFkDIt.mjs → stats-helper-D9l8soWd.mjs} +3 -3
  67. package/lib/{stats-helper-vEwFkDIt.mjs.map → stats-helper-D9l8soWd.mjs.map} +1 -1
  68. package/lib/three.tsl-BnL9nfJa.mjs +2 -0
  69. package/lib/{three.tsl-BElp7_oF.mjs → three.tsl-Dew9p5yF.mjs} +46 -48
  70. package/lib/{three.tsl-BElp7_oF.mjs.map → three.tsl-Dew9p5yF.mjs.map} +1 -1
  71. package/lib/{threejs-utils-C9zED_Tu.mjs → threejs-utils-CKV1QNU9.mjs} +4 -3
  72. package/lib/threejs-utils-CKV1QNU9.mjs.map +1 -0
  73. package/lib/{tools-core-DKYMilYC.mjs → tools-core-CKaB3WsP.mjs} +3 -3
  74. package/lib/{tools-core-DKYMilYC.mjs.map → tools-core-CKaB3WsP.mjs.map} +1 -1
  75. package/lib/{webgpu-BMwlJflc.mjs → webgpu-B0rxiqW-.mjs} +313 -313
  76. package/lib/{webgpu-BMwlJflc.mjs.map → webgpu-B0rxiqW-.mjs.map} +1 -1
  77. package/package.json +2 -2
  78. package/lib/configurator-BFd5022u.mjs +0 -2
  79. package/lib/decorate-CX1ZGuFY.mjs.map +0 -1
  80. package/lib/dimensioning-helper-yMfkA1IY.mjs +0 -2
  81. package/lib/glb-viewer-DlH5_aTU.mjs +0 -2
  82. package/lib/planner-CSKuhBke.mjs +0 -2
  83. package/lib/roomle-headless-setup-7xnQlZl3.mjs.map +0 -1
  84. package/lib/roomle-sdk-B73VmWod.mjs.map +0 -1
  85. package/lib/roomle-webgpu-renderer-Dzuy_Y39.mjs.map +0 -1
  86. package/lib/three.tsl-BtDRDR0q.mjs +0 -2
  87. package/lib/threejs-utils-C9zED_Tu.mjs.map +0 -1
@@ -1,18 +1,18 @@
1
- import { Ar as e, Br as t, Cr as n, En as r, Gi as i, Gn as a, J as o, Jr as s, Kn as c, On as l, Qt as u, Si as d, Tt as f, Ui as p, Y as m, _i as h, bi as g, ct as _, g as v, gi as y, hi as b, hr as ee, ht as x, in as S, jr as C, kr as w, li as T, mi as E, mr as te, q as ne, rt as D, sn as O, t as re, vi as ie, w as k, wr as ae, xi as oe, yi as se } from "./three.core-0KaTx8dm.mjs";
2
- import { t as ce } from "./shading-settings-Bnt9v9xJ.mjs";
3
- import { n as le, r as ue, t as de } from "./decorate-CX1ZGuFY.mjs";
4
- import { a as A, n as fe, r as pe } from "./roomle-renderer-FUqNfNIf.mjs";
5
- import { An as me, Dt as he, It as j, Kn as ge, Q as _e, Vt as ve, _n as ye, bn as M, fr as be, hr as xe, ln as Se, vt as Ce, x as we } from "./three.webgpu-ylONY593.mjs";
6
- import { $ as Te, A as Ee, B as De, C as Oe, D as ke, Dt as Ae, E as je, Ft as Me, G as Ne, H as Pe, It as Fe, J as Ie, K as Le, L as N, M as Re, Mt as P, N as ze, Nt as F, O as Be, P as Ve, Pt as He, Q as Ue, R as We, S as I, T as Ge, Tt as L, U as Ke, V as qe, W as Je, X as Ye, Y as Xe, Z as Ze, _ as Qe, a as $e, b as et, bt as R, c as tt, d as nt, dt as rt, et as it, f as at, ft as ot, g as st, gt as ct, h as lt, ht as ut, i as z, it as dt, j as ft, jt as B, kt as pt, l as mt, lt as ht, m as gt, n as V, nt as _t, o as vt, ot as yt, p as bt, pt as xt, q as St, r as Ct, rt as wt, s as Tt, st as Et, t as Dt, u as Ot, ut as kt, v as At, vt as jt, w as H, wt as U, x as Mt, xt as Nt, y as Pt, yt as Ft, z as It } from "./three.tsl-BElp7_oF.mjs";
1
+ import { Ar as e, Br as t, Ci as n, Cr as r, En as i, Gi as a, Gn as o, J as s, Jr as c, Kn as l, Mr as u, On as d, Qt as f, Si as p, Tt as m, Ui as h, V as g, Y as _, _i as v, bi as y, ct as b, g as ee, gi as x, hi as S, hr as C, ht as w, in as te, jr as T, kr as ne, li as re, mi as E, mr as ie, q as ae, rt as oe, sn as D, t as se, vi as ce, w as le, wr as ue, xi as de, yi as fe } from "./three.core-0KaTx8dm.mjs";
2
+ import { h as pe, t as me } from "./shading-settings-CRNmMpcn.mjs";
3
+ import { n as he, r as ge, t as _e } from "./decorate-CjaqqbUP.mjs";
4
+ import { a as O, n as ve, r as ye } from "./roomle-renderer-FUqNfNIf.mjs";
5
+ import { An as be, Dt as xe, It as k, Kn as Se, Q as Ce, Vt as we, _n as Te, bn as A, fr as Ee, hr as De, ln as Oe, vt as ke, x as Ae } from "./three.webgpu-ylONY593.mjs";
6
+ import { $ as je, A as Me, At as Ne, B as Pe, C as Fe, D as Ie, Dt as Le, E as Re, Et as j, F as ze, Ft as Be, G as Ve, H as He, It as Ue, J as We, K as Ge, Lt as Ke, M as qe, Mt as M, N as Je, Nt as N, O as Ye, Ot as Xe, P as Ze, Pt as P, Q as Qe, R as F, S as I, St as $e, T as et, Tt as L, U as tt, V as nt, W as rt, X as it, Y as at, Z as ot, _ as st, _t as ct, a as lt, at as ut, b as dt, bt as ft, c as R, ct as pt, d as mt, dt as ht, et as gt, f as _t, ft as vt, g as yt, gt as bt, h as xt, i as z, it as St, j as Ct, l as B, m as wt, mt as Tt, n as V, o as Et, p as Dt, pt as Ot, q as kt, r as At, rt as jt, s as Mt, st as Nt, t as Pt, tt as Ft, u as It, ut as Lt, v as Rt, w as H, x as zt, xt as U, y as Bt, yt as Vt, z as Ht } from "./three.tsl-Dew9p5yF.mjs";
7
7
  //#region ../../node_modules/three/examples/jsm/tsl/display/OutlineNode.js
8
- var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE__ */ new d(1, 0), zt = /* @__PURE__ */ new d(0, 1), G, Bt = class extends ge {
8
+ var W = /* @__PURE__ */ new Oe(), Ut = /* @__PURE__ */ new p(), Wt = /* @__PURE__ */ new p(1, 0), Gt = /* @__PURE__ */ new p(0, 1), G, Kt = class extends Se {
9
9
  static get type() {
10
10
  return "OutlineNode";
11
11
  }
12
12
  constructor(e, t, n = {}) {
13
13
  super("vec4");
14
14
  let { selectedObjects: r = [], edgeThickness: i = H(1), edgeGlow: a = H(0), downSampleRatio: o = 2 } = n;
15
- this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode = Pe(i), this.edgeGlowNode = Pe(a), this.downSampleRatio = o, this.updateBeforeType = ve.FRAME, this._renderTargetDepthBuffer = new C(), this._renderTargetDepthBuffer.depthTexture = new m(), this._renderTargetDepthBuffer.depthTexture.type = _, this._renderTargetMaskBuffer = new C(), this._renderTargetMaskDownSampleBuffer = new C(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new C(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new C(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new C(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new C(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new C(1, 1, { depthBuffer: !1 }), this._cameraNear = dt("near", "float", t), this._cameraFar = dt("far", "float", t), this._blurDirection = L(new d()), this._depthTextureUniform = R(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = R(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = R(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = R(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = R(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = R(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = P(1, 0, 0), this._hiddenEdgeColor = P(0, 1, 0), this._depthMaterial = new j(), this._depthMaterial.colorNode = lt(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new me(), this._depthSpriteMaterial.colorNode = lt(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new j(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new me(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new j(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new j(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new j(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new j(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new j(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = Ye(this, this._renderTargetComposite.texture);
15
+ this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode = tt(i), this.edgeGlowNode = tt(a), this.downSampleRatio = o, this.updateBeforeType = we.FRAME, this._renderTargetDepthBuffer = new T(), this._renderTargetDepthBuffer.depthTexture = new _(), this._renderTargetDepthBuffer.depthTexture.type = b, this._renderTargetMaskBuffer = new T(), this._renderTargetMaskDownSampleBuffer = new T(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new T(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new T(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new T(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new T(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new T(1, 1, { depthBuffer: !1 }), this._cameraNear = ut("near", "float", t), this._cameraFar = ut("far", "float", t), this._blurDirection = j(new p()), this._depthTextureUniform = U(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = U(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = U(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = U(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = U(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = U(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = N(1, 0, 0), this._hiddenEdgeColor = N(0, 1, 0), this._depthMaterial = new k(), this._depthMaterial.colorNode = xt(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new be(), this._depthSpriteMaterial.colorNode = xt(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new k(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new be(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new k(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new k(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new k(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new k(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new k(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = ot(this, this._renderTargetComposite.texture);
16
16
  }
17
17
  get visibleEdge() {
18
18
  return this.r;
@@ -31,11 +31,11 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
31
31
  updateBefore(e) {
32
32
  let { renderer: t } = e, { camera: n, scene: r } = this;
33
33
  if (this._updateSelectionCache(), this._selectionCache.size === 0) {
34
- this._lastSelectionCount > 0 && (G = M.resetRendererState(t, G), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), M.restoreRendererState(t, G), this._lastSelectionCount = 0);
34
+ this._lastSelectionCount > 0 && (G = A.resetRendererState(t, G), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), A.restoreRendererState(t, G), this._lastSelectionCount = 0);
35
35
  return;
36
36
  }
37
- this._lastSelectionCount = this._selectionCache.size, G = M.resetRendererAndSceneState(t, r, G);
38
- let i = t.getDrawingBufferSize(Lt);
37
+ this._lastSelectionCount = this._selectionCache.size, G = A.resetRendererAndSceneState(t, r, G);
38
+ let i = t.getDrawingBufferSize(Ut);
39
39
  this.setSize(i.width, i.height), t.setClearColor(16777215, 1);
40
40
  let a = r.name;
41
41
  t.setRenderTarget(this._renderTargetDepthBuffer), t.setRenderObjectFunction((e, n, r, i, a, o, s, c) => {
@@ -48,24 +48,24 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
48
48
  let a = e.isSprite ? this._prepareMaskSpriteMaterial : this._prepareMaskMaterial;
49
49
  t.renderObject(e, n, r, i, a, o, s, c);
50
50
  }
51
- }), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(G.renderObjectFunction), this._selectionCache.clear(), r.name = a, W.material = this._materialCopy, W.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), W.render(t), W.material = this._edgeDetectionMaterial, W.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Rt), W.material = this._separableBlurMaterial, W.name = "Outline [ Blur Half Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer1.texture, this._blurDirection.value.copy(zt), t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Rt), W.material = this._separableBlurMaterial2, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer2), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer2.texture, this._blurDirection.value.copy(zt), t.setRenderTarget(this._renderTargetEdgeBuffer2), W.render(t), W.material = this._compositeMaterial, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), W.render(t), M.restoreRendererAndSceneState(t, r, G);
51
+ }), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(G.renderObjectFunction), this._selectionCache.clear(), r.name = a, W.material = this._materialCopy, W.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), W.render(t), W.material = this._edgeDetectionMaterial, W.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Wt), W.material = this._separableBlurMaterial, W.name = "Outline [ Blur Half Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer1.texture, this._blurDirection.value.copy(Gt), t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Wt), W.material = this._separableBlurMaterial2, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer2), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer2.texture, this._blurDirection.value.copy(Gt), t.setRenderTarget(this._renderTargetEdgeBuffer2), W.render(t), W.material = this._compositeMaterial, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), W.render(t), A.restoreRendererAndSceneState(t, r, G);
52
52
  }
53
53
  setup() {
54
54
  let e = () => {
55
- let e = this._depthTextureUniform.sample(kt), t;
56
- return t = this.camera.isPerspectiveCamera ? Ze(e, this._cameraNear, this._cameraFar) : Ne(e, this._cameraNear, this._cameraFar), P(0, Ue.z.lessThanEqual(t).select(1, 0), 1);
55
+ let e = this._depthTextureUniform.sample(ht), t;
56
+ return t = this.camera.isPerspectiveCamera ? Qe(e, this._cameraNear, this._cameraFar) : Ge(e, this._cameraNear, this._cameraFar), N(0, je.z.lessThanEqual(t).select(1, 0), 1);
57
57
  };
58
58
  this._prepareMaskMaterial.colorNode = e(), this._prepareMaskMaterial.needsUpdate = !0, this._prepareMaskSpriteMaterial.colorNode = e(), this._prepareMaskSpriteMaterial.needsUpdate = !0, this._materialCopy.fragmentNode = this._maskTextureUniform, this._materialCopy.needsUpdate = !0;
59
59
  let t = V(() => {
60
- let e = Nt(this._maskTextureDownsSampleUniform), t = B(1).div(e).toVar(), n = F(1, 0, 0, 1).mul(F(t, t)), r = pt(), i = this._maskTextureDownsSampleUniform.sample(r.add(n.xy)).toVar(), a = this._maskTextureDownsSampleUniform.sample(r.sub(n.xy)).toVar(), o = this._maskTextureDownsSampleUniform.sample(r.add(n.yw)).toVar(), s = this._maskTextureDownsSampleUniform.sample(r.sub(n.yw)).toVar(), c = B(qe(i.r.sub(a.r), .5), qe(o.r.sub(s.r), .5)).length();
61
- return F(We(We(i.g, a.g), We(o.g, s.g)).oneMinus().greaterThan(.001).select(this._visibleEdgeColor, this._hiddenEdgeColor), 1).mul(c);
60
+ let e = $e(this._maskTextureDownsSampleUniform), t = M(1).div(e).toVar(), n = P(1, 0, 0, 1).mul(P(t, t)), r = Ne(), i = this._maskTextureDownsSampleUniform.sample(r.add(n.xy)).toVar(), a = this._maskTextureDownsSampleUniform.sample(r.sub(n.xy)).toVar(), o = this._maskTextureDownsSampleUniform.sample(r.add(n.yw)).toVar(), s = this._maskTextureDownsSampleUniform.sample(r.sub(n.yw)).toVar(), c = M(He(i.r.sub(a.r), .5), He(o.r.sub(s.r), .5)).length();
61
+ return P(Ht(Ht(i.g, a.g), Ht(o.g, s.g)).oneMinus().greaterThan(.001).select(this._visibleEdgeColor, this._hiddenEdgeColor), 1).mul(c);
62
62
  });
63
63
  this._edgeDetectionMaterial.fragmentNode = t(), this._edgeDetectionMaterial.needsUpdate = !0;
64
- let n = V(([e, t]) => H(.39894).mul(Oe(H(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = V(([e]) => {
65
- let t = Nt(this._maskTextureDownsSampleUniform), r = B(1).div(t).toVar(), i = pt(), a = e.div(2).toVar(), o = n(0, a).toVar(), s = this._blurColorTextureUniform.sample(i).mul(o).toVar(), c = this._blurDirection.mul(r).mul(e).div(4).toVar(), l = c.toVar();
66
- return $e({
67
- start: Ee(1),
68
- end: Ee(4),
64
+ let n = V(([e, t]) => H(.39894).mul(Fe(H(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = V(([e]) => {
65
+ let t = $e(this._maskTextureDownsSampleUniform), r = M(1).div(t).toVar(), i = Ne(), a = e.div(2).toVar(), o = n(0, a).toVar(), s = this._blurColorTextureUniform.sample(i).mul(o).toVar(), c = this._blurDirection.mul(r).mul(e).div(4).toVar(), l = c.toVar();
66
+ return lt({
67
+ start: Me(1),
68
+ end: Me(4),
69
69
  type: "int",
70
70
  condition: "<="
71
71
  }, ({ i: t }) => {
@@ -88,26 +88,26 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
88
88
  (e.isMesh || e.isSprite) && this._selectionCache.add(e);
89
89
  });
90
90
  }
91
- }, Vt = (e, t, n) => new Bt(e, t, n), Ht = class {}, Ut = class e extends Ht {
91
+ }, qt = (e, t, n) => new Kt(e, t, n), Jt = class {}, Yt = class e extends Jt {
92
92
  static {
93
93
  this.passId = "OutlineRenderPass";
94
94
  }
95
95
  constructor(t) {
96
- super(), this.passId = e.passId, this.selectedObjects = t.selectedObjects, this.edgeStrength = L(t.edgeStrength), this.edgeGlow = L(t.edgeGlow), this.edgeThickness = L(t.edgeThickness), this.visibleEdgeColor = L(new k(t.visibleEdgeColor)), this.hiddenEdgeColor = L(new k(t.hiddenEdgeColor));
96
+ super(), this.passId = e.passId, this.selectedObjects = t.selectedObjects, this.edgeStrength = j(t.edgeStrength), this.edgeGlow = j(t.edgeGlow), this.edgeThickness = j(t.edgeThickness), this.visibleEdgeColor = j(new le(t.visibleEdgeColor)), this.hiddenEdgeColor = j(new le(t.hiddenEdgeColor));
97
97
  }
98
98
  highlightObjects(e) {
99
99
  this.selectedObjects.splice(0, this.selectedObjects.length, ...e);
100
100
  }
101
101
  setOutlineColors(e, t) {
102
- this.visibleEdgeColor.value = new k(e), this.hiddenEdgeColor.value = new k(t);
102
+ this.visibleEdgeColor.value = new le(e), this.hiddenEdgeColor.value = new le(t);
103
103
  }
104
104
  assemble(e, t, n, r, i) {
105
- let { visibleEdge: a, hiddenEdge: o } = Vt(n, r, {
105
+ let { visibleEdge: a, hiddenEdge: o } = qt(n, r, {
106
106
  selectedObjects: this.selectedObjects,
107
107
  edgeThickness: this.edgeThickness,
108
108
  edgeGlow: this.edgeGlow
109
- }), s = F(a.mul(this.visibleEdgeColor).add(o.mul(this.hiddenEdgeColor)).mul(this.edgeStrength), 0);
110
- return i === "outline" ? F(0, 0, 0, 0).add(s) : t.add(s);
109
+ }), s = P(a.mul(this.visibleEdgeColor).add(o.mul(this.hiddenEdgeColor)).mul(this.edgeStrength), 0);
110
+ return i === "outline" ? P(0, 0, 0, 0).add(s) : t.add(s);
111
111
  }
112
112
  addParametersToGUI(e, n) {
113
113
  let r = e.addFolder("Outline Settings");
@@ -117,20 +117,20 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
117
117
  this.hiddenEdgeColor.value.set(e), n();
118
118
  });
119
119
  }
120
- }, Wt = class {
120
+ }, Xt = class {
121
121
  constructor(e, t) {
122
122
  this.uid = e, this.cid = e.match(/^(.*):f(\d+)$/)[1], this.name = t, this.timestamp = 0, this.cpu = 0, this.gpu = 0, this.fps = 0, this.children = [], this.parent = null;
123
123
  }
124
- }, Gt = class extends Wt {
124
+ }, Zt = class extends Xt {
125
125
  constructor(e, t, n, r) {
126
126
  let i = t.name;
127
127
  i === "" && (t.isScene ? i = "Scene" : t.isQuadMesh && (i = "QuadMesh")), super(e, i), this.scene = t, this.camera = n, this.renderTarget = r, this.isRenderStats = !0;
128
128
  }
129
- }, Kt = class extends Wt {
129
+ }, Qt = class extends Xt {
130
130
  constructor(e, t) {
131
131
  super(e, t.name), this.computeNode = t, this.isComputeStats = !0;
132
132
  }
133
- }, qt = class extends _e {
133
+ }, $t = class extends Ce {
134
134
  constructor() {
135
135
  super(), this.currentFrame = null, this.currentRender = null, this.currentNodes = null, this.lastFrame = null, this.frames = [], this.framesLib = {}, this.maxFrames = 512, this._lastFinishTime = 0, this._resolveTimestampPromise = null, this.overdraw = !1, this._overdrawMaterial = null, this.isRendererInspector = !0;
136
136
  }
@@ -153,15 +153,15 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
153
153
  break;
154
154
  }
155
155
  if (n === null) return;
156
- this._overdrawMaterial === null && (this._overdrawMaterial = new Ce({
157
- colorNode: P(.25),
156
+ this._overdrawMaterial === null && (this._overdrawMaterial = new ke({
157
+ colorNode: N(.25),
158
158
  blending: 2,
159
159
  depthTest: !0,
160
160
  depthWrite: !0,
161
161
  toneMapped: !1
162
162
  }));
163
- let { scene: r, camera: i } = n, a = M.resetRendererAndSceneState(t, r);
164
- t.toneMapping = 0, t.outputColorSpace = u, r.overrideMaterial = this._overdrawMaterial, t.render(r, i), M.restoreRendererAndSceneState(t, r, a);
163
+ let { scene: r, camera: i } = n, a = A.resetRendererAndSceneState(t, r);
164
+ t.toneMapping = 0, t.outputColorSpace = f, r.overrideMaterial = this._overdrawMaterial, t.render(r, i), A.restoreRendererAndSceneState(t, r, a);
165
165
  }
166
166
  _getFPS() {
167
167
  let e = 0, t = 0;
@@ -198,8 +198,8 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
198
198
  requestAnimationFrame(async () => {
199
199
  let t = this.getRenderer();
200
200
  if (t.backend.hasTimestamp) {
201
- await t.resolveTimestampsAsync(T.COMPUTE), await t.resolveTimestampsAsync(T.RENDER);
202
- let e = t.backend.getTimestampFrames(T.COMPUTE), n = t.backend.getTimestampFrames(T.RENDER), r = [...new Set([...e, ...n])];
201
+ await t.resolveTimestampsAsync(re.COMPUTE), await t.resolveTimestampsAsync(re.RENDER);
202
+ let e = t.backend.getTimestampFrames(re.COMPUTE), n = t.backend.getTimestampFrames(re.RENDER), r = [...new Set([...e, ...n])];
203
203
  for (let i of r) {
204
204
  let r = this.getFrameById(i);
205
205
  if (r !== null) {
@@ -245,12 +245,12 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
245
245
  }
246
246
  inspect(e) {
247
247
  let t = this.currentNodes;
248
- t === null ? i("RendererInspector: Unable to inspect node outside of frame scope. Use \"renderer.setAnimationLoop()\".") : t.push(e);
248
+ t === null ? a("RendererInspector: Unable to inspect node outside of frame scope. Use \"renderer.setAnimationLoop()\".") : t.push(e);
249
249
  }
250
250
  beginCompute(e, t) {
251
251
  let n = this.getFrame();
252
252
  if (!n) return;
253
- let r = new Kt(e, t);
253
+ let r = new Qt(e, t);
254
254
  r.timestamp = performance.now(), r.parent = this.currentCompute || this.getParent(), n.computes.push(r), this.currentRender === null ? n.children.push(r) : this.currentRender.children.push(r), this.currentCompute = r;
255
255
  }
256
256
  finishCompute() {
@@ -261,7 +261,7 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
261
261
  beginRender(e, t, n, r) {
262
262
  let i = this.getFrame();
263
263
  if (!i) return;
264
- let a = new Gt(e, t, n, r);
264
+ let a = new Zt(e, t, n, r);
265
265
  a.timestamp = performance.now(), a.parent = this.getParent(), i.renders.push(a), this.currentRender === null ? i.children.push(a) : this.currentRender.children.push(a), this.currentRender = a;
266
266
  }
267
267
  finishRender() {
@@ -269,12 +269,12 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
269
269
  let e = this.currentRender;
270
270
  e.cpu = performance.now() - e.timestamp, this.currentRender = e.parent;
271
271
  }
272
- }, Jt = class {
272
+ }, en = class {
273
273
  static init(e) {
274
274
  let t = document.createElement("style");
275
275
  t.textContent = "\n@scope (.three-inspector) {\n\n :scope {\n --profiler-background: #1e1e24f5;\n --profiler-header-background: #2a2a33aa;\n --profiler-header: #2a2a33;\n --profiler-border: #4a4a5a;\n --text-primary: #e0e0e0;\n --text-secondary: #9a9aab;\n --color-accent: #00aaff;\n --color-green: #4caf50;\n --color-yellow: #ffc107;\n --color-red: #f44336;\n --color-fps: rgb(63, 81, 181);\n --color-call: rgba(255, 185, 34, 1);\n --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n --font-mono: 'Courier New', Courier, monospace;\n }\n\n .profiler-panel, .profiler-toggle, .detached-tab-panel,\n .profiler-panel *, .profiler-toggle *, .detached-tab-panel * {\n text-transform: initial;\n line-height: normal;\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n }\n\n .profiler-toggle {\n position: fixed;\n top: 15px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 12px 6px 6px 12px;\n color: var(--text-primary);\n cursor: pointer;\n z-index: 1001;\n transition: all 0.2s ease-in-out;\n /*font-size: 14px;*/\n font-size: 15px;\n backdrop-filter: blur(8px);\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);\n display: flex;\n align-items: stretch;\n padding: 0;\n overflow: hidden;\n font-family: var(--font-family);\n }\n\n .profiler-toggle-graph {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 0;\n pointer-events: none;\n background: transparent;\n border: none;\n border-radius: inherit;\n opacity: 0.5;\n }\n\n .profiler-toggle.position-right.panel-open {\n right: auto;\n left: 15px;\n border-radius: 6px 12px 12px 6px;\n flex-direction: row-reverse;\n }\n\n .profiler-toggle.position-right.panel-open .builtin-tabs-container {\n border-right: none;\n border-left: 1px solid #262636;\n }\n\n .profiler-toggle:hover {\n border-color: var(--color-accent);\n }\n\n .profiler-toggle.panel-open .toggle-icon {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .toggle-icon {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n font-size: 20px;\n transition: background-color 0.2s;\n }\n\n .console-badge-container {\n position: absolute;\n top: 2px;\n right: 2px;\n display: flex;\n gap: 2px;\n pointer-events: none;\n }\n\n .console-badge,\n .tab-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 14px;\n height: 14px;\n padding: 0 4px;\n border-radius: 7px;\n font-size: 9px;\n font-weight: bold;\n color: #ffffff;\n line-height: 1;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n\n .tab-badge-container {\n position: absolute;\n top: 1px;\n right: 3px;\n display: flex;\n gap: 2px;\n pointer-events: none;\n }\n\n .console-badge.error,\n .tab-badge.error {\n background-color: var(--color-red);\n }\n\n .console-badge.warn,\n .tab-badge.warn {\n background-color: var(--color-yellow);\n color: #111111;\n }\n\n .profiler-toggle:hover .toggle-icon {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .profiler-toggle.panel-open:hover .toggle-icon {\n background-color: rgba(0, 170, 255, 0.3);\n }\n\n .toggle-separator {\n width: 1px;\n background-color: var(--profiler-border);\n }\n\n .toggle-text {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: baseline;\n padding: 8px 14px;\n min-width: 80px;\n justify-content: right;\n }\n\n .toggle-text .fps-label {\n font-size: 0.7em;\n margin-left: 10px;\n color: #999;\n }\n\n .builtin-tabs-container {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: stretch;\n gap: 0;\n border-right: 1px solid #262636;\n order: -1;\n }\n\n .builtin-tab-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 8px 14px;\n font-family: var(--font-family);\n font-size: 13px;\n font-weight: 600;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 32px;\n position: relative;\n }\n\n .builtin-tab-btn svg {\n width: 20px;\n height: 20px;\n stroke: currentColor;\n }\n\n .builtin-tab-btn:hover {\n background-color: rgba(255, 255, 255, 0.08);\n color: var(--color-accent);\n }\n\n .builtin-tab-btn:active {\n background-color: rgba(255, 255, 255, 0.12);\n }\n\n .builtin-tab-btn.active {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .builtin-tab-btn.active:hover {\n background-color: rgba(0, 170, 255, 0.3);\n }\n\n .profiler-mini-panel {\n position: fixed;\n top: 60px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 8px;\n color: var(--text-primary);\n z-index: 9999;\n backdrop-filter: blur(8px);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);\n font-family: var(--font-family);\n font-size: 11px;\n width: 350px;\n max-width: calc(100vw - 30px);\n min-width: 170px;\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n overflow-x: hidden;\n display: none;\n opacity: 0;\n transform: translateY(-10px) scale(0.98);\n transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), \n transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .profiler-mini-panel.position-right.panel-open {\n right: auto;\n left: 15px;\n }\n\n .profiler-mini-panel.visible {\n display: block;\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n\n /* Position toggle and mini-panel at the bottom when maximized */\n :scope:has(.profiler-panel.maximized) .profiler-toggle,\n :scope.maximized .profiler-toggle {\n top: auto !important;\n bottom: 15px !important;\n z-index: 10005 !important;\n }\n\n :scope:has(.profiler-panel.maximized) .profiler-mini-panel,\n :scope.maximized .profiler-mini-panel {\n top: auto !important;\n bottom: 60px !important;\n max-height: calc(100vh - 120px) !important;\n z-index: 10006 !important;\n }\n\n .profiler-mini-panel::-webkit-scrollbar {\n width: 6px;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.15);\n border-radius: 3px;\n transition: background 0.2s;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.25);\n }\n\n .mini-panel-content {\n padding: 0;\n font-size: 11px;\n line-height: 1.5;\n font-family: var(--font-mono);\n letter-spacing: 0.3px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .mini-panel-content .profiler-content {\n display: block !important;\n background: transparent;\n }\n\n .mini-panel-content .list-scroll-wrapper {\n max-height: calc(100vh - 120px);\n overflow-y: auto;\n overflow-x: hidden;\n width: 100%;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.1);\n border-radius: 2px;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.2);\n }\n\n .mini-panel-content .parameters {\n background: transparent;\n border: none;\n box-shadow: none;\n padding: 4px;\n }\n\n @media screen and (max-width: 340px) {\n\n .mini-panel-content .parameters {\n min-width: 0 !important;\n }\n\n .mini-panel-content .list-container.parameters .list-item-row,\n .mini-panel-content .list-container.parameters .list-header {\n grid-template-columns: minmax(0, .5fr) minmax(0, 1fr) !important;\n }\n\n }\n\n .mini-panel-content .list-container.parameters {\n padding: 2px 6px 0px 6px !important;\n }\n\n .mini-panel-content .list-header {\n display: none;\n padding: 2px 4px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n\n .mini-panel-content .list-item {\n border-bottom: 1px solid rgba(74, 74, 90, 0.2);\n transition: background-color 0.15s;\n }\n\n .mini-panel-content .list-item:last-child {\n border-bottom: none;\n }\n\n .mini-panel-content .list-item:hover {\n background-color: rgba(255, 255, 255, 0.04);\n }\n\n .mini-panel-content .list-item.actionable:hover {\n background-color: rgba(255, 255, 255, 0.06);\n cursor: pointer;\n }\n\n .info-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-secondary);\n font-size: 10px;\n font-style: italic;\n margin-left: 6px;\n cursor: help;\n position: relative;\n }\n\n .info-icon.active {\n background-color: var(--color-accent);\n color: white;\n }\n\n @media (hover: hover) {\n .info-icon:hover {\n background-color: var(--color-accent);\n color: white;\n }\n }\n\n .info-tooltip {\n position: fixed;\n transform: translate(-50%, -100%);\n background-color: rgba(30, 30, 36, 0.95);\n border: 1px solid var(--profiler-border);\n border-radius: 6px;\n padding: 10px 14px;\n color: var(--text-primary);\n font-size: 12px;\n width: max-content;\n max-width: 250px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s, visibility 0.2s;\n z-index: 999999;\n font-style: normal;\n font-family: var(--font-family);\n text-align: left;\n white-space: normal;\n }\n\n .info-tooltip h3 {\n margin: 0 0 6px 0;\n font-size: 13px;\n color: var(--color-accent);\n }\n\n .info-tooltip strong {\n font-weight: 600;\n color: white;\n }\n\n /* Style adjustments for lil-gui look */\n .mini-panel-content .item-row {\n padding: 3px 8px;\n min-height: 24px;\n }\n\n .mini-panel-content .list-item-row {\n padding: 1px 4px;\n gap: 8px;\n min-height: 21px;\n align-items: center;\n }\n\n .mini-panel-content input[type=\"checkbox\"] {\n width: 12px;\n height: 12px;\n }\n\n .mini-panel-content input[type=\"range\"] {\n height: 18px;\n }\n\n .mini-panel-content .value-number input,\n .mini-panel-content .value-slider input {\n background-color: rgba(0, 0, 0, 0.3);\n border: 1px solid rgba(74, 74, 90, 0.5);\n font-size: 10px;\n }\n\n .mini-panel-content .value-number input:focus,\n .mini-panel-content .value-slider input:focus {\n border-color: var(--color-accent);\n }\n\n .mini-panel-content .value-slider {\n gap: 6px;\n }\n\n /* Compact nested items */\n .mini-panel-content .list-item .list-item {\n margin-left: 8px;\n }\n\n .mini-panel-content .list-item .list-item .item-row,\n .mini-panel-content .list-item .list-item .list-item-row {\n padding: 2px 6px;\n min-height: 22px;\n }\n\n /* Compact collapsible headers */\n .mini-panel-content .collapsible .item-row,\n .mini-panel-content .list-item-row.collapsible {\n padding: 2px 8px;\n font-weight: 600;\n min-height: 16px;\n display: flex;\n align-items: center;\n line-height: 1;\n }\n\n .mini-panel-content .collapsible-icon {\n font-size: 10px;\n width: 14px;\n height: 14px;\n }\n\n .mini-panel-content .param-control input[type=\"range\"] {\n height: 12px;\n margin-top: 1px;\n padding-top: 5px;\n user-select: none;\n -webkit-user-select: none;\n outline: none;\n }\n\n .mini-panel-content .param-control input[type=\"range\"]::-webkit-slider-thumb {\n width: 14px;\n height: 14px;\n margin-top: -5px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .mini-panel-content .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 14px;\n height: 14px;\n user-select: none;\n -moz-user-select: none;\n }\n\n .mini-panel-content .list-children-container {\n padding-left: 0;\n }\n\n .mini-panel-content .param-control input[type=\"number\"] {\n flex-basis: 60px !important;\n }\n\n .mini-panel-content .param-control {\n align-items: center;\n }\n\n .mini-panel-content .param-control select {\n font-size: 11px;\n }\n\n .mini-panel-content .list-item-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .profiler-panel {\n position: fixed;\n z-index: 1001 !important;\n bottom: 0;\n left: 0;\n right: 0;\n height: 350px;\n background-color: var(--profiler-background);\n backdrop-filter: blur(8px);\n border-top: 2px solid var(--profiler-border);\n color: var(--text-primary);\n display: flex;\n flex-direction: column;\n z-index: 1000;\n /*box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);*/\n transform: translateY(100%);\n transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.3s ease-out, width 0.3s ease-out;\n font-family: var(--font-mono);\n }\n\n .profiler-panel.resizing,\n .profiler-panel.dragging {\n transition: none;\n }\n\n .profiler-panel.visible {\n transform: translateY(0);\n }\n\n .profiler-panel.maximized {\n height: 100vh;\n }\n\n /* Position-specific styles */\n .profiler-panel.position-top {\n bottom: auto;\n top: 0;\n border-top: none;\n border-bottom: 2px solid var(--profiler-border);\n transform: translateY(-100%);\n }\n\n .profiler-panel.position-top.visible {\n transform: translateY(0);\n }\n\n .profiler-panel.position-bottom {\n /* Default position - already defined above */\n }\n\n .profiler-panel.position-left {\n top: 0;\n bottom: 0;\n left: 0;\n right: auto;\n width: 350px;\n height: 100%;\n border-top: none;\n border-right: 2px solid var(--profiler-border);\n transform: translateX(-100%);\n }\n\n .profiler-panel.position-left.visible {\n transform: translateX(0);\n }\n\n .profiler-panel.position-right {\n top: 0;\n bottom: 0;\n left: auto;\n right: 0;\n width: 350px;\n height: 100%;\n border-top: none;\n border-left: 2px solid var(--profiler-border);\n transform: translateX(100%);\n }\n\n .profiler-panel.position-right.visible {\n transform: translateX(0);\n }\n\n .profiler-panel.position-floating {\n border: 2px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);\n transform: none !important;\n overflow: hidden;\n }\n\n .profiler-panel.position-floating.visible {\n transform: none !important;\n }\n\n .profiler-panel.position-floating .profiler-header {\n border-radius: 6px 6px 0 0;\n }\n\n .profiler-panel.position-floating .panel-resizer {\n bottom: 0;\n right: 0;\n top: auto;\n left: auto;\n width: 16px;\n height: 16px;\n cursor: nwse-resize;\n border-radius: 0 0 6px 0;\n }\n\n .profiler-panel.position-floating .panel-resizer::after {\n content: '';\n position: absolute;\n right: 2px;\n bottom: 2px;\n width: 10px;\n height: 10px;\n background: linear-gradient(135deg, transparent 0%, transparent 45%, var(--profiler-border) 45%, var(--profiler-border) 55%, transparent 55%);\n }\n\n\n .panel-resizer {\n position: absolute;\n top: -2px;\n left: 0;\n width: 100%;\n height: 5px;\n cursor: ns-resize;\n z-index: 1001;\n touch-action: none;\n }\n\n .profiler-panel.position-top .panel-resizer {\n top: auto;\n bottom: -2px;\n }\n\n .profiler-panel.position-left .panel-resizer {\n top: 0;\n left: auto;\n right: -2px;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n }\n\n .profiler-panel.position-right .panel-resizer {\n top: 0;\n left: -2px;\n right: auto;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n }\n\n .profiler-header {\n display: flex;\n background-color: var(--profiler-header-background);\n border-bottom: 1px solid var(--profiler-border);\n flex-shrink: 0;\n justify-content: space-between;\n align-items: stretch;\n\n overflow-x: auto;\n overflow-y: hidden;\n width: calc(100% - 120px);\n height: 32px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .profiler-panel.has-horizontal-scroll .profiler-header {\n height: 38px;\n }\n\n /* Adjust header width based on panel position */\n .profiler-panel.position-right .profiler-header,\n .profiler-panel.position-left .profiler-header {\n width: calc(100% - 120px);\n }\n\n .profiler-panel.position-bottom .profiler-header,\n .profiler-panel.position-top .profiler-header {\n width: calc(100% - 120px);\n }\n\n /* Adjust header width when position toggle button is hidden (mobile) */\n .profiler-panel.hide-position-toggle .profiler-header {\n width: calc(100% - 80px);\n }\n\n /* Adjust header width when maximized (floating position toggle button is hidden) */\n .profiler-panel.maximized .profiler-header {\n width: calc(100% - 80px);\n }\n\n /* ===== RULES FOR WHEN THERE ARE NO TABS ===== */\n\n /* Horizontal mode (bottom/top) without tabs */\n .profiler-panel.position-bottom.no-tabs:not(.maximized),\n .profiler-panel.position-top.no-tabs:not(.maximized) {\n height: 32px !important;\n min-height: 32px !important;\n }\n\n .profiler-panel.position-bottom.no-tabs .profiler-header,\n .profiler-panel.position-top.no-tabs .profiler-header {\n width: 100%;\n height: 32px;\n border-bottom: none;\n }\n\n .profiler-panel.position-bottom.no-tabs .profiler-content-wrapper,\n .profiler-panel.position-top.no-tabs .profiler-content-wrapper {\n display: none;\n }\n\n .profiler-panel.position-bottom.no-tabs .panel-resizer,\n .profiler-panel.position-top.no-tabs .panel-resizer {\n display: none;\n }\n\n /* Vertical mode (right/left) without tabs */\n .profiler-panel.position-right.no-tabs:not(.maximized),\n .profiler-panel.position-left.no-tabs:not(.maximized) {\n width: 40px !important;\n min-width: 40px !important;\n }\n\n /* Vertical layout for header when no tabs */\n .profiler-panel.position-right.no-tabs .profiler-header,\n .profiler-panel.position-left.no-tabs .profiler-header {\n width: 100%;\n flex-direction: column;\n height: 100%;\n border-bottom: none;\n }\n\n /* Vertical layout for controls when no tabs */\n .profiler-panel.position-right.no-tabs .profiler-controls,\n .profiler-panel.position-left.no-tabs .profiler-controls {\n position: static;\n flex-direction: column-reverse;\n justify-content: flex-end;\n width: 100%;\n height: 100%;\n border-bottom: none;\n border-left: none;\n background: transparent;\n }\n\n .profiler-panel.position-right.no-tabs .profiler-controls button,\n .profiler-panel.position-left.no-tabs .profiler-controls button {\n width: 100%;\n height: 40px;\n border-left: none;\n border-top: none;\n border-bottom: 1px solid var(--profiler-border);\n }\n\n .profiler-panel.position-right.no-tabs .profiler-content-wrapper,\n .profiler-panel.position-left.no-tabs .profiler-content-wrapper {\n display: none;\n }\n\n .profiler-panel.position-right.no-tabs .profiler-tabs,\n .profiler-panel.position-left.no-tabs .profiler-tabs {\n display: none;\n padding-left: 2px;\n }\n\n .profiler-panel.position-right.no-tabs .panel-resizer,\n .profiler-panel.position-left.no-tabs .panel-resizer {\n display: none;\n }\n\n /* Hide position toggle on mobile without tabs */\n .profiler-panel.hide-position-toggle.position-right.no-tabs:not(.maximized),\n .profiler-panel.hide-position-toggle.position-left.no-tabs:not(.maximized) {\n width: 40px !important;\n min-width: 40px !important;\n }\n\n /* Hide drag indicator on mobile devices */\n .profiler-panel.is-mobile .tab-btn.active::before {\n display: none;\n }\n\n .profiler-header::-webkit-scrollbar,\n .profiler-tabs::-webkit-scrollbar,\n .profiler-content::-webkit-scrollbar,\n .detached-tab-content::-webkit-scrollbar,\n .console-log::-webkit-scrollbar,\n .timelineTrack::-webkit-scrollbar,\n .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n }\n\n .profiler-header::-webkit-scrollbar-track,\n .profiler-tabs::-webkit-scrollbar-track,\n .profiler-content::-webkit-scrollbar-track,\n .detached-tab-content::-webkit-scrollbar-track,\n .console-log::-webkit-scrollbar-track,\n .timelineTrack::-webkit-scrollbar-track,\n .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .profiler-header::-webkit-scrollbar-thumb,\n .profiler-tabs::-webkit-scrollbar-thumb,\n .profiler-content::-webkit-scrollbar-thumb,\n .detached-tab-content::-webkit-scrollbar-thumb,\n .console-log::-webkit-scrollbar-thumb,\n .timelineTrack::-webkit-scrollbar-thumb,\n .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background-color: rgba(255, 255, 255, 0.15);\n border-radius: 2px;\n }\n\n .profiler-header::-webkit-scrollbar-thumb:hover,\n .profiler-tabs::-webkit-scrollbar-thumb:hover,\n .profiler-content::-webkit-scrollbar-thumb:hover,\n .detached-tab-content::-webkit-scrollbar-thumb:hover,\n .console-log::-webkit-scrollbar-thumb:hover,\n .timelineTrack::-webkit-scrollbar-thumb:hover,\n .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background-color: rgba(255, 255, 255, 0.3);\n }\n\n .profiler-header::-webkit-scrollbar-corner,\n .profiler-tabs::-webkit-scrollbar-corner,\n .profiler-content::-webkit-scrollbar-corner,\n .detached-tab-content::-webkit-scrollbar-corner,\n .console-log::-webkit-scrollbar-corner,\n .timelineTrack::-webkit-scrollbar-corner,\n .list-scroll-wrapper::-webkit-scrollbar-corner {\n background: transparent;\n }\n\n .profiler-header,\n .profiler-tabs,\n .profiler-content,\n .detached-tab-content,\n .console-log,\n .timelineTrack,\n .list-scroll-wrapper {\n scrollbar-width: thin;\n scrollbar-color: rgba(255, 255, 255, 0.15) transparent;\n }\n\n .profiler-panel.dragging .profiler-header {\n cursor: grabbing !important;\n }\n\n .profiler-panel.dragging {\n opacity: 0.8;\n }\n\n .profiler-tabs {\n display: flex;\n cursor: grab;\n position: relative;\n margin-left: 2px;\n }\n\n .profiler-tabs:active {\n cursor: grabbing;\n }\n\n\n .profiler-controls {\n display: flex;\n position: absolute;\n right: 0;\n top: 0;\n height: 32px;\n background: var(--profiler-header-background);\n border-bottom: 1px solid var(--profiler-border);\n }\n\n .profiler-panel.has-horizontal-scroll .profiler-controls {\n height: 38px;\n }\n\n .tab-btn {\n position: relative;\n background: transparent;\n border: none;\n /*border-right: 1px solid var(--profiler-border);*/\n color: var(--text-secondary);\n padding: 0 15px 2px 15px;\n height: 100%;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n align-items: center;\n font-family: var(--font-family);\n font-weight: 600;\n font-size: 13px;\n user-select: none;\n transition: opacity 0.2s, transform 0.2s;\n touch-action: pan-x;\n white-space: nowrap;\n }\n\n .tab-btn.active {\n border-bottom: 2px solid var(--color-accent);\n color: white;\n }\n\n .tab-btn.active::before {\n content: '';\n position: absolute;\n left: 2px;\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n height: 14px;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='14' viewBox='0 0 8 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='3' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='2' cy='7' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='2' cy='11' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='3' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='7' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='11' r='1' fill='%234a4a5a'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0.6;\n }\n\n .tab-btn.no-detach.active::before {\n display: none;\n }\n\n .floating-btn,\n .maximize-btn,\n .hide-panel-btn {\n background: transparent;\n border: none;\n border-left: 1px solid var(--profiler-border);\n color: var(--text-secondary);\n width: 40px;\n height: 100%;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n /* Disable transitions in vertical mode to avoid broken animations */\n .profiler-panel.position-right .floating-btn,\n .profiler-panel.position-right .maximize-btn,\n .profiler-panel.position-right .hide-panel-btn,\n .profiler-panel.position-left .floating-btn,\n .profiler-panel.position-left .maximize-btn,\n .profiler-panel.position-left .hide-panel-btn {\n transition: background-color 0.2s, color 0.2s;\n }\n\n .floating-btn:hover,\n .maximize-btn:hover,\n .hide-panel-btn:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-primary);\n }\n\n /* Hide maximize button when there are no tabs */\n .profiler-panel.position-right.no-tabs .maximize-btn,\n .profiler-panel.position-left.no-tabs .maximize-btn,\n .profiler-panel.position-bottom.no-tabs .maximize-btn,\n .profiler-panel.position-top.no-tabs .maximize-btn {\n display: none !important;\n }\n\n /* Hide floating button when maximized */\n .profiler-panel.maximized .floating-btn {\n display: none !important;\n }\n\n .profiler-content-wrapper {\n flex-grow: 1;\n overflow: hidden;\n position: relative;\n }\n\n .profiler-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n font-size: 13px;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s, visibility 0.2s;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .profiler-content.active {\n visibility: visible;\n opacity: 1;\n }\n\n .profiler-content {\n overflow: auto; /* make sure scrollbars can appear */\n }\n\n\n .list-item-row {\n display: grid;\n align-items: center;\n padding: 4px 8px;\n border-radius: 3px;\n transition: background-color 0.2s;\n gap: 10px;\n border-bottom: none;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .parameters .list-item-row {\n min-height: 23px;\n }\n\n .mini-panel-content .parameters .list-item-row {\n min-height: 21px;\n }\n\n .list-item-wrapper {\n margin-top: 2px;\n margin-bottom: 2px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-wrapper:has(> .list-item-row .graph-container) {\n margin-left: -1.5em;\n }\n\n .list-item-wrapper:first-child {\n /*margin-top: 0;*/\n }\n\n .list-item-wrapper:not(.header-wrapper):nth-child(odd) > .list-item-row {\n background-color: rgba(0,0,0,0.1);\n }\n\n .list-item-wrapper.header-wrapper>.list-item-row {\n color: var(--color-accent);\n background-color: rgba(0, 170, 255, 0.1);\n }\n\n .list-item-wrapper.header-wrapper>.list-item-row>.list-item-cell:first-child {\n font-weight: 600;\n }\n\n .list-item-row.collapsible,\n .list-item-row.actionable {\n cursor: pointer;\n }\n\n .list-item-row.collapsible {\n background-color: rgba(0, 170, 255, 0.15) !important;\n min-height: 23px;\n }\n\n .list-item-row.collapsible.alert,\n .list-item-row.alert {\n background-color: rgba(244, 67, 54, 0.1) !important;\n }\n\n @media (hover: hover) {\n\n .list-item-row:hover:not(.collapsible):not(.no-hover),\n .list-item-row:hover:not(.no-hover),\n .list-item-row.actionable:hover,\n .list-item-row.collapsible.actionable:hover {\n background-color: rgba(255, 255, 255, 0.05) !important;\n }\n\n .list-item-row.collapsible:hover {\n background-color: rgba(0, 170, 255, 0.25) !important;\n }\n\n }\n\n .list-item-cell {\n white-space: pre;\n display: flex;\n align-items: center;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-cell:not(:first-child) {\n justify-content: flex-end;\n font-weight: 600;\n }\n\n .list-header {\n display: grid;\n align-items: center;\n padding: 4px 8px;\n font-weight: 600;\n color: var(--text-secondary);\n padding-bottom: 6px;\n border-bottom: 1px solid var(--profiler-border);\n margin-bottom: 5px;\n gap: 10px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-wrapper.section-start {\n margin-top: 5px;\n margin-bottom: 5px;\n }\n\n .list-header .list-header-cell:not(:first-child) {\n text-align: right;\n }\n\n .list-children-container {\n padding-left: 1.5em;\n overflow: hidden;\n transition: max-height 0.1s ease-out;\n margin-top: 2px;\n }\n\n .list-children-container.closed {\n max-height: 0;\n }\n\n .item-toggler {\n display: inline-block;\n margin-right: 0.8em;\n text-align: left;\n }\n\n .list-item-row.open .item-toggler::before {\n content: '-';\n }\n\n .list-item-row:not(.open) .item-toggler::before {\n content: '+';\n }\n\n .list-item-cell .value.good {\n color: var(--color-green);\n }\n\n .list-item-cell .value.warn {\n color: var(--color-yellow);\n }\n\n .list-item-cell .value.bad {\n color: var(--color-red);\n }\n\n .list-scroll-wrapper {\n width: max-content;\n min-width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 100%;\n }\n\n .list-container.parameters .list-item-row:not(.collapsible) {\n }\n\n .graph-container {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 0;\n position: relative;\n }\n\n .graph-svg, .graph-canvas {\n width: 0;\n min-width: 100%;\n height: 80px;\n background-color: var(--profiler-header);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n display: block;\n }\n\n .graph-path {\n stroke-width: 2;\n fill-opacity: 0.4;\n }\n\n .console-buttons-group {\n display: flex;\n gap: 20px;\n }\n\n .console-filter-input {\n background-color: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 10px 2px 10px;\n font-family: var(--font-mono);\n flex-grow: 1;\n max-width: 300px;\n border-radius: 15px;\n }\n\n .console-filter-input:focus {\n outline: none;\n border-color: var(--text-secondary);\n }\n\n .console-copy-button {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: color 0.2s, background-color 0.2s;\n }\n\n .console-copy-button:hover {\n color: var(--text-primary);\n background-color: var(--profiler-hover);\n }\n\n .console-copy-button.copied {\n color: var(--color-green);\n }\n\n .console-log {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px;\n overflow-y: auto;\n flex-grow: 1;\n user-select: text;\n -webkit-user-select: text;\n }\n\n .log-message {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n padding: 3px 5px;\n border-radius: 3px;\n line-height: 1.5 !important;\n }\n\n .log-count-badge {\n display: inline-block;\n text-align: center;\n min-width: 14px;\n height: 14px;\n border-radius: 7px;\n padding: 0 3px;\n font-size: 9px;\n font-weight: bold;\n line-height: 14px;\n box-sizing: border-box;\n margin-top: 0;\n flex-shrink: 0;\n }\n\n .log-icon {\n display: inline-block;\n text-align: center;\n width: 14px;\n height: 14px;\n font-size: 11px;\n line-height: 14px;\n margin-top: 0;\n flex-shrink: 0;\n }\n\n .log-body {\n flex-grow: 1;\n white-space: pre-wrap;\n word-break: break-all;\n }\n\n .log-message.info .log-count-badge {\n background-color: rgba(255, 255, 255, 0.12);\n border: 1px solid rgba(255, 255, 255, 0.2);\n color: var(--text-secondary);\n }\n\n .log-message.warn .log-count-badge {\n background-color: rgba(255, 193, 7, 0.18);\n border: 1px solid rgba(255, 193, 7, 0.35);\n color: var(--color-yellow);\n }\n\n .log-message.error .log-count-badge {\n background-color: rgba(244, 67, 54, 0.18);\n border: 1px solid rgba(244, 67, 54, 0.35);\n color: #ff8a80;\n }\n\n .log-message.hidden {\n display: none;\n }\n\n .log-message.info {\n color: var(--text-primary);\n }\n\n .log-message.warn {\n color: var(--color-yellow);\n }\n\n .log-message.error {\n color: #f9dedc;\n background-color: rgba(244, 67, 54, 0.1);\n }\n\n .log-prefix {\n color: var(--text-secondary);\n margin-right: 8px;\n }\n\n .log-code {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 3px;\n padding: 1px 4px;\n }\n\n .thumbnail-container {\n display: flex;\n align-items: center;\n }\n\n .thumbnail-svg {\n width: 40px;\n height: 22.5px;\n flex-shrink: 0;\n margin-right: 8px;\n }\n\n .param-control {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n width: 100%;\n }\n\n .param-control input,\n .param-control select,\n .param-control button {\n background-color: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 6px;\n padding-bottom: 2px;\n font-family: var(--font-mono);\n width: 100%;\n box-sizing: border-box;\n }\n\n .param-control input:focus {\n outline: none;\n border-color: var(--color-accent);\n }\n\n .param-control select {\n padding-top: 3px;\n padding-bottom: 1px;\n }\n\n .param-control input[type=\"number\"] {\n cursor: ns-resize;\n }\n\n .param-control input[type=\"color\"] {\n padding: 2px;\n }\n\n .param-control button {\n cursor: pointer;\n transition: background-color 0.2s;\n }\n\n .param-control button:hover {\n background-color: var(--profiler-header);\n }\n\n .param-control-vector {\n display: flex;\n gap: 5px;\n }\n\n .custom-checkbox {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n gap: 8px;\n will-change: transform;\n font-size: 12px;\n }\n\n .custom-checkbox input {\n display: none;\n }\n\n .custom-checkbox .checkmark {\n width: 14px;\n height: 14px;\n border: 1px solid var(--color-accent);\n border-radius: 3px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n transition: background-color 0.2s, border-color 0.2s;\n }\n\n .custom-checkbox .checkbox-text {\n font-size: 12px;\n margin-top: 1px;\n color: inherit;\n }\n\n .custom-checkbox .checkmark::after {\n content: '';\n width: 6px;\n height: 6px;\n background-color: var(--color-accent);\n border-radius: 1px;\n display: block;\n transform: scale(0);\n transition: transform 0.2s;\n }\n\n .list-container .custom-checkbox .checkmark {\n width: 13px;\n height: 13px;\n }\n\n .list-container .custom-checkbox .checkmark::after {\n width: 7px;\n height: 7px;\n }\n\n .custom-checkbox input:checked+.checkmark {\n border-color: var(--color-accent);\n }\n\n .custom-checkbox input:checked+.checkmark::after {\n transform: scale(1);\n }\n\n .param-control input[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n outline: none;\n padding: 0px;\n padding-top: 8px;\n }\n\n .param-control input[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n background: var(--profiler-background);\n border: 1px solid var(--color-accent);\n border-radius: 3px;\n cursor: pointer;\n margin-top: -8px;\n }\n\n .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 18px;\n height: 18px;\n background: var(--profiler-background);\n border: 2px solid var(--color-accent);\n border-radius: 3px;\n cursor: pointer;\n }\n\n .param-control input[type=\"range\"]::-moz-range-track {\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n }\n\n /* Override .param-control styles for mini-panel-content */\n .mini-panel-content input,\n .mini-panel-content select,\n .mini-panel-content button {\n padding: 2px 4px;\n height: 21px;\n line-height: 1.4;\n padding-top: 4px;\n }\n\n .mini-panel-content .param-control input,\n .mini-panel-content .param-control select,\n .mini-panel-content .param-control button {\n background-color: #1e1e24c2;\n line-height: 1.0;\n }\n\n .mini-panel-content .param-control select {\n padding: 2px 2px;\n padding-top: 3px;\n }\n\n .mini-panel-content .param-control input[type=\"number\"]::-webkit-outer-spin-button,\n .mini-panel-content .param-control input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .mini-panel-content .param-control input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n .mini-panel-content .list-item-cell span {\n position: relative;\n top: 1px;\n margin-left: 2px;\n }\n\n @media screen and (max-width: 340px) {\n\n .mini-panel-content .list-item-cell:first-child {\n display: flex;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n width: 100%;\n }\n\n .mini-panel-content .list-item-cell:first-child .value {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1 1 0%;\n min-width: 0;\n }\n\n .mini-panel-content .list-item-cell:first-child .info-icon {\n flex-shrink: 0;\n }\n\n }\n\n .mini-panel-content .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n margin-bottom: 2px;\n will-change: transform;\n }\n\n .mini-panel-content .list-container.parameters .list-item-row:not(.collapsible) {\n margin-bottom: 2px;\n }\n\n .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:first-child:has(> .list-item-row:not(.collapsible)) {\n margin-top: 2px;\n }\n\n .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:last-child:has(> .list-item-row:not(.collapsible)) {\n margin-bottom: 4px;\n }\n\n @media screen and (max-width: 450px) and (orientation: portrait) {\n\n .console-filter-input {\n max-width: 100px;\n }\n\n }\n\n /* Touch device optimizations */\n @media (hover: none) and (pointer: coarse) {\n\n .panel-resizer {\n top: -10px !important;\n height: 20px !important;\n }\n\n .profiler-panel.position-top .panel-resizer {\n top: auto !important;\n bottom: -10px !important;\n height: 20px !important;\n }\n\n .profiler-panel.position-left .panel-resizer {\n right: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .profiler-panel.position-right .panel-resizer {\n left: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .detached-tab-resizer-top,\n .detached-tab-resizer-bottom {\n height: 10px !important;\n }\n\n .detached-tab-resizer-left,\n .detached-tab-resizer-right {\n width: 10px !important;\n }\n\n }\n\n .drag-preview-indicator {\n position: fixed;\n background-color: rgba(0, 170, 255, 0.2);\n border: 2px dashed var(--color-accent);\n z-index: 999;\n pointer-events: none;\n transition: all 0.2s ease-out;\n }\n\n /* Detached Tab Windows */\n .detached-tab-panel {\n position: fixed;\n width: 500px;\n height: 400px;\n background: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);\n z-index: 1002;\n display: flex;\n flex-direction: column;\n backdrop-filter: blur(10px);\n overflow: hidden;\n opacity: 1;\n visibility: visible;\n transition: opacity 0.2s, visibility 0.2s;\n font-family: var(--font-mono);\n font-size: 13px;\n }\n\n\n .detached-tab-header {\n background: var(--profiler-header-background);\n padding: 0 3px 0 10px;\n font-family: var(--font-family);\n font-size: 13px;\n color: var(--text-primary);\n font-weight: 600;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--profiler-border);\n cursor: grab;\n user-select: none;\n height: 32px;\n flex-shrink: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n touch-action: none;\n }\n\n .detached-tab-header:active {\n cursor: grabbing;\n }\n\n .detached-header-controls {\n display: flex;\n gap: 5px;\n }\n\n .detached-reattach-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n font-family: var(--font-family);\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n .detached-reattach-btn:hover {\n background: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .detached-tab-content {\n flex: 1;\n overflow: hidden;\n position: relative;\n background: var(--profiler-background);\n }\n\n\n .detached-tab-content .profiler-content {\n display: flex !important;\n flex-direction: column !important;\n height: 100%;\n visibility: visible !important;\n opacity: 1 !important;\n position: relative !important;\n }\n\n .detached-tab-content .profiler-content > * {\n font-family: var(--font-mono);\n color: var(--text-primary);\n }\n\n .detached-tab-resizer {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 20px;\n height: 20px;\n cursor: nwse-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer::after {\n content: '';\n position: absolute;\n bottom: 2px;\n right: 2px;\n width: 12px;\n height: 12px;\n border-right: 2px solid var(--profiler-border);\n border-bottom: 2px solid var(--profiler-border);\n border-bottom-right-radius: 6px;\n opacity: 0.5;\n }\n\n .detached-tab-resizer:hover::after {\n opacity: 1;\n border-color: var(--color-accent);\n }\n\n /* Edge resizers */\n .detached-tab-resizer-top {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-right {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-bottom {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-left {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n }\n\n /* Input number spin buttons - hide arrows */\n /* Chrome, Safari, Edge, Opera */\n .profiler-panel input[type=\"number\"]::-webkit-outer-spin-button,\n .profiler-panel input[type=\"number\"]::-webkit-inner-spin-button,\n .detached-tab-content input[type=\"number\"]::-webkit-outer-spin-button,\n .detached-tab-content input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n .profiler-panel input[type=\"number\"],\n .detached-tab-content input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n .panel-action-btn {\n background: transparent;\n color: var(--text-primary);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: 12px;\n transition: background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .panel-action-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .node-canvas-wrapper {\n touch-action: none;\n }\n\n .node-canvas-wrapper .node-canvas-detach-btn {\n position: absolute;\n top: 5px;\n right: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-detach-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .node-canvas-wrapper .node-canvas-fullscreen-btn {\n position: absolute;\n bottom: 5px;\n right: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-fullscreen-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .profiler-panel.maximized .node-canvas-fullscreen-btn {\n display: none;\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 32px;\n padding: 4px 6px;\n border-bottom: 1px solid var(--profiler-border);\n background: var(--profiler-header-background);\n flex-shrink: 0;\n box-sizing: border-box;\n gap: 16px;\n }\n\n .toolbar span {\n color: var(--text-secondary);\n font-size: 12px;\n font-weight: 600;\n }\n\n .toolbar .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n border-radius: 4px;\n }\n\n .viewer-content .toolbar {\n justify-content: flex-end;\n }\n\n .viewer-back-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n padding: 4px 8px;\n border-radius: 4px;\n margin-right: auto;\n transition: color 0.2s, background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .viewer-back-btn:hover {\n color: var(--text-primary);\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .select {\n background: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 16px 2px 6px;\n font-family: var(--font-mono);\n font-size: 12px;\n outline: none;\n cursor: pointer;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0e0e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right 5px center;\n background-size: 10px;\n }\n\n .select:focus {\n border-color: var(--color-accent);\n }\n\n .full-viewer-container {\n display: none;\n flex-grow: 1;\n width: 100%;\n height: 100%;\n overflow: hidden;\n position: relative;\n touch-action: none;\n }\n\n}\n", e.appendChild(t);
276
276
  }
277
- }, Yt = class {
277
+ }, tn = class {
278
278
  constructor(e = 512) {
279
279
  this.maxPoints = e, this.lines = {}, this.limit = 0, this.limitIndex = 0, this.domElement = document.createElement("canvas"), this.domElement.setAttribute("class", "graph-canvas"), this.ctx = this.domElement.getContext("2d"), this.width = 0, this.height = 0, this.devicePixelRatio = window.devicePixelRatio || 1;
280
280
  }
@@ -345,9 +345,9 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
345
345
  };
346
346
  }
347
347
  dispose() {}
348
- }, Xt = class extends D {
348
+ }, nn = class extends oe {
349
349
  constructor(e) {
350
- super(), this.inspector = e, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, this.setupShell(), this.setupResizing(), Jt.init(this.domElement), this.setupWindowResizeListener(), this.setupOrientationListener(), this.checkHeaderScroll(), this.panel.addEventListener("transitionend", (e) => {
350
+ super(), this.inspector = e, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, this.setupShell(), this.setupResizing(), en.init(this.domElement), this.setupWindowResizeListener(), this.setupOrientationListener(), this.checkHeaderScroll(), this.panel.addEventListener("transitionend", (e) => {
351
351
  e.target === this.panel && (e.propertyName === "width" || e.propertyName === "height" || e.propertyName === "transform") && this.checkHeaderScroll();
352
352
  });
353
353
  }
@@ -416,7 +416,7 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
416
416
  let n = document.createElement("button");
417
417
  n.classList.add("hide-panel-btn"), n.textContent = "-", n.onclick = () => this.togglePanel(), t.append(this.floatingBtn, this.maximizeBtn, n), e.append(this.tabsContainer, t), this.contentWrapper = document.createElement("div"), this.contentWrapper.className = "profiler-content-wrapper";
418
418
  let r = document.createElement("div");
419
- r.className = "panel-resizer", this.panel.append(r, e, this.contentWrapper), this.domElement.append(this.toggleButton, this.miniPanel, this.panel), this.panel.classList.add(`position-${this.position}`), this.position === "right" && (this.toggleButton.classList.add("position-right"), this.miniPanel.classList.add("position-right")), this.toggleGraph = new Yt(80), this.toggleGraph.addLine("fps", "#4c4c6bff"), this.toggleGraph.domElement.className = "profiler-toggle-graph", this.toggleButton.appendChild(this.toggleGraph.domElement);
419
+ r.className = "panel-resizer", this.panel.append(r, e, this.contentWrapper), this.domElement.append(this.toggleButton, this.miniPanel, this.panel), this.panel.classList.add(`position-${this.position}`), this.position === "right" && (this.toggleButton.classList.add("position-right"), this.miniPanel.classList.add("position-right")), this.toggleGraph = new tn(80), this.toggleGraph.addLine("fps", "#4c4c6bff"), this.toggleGraph.domElement.className = "profiler-toggle-graph", this.toggleButton.appendChild(this.toggleGraph.domElement);
420
420
  }
421
421
  setupResizing() {
422
422
  let e = this.panel.querySelector(".panel-resizer");
@@ -716,7 +716,7 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
716
716
  });
717
717
  });
718
718
  try {
719
- kn("layout", e);
719
+ Fn("layout", e);
720
720
  } catch (e) {
721
721
  console.warn("Failed to save profiler layout:", e);
722
722
  }
@@ -724,7 +724,7 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
724
724
  loadLayout() {
725
725
  this.isLoadingLayout = !0;
726
726
  try {
727
- let e = On("layout");
727
+ let e = Pn("layout");
728
728
  if (Object.keys(e).length === 0) return;
729
729
  if (e.detachedTabs && e.detachedTabs.length > 0) {
730
730
  let t = window.innerWidth, n = window.innerHeight;
@@ -771,7 +771,7 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
771
771
  this.updatePanelSize();
772
772
  }
773
773
  }
774
- }, Zt = class extends D {
774
+ }, rn = class extends oe {
775
775
  constructor(e, t = {}) {
776
776
  super(), this.id = e.toLowerCase().replace(/\s+/g, "-"), this.button = document.createElement("button"), this.button.className = "tab-btn", this.button.textContent = e, this.content = document.createElement("div"), this.content.className = "profiler-content", this.content.classList.add(`${this.id}-content`), this._isActive = !1, this.isVisible = !0, this.isDetached = !1, this.detachedWindow = null, this.allowDetach = t.allowDetach === void 0 ? !0 : t.allowDetach, this.builtin = t.builtin === void 0 ? !1 : t.builtin, this.icon = t.icon || null, this.builtinButton = null, this.miniContent = null, this.profiler = null, this.onVisibilityChange = null;
777
777
  }
@@ -811,7 +811,7 @@ var W = /* @__PURE__ */ new Se(), Lt = /* @__PURE__ */ new d(), Rt = /* @__PURE_
811
811
  this.builtinButton && this.builtinButton.classList.remove("active"), this.profiler && (Array.from(this.profiler.miniPanel.querySelectorAll(".mini-panel-content")).some((e) => e.style.display !== "none") || this.profiler.miniPanel.classList.remove("visible"), Array.from(this.profiler.builtinTabsContainer.querySelectorAll(".builtin-tab-btn")).some((e) => e.style.display !== "none") || (this.profiler.builtinTabsContainer.style.display = "none"));
812
812
  }
813
813
  }
814
- }, Qt = class {
814
+ }, an = class {
815
815
  constructor(...e) {
816
816
  this.headers = e, this.children = [], this.domElement = document.createElement("div"), this.domElement.className = "list-container", this.domElement.style.padding = "5px 10px 10px 10px", this.id = `list-${Math.random().toString(36).slice(2, 11)}`, this.domElement.dataset.listId = this.id, this.gridStyleElement = document.createElement("style"), this.domElement.appendChild(this.gridStyleElement);
817
817
  let t = document.createElement("div");
@@ -893,7 +893,7 @@ function q() {
893
893
  function J(e, t) {
894
894
  e && e.textContent !== t && (e.textContent = t);
895
895
  }
896
- function $t(e) {
896
+ function on(e) {
897
897
  let t = e.lastIndexOf("/");
898
898
  return t === -1 ? {
899
899
  path: "",
@@ -903,7 +903,7 @@ function $t(e) {
903
903
  name: e.substring(t + 1).trim()
904
904
  };
905
905
  }
906
- function en(e) {
906
+ function sn(e) {
907
907
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
908
908
  }
909
909
  function Y(e, t = 2) {
@@ -921,7 +921,7 @@ function Y(e, t = 2) {
921
921
  ], a = Math.floor(Math.log(e) / Math.log(n));
922
922
  return parseFloat((e / n ** +a).toFixed(r)) + " " + i[a];
923
923
  }
924
- function tn(e, t) {
924
+ function cn(e, t) {
925
925
  let n = e.querySelector(".info-icon");
926
926
  if (!n) n = document.createElement("span"), n.className = "info-icon", n.textContent = "i", e.appendChild(n);
927
927
  else {
@@ -951,16 +951,16 @@ function tn(e, t) {
951
951
  }
952
952
  //#endregion
953
953
  //#region ../../node_modules/three/examples/jsm/inspector/tabs/Performance.js
954
- var nn = class extends Zt {
954
+ var ln = class extends rn {
955
955
  constructor(e = {}) {
956
956
  super("Performance", e);
957
- let t = new Qt("Name", "CPU", "GPU", "Total");
957
+ let t = new an("Name", "CPU", "GPU", "Total");
958
958
  t.setGridStyle("minmax(200px, 2fr) 80px 80px 80px"), t.domElement.style.minWidth = "600px";
959
959
  let n = document.createElement("div");
960
960
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
961
961
  let r = document.createElement("div");
962
962
  r.className = "graph-container";
963
- let i = new Yt();
963
+ let i = new tn();
964
964
  i.addLine("fps", "var( --color-fps )"), i.addLine("cpu", "var( --color-yellow )"), i.addLine("gpu", "var( --color-green )"), r.append(i.domElement), this.graphFpsCounter = q();
965
965
  let a = new K("Graph Stats", q(), q(), this.graphFpsCounter);
966
966
  t.add(a);
@@ -1015,16 +1015,16 @@ var nn = class extends Zt {
1015
1015
  for (let e of this.notInUse.keys()) this.updateNotInUse(e);
1016
1016
  J(this.graphFpsCounter, e.fps.toFixed() + " FPS"), J(this.frameStats.data[1], t.cpu.toFixed(2)), J(this.frameStats.data[2], e.getRenderer().backend.hasTimestamp ? t.gpu.toFixed(2) : "-"), J(this.frameStats.data[3], t.total.toFixed(2)), J(this.miscellaneous.data[1], t.miscellaneous.toFixed(2)), J(this.miscellaneous.data[2], "-"), J(this.miscellaneous.data[3], t.miscellaneous.toFixed(2)), this.currentItem = null;
1017
1017
  }
1018
- }, rn = class extends Zt {
1018
+ }, un = class extends rn {
1019
1019
  constructor(e = {}) {
1020
1020
  super("Memory", e);
1021
- let t = new Qt("Name", "Count", "Size");
1021
+ let t = new an("Name", "Count", "Size");
1022
1022
  t.setGridStyle("minmax(200px, 2fr) 60px 100px"), t.domElement.style.minWidth = "300px";
1023
1023
  let n = document.createElement("div");
1024
1024
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
1025
1025
  let r = document.createElement("div");
1026
1026
  r.className = "graph-container";
1027
- let i = new Yt();
1027
+ let i = new tn();
1028
1028
  i.addLine("total", "var( --color-yellow )"), r.append(i.domElement);
1029
1029
  let a = new K("Graph Stats", "", "");
1030
1030
  t.add(a);
@@ -1043,7 +1043,7 @@ var nn = class extends Zt {
1043
1043
  let n = t.info.memory;
1044
1044
  J(this.memoryStats.data[2], Y(n.total)), J(this.attributes.data[1], n.attributes.toString()), J(this.attributes.data[2], Y(n.attributesSize)), J(this.geometries.data[1], n.geometries.toString()), J(this.indexAttributes.data[1], n.indexAttributes.toString()), J(this.indexAttributes.data[2], Y(n.indexAttributesSize)), J(this.indirectStorageAttributes.data[1], n.indirectStorageAttributes.toString()), J(this.indirectStorageAttributes.data[2], Y(n.indirectStorageAttributesSize)), J(this.programs.data[1], n.programs.toString()), J(this.programs.data[2], Y(n.programsSize)), J(this.readbackBuffers.data[1], n.readbackBuffers.toString()), J(this.readbackBuffers.data[2], Y(n.readbackBuffersSize)), J(this.renderTargets.data[1], n.renderTargets.toString()), J(this.storageAttributes.data[1], n.storageAttributes.toString()), J(this.storageAttributes.data[2], Y(n.storageAttributesSize)), J(this.textures.data[1], n.textures.toString()), J(this.textures.data[2], Y(n.texturesSize)), J(this.uniformBuffers.data[1], n.uniformBuffers.toString()), J(this.uniformBuffers.data[2], Y(n.uniformBuffersSize));
1045
1045
  }
1046
- }, an = class extends Zt {
1046
+ }, dn = class extends rn {
1047
1047
  constructor(e = {}) {
1048
1048
  super("Console", e), this.filters = {
1049
1049
  info: !0,
@@ -1152,7 +1152,7 @@ var nn = class extends Zt {
1152
1152
  }
1153
1153
  this.logContainer.scrollTop = this.logContainer.scrollHeight, this.isActive || (e === "error" ? (this.unreadErrors++, this.updateBadges()) : e === "warn" && (this.unreadWarns++, this.updateBadges()));
1154
1154
  }
1155
- }, X = class extends D {
1155
+ }, X = class extends oe {
1156
1156
  constructor() {
1157
1157
  super(), this.domElement = document.createElement("div"), this.domElement.className = "param-control", this._onChangeFunction = null, this.addEventListener("change", (e) => {
1158
1158
  requestAnimationFrame(() => {
@@ -1181,7 +1181,7 @@ var nn = class extends Zt {
1181
1181
  hide() {
1182
1182
  return this.dispatchEvent({ type: "hide" }), this;
1183
1183
  }
1184
- }, on = class extends X {
1184
+ }, fn = class extends X {
1185
1185
  constructor({ value: e = 0, step: t = .1, min: n = -Infinity, max: r = Infinity }) {
1186
1186
  super(), this.input = document.createElement("input"), this.input.type = "number", this.input.value = e, this.input.step = t, this.input.min = n, this.input.max = r, this.input.addEventListener("change", this._onChangeValue.bind(this)), this.domElement.appendChild(this.input), this.addDragHandler();
1187
1187
  }
@@ -1212,7 +1212,7 @@ var nn = class extends Zt {
1212
1212
  getValue() {
1213
1213
  return parseFloat(this.input.value);
1214
1214
  }
1215
- }, sn = class extends X {
1215
+ }, pn = class extends X {
1216
1216
  constructor({ value: e = !1 }) {
1217
1217
  super();
1218
1218
  let t = document.createElement("label");
@@ -1230,10 +1230,10 @@ var nn = class extends Zt {
1230
1230
  getValue() {
1231
1231
  return this.checkbox.checked;
1232
1232
  }
1233
- }, cn = class extends X {
1233
+ }, mn = class extends X {
1234
1234
  constructor({ value: e = 0, min: t = 0, max: n = 1, step: r = .01 }) {
1235
1235
  super(), this.slider = document.createElement("input"), this.slider.type = "range", this.slider.min = t, this.slider.max = n, this.slider.step = r;
1236
- let i = new on({
1236
+ let i = new fn({
1237
1237
  value: e,
1238
1238
  min: t,
1239
1239
  max: n,
@@ -1254,7 +1254,7 @@ var nn = class extends Zt {
1254
1254
  step(e) {
1255
1255
  return this.slider.step = e, this.numberInput.step = e, this.slider.value = parseFloat(this.numberInput.value), this;
1256
1256
  }
1257
- }, ln = class extends X {
1257
+ }, hn = class extends X {
1258
1258
  constructor({ options: e = [], value: t = "" }) {
1259
1259
  super();
1260
1260
  let n = document.createElement("select"), r = (e, r) => {
@@ -1277,7 +1277,7 @@ var nn = class extends Zt {
1277
1277
  let e = this.options;
1278
1278
  return Array.isArray(e) ? e[this.select.selectedIndex] : e[this.select.value];
1279
1279
  }
1280
- }, un = class extends X {
1280
+ }, gn = class extends X {
1281
1281
  constructor({ value: e = "#ffffff" }) {
1282
1282
  super();
1283
1283
  let t = document.createElement("input");
@@ -1297,13 +1297,13 @@ var nn = class extends Zt {
1297
1297
  let e = this._value;
1298
1298
  return typeof e == "string" && (e = parseInt(e.slice(1), 16)), e;
1299
1299
  }
1300
- }, dn = class extends X {
1300
+ }, _n = class extends X {
1301
1301
  constructor({ text: e = "Button", value: t = () => {} }) {
1302
1302
  super();
1303
1303
  let n = document.createElement("button");
1304
1304
  n.textContent = e, n.onclick = t, this.domElement.appendChild(n);
1305
1305
  }
1306
- }, fn = class extends X {
1306
+ }, vn = class extends X {
1307
1307
  constructor({ value: e = "" }) {
1308
1308
  super();
1309
1309
  let t = document.createElement("input");
@@ -1317,7 +1317,7 @@ var nn = class extends Zt {
1317
1317
  getValue() {
1318
1318
  return this.input.value;
1319
1319
  }
1320
- }, pn = class e {
1320
+ }, yn = class e {
1321
1321
  constructor(e, t) {
1322
1322
  this.parameters = e, this.paramList = new K(t), this.paramList.setCollapsible(!0), this.objects = [];
1323
1323
  }
@@ -1338,7 +1338,7 @@ var nn = class extends Zt {
1338
1338
  return typeof n[0] == "object" ? i = this.addSelect(e, t, n[0]) : r === "number" ? i = n.length >= 2 ? this.addSlider(e, t, ...n) : this.addNumber(e, t, ...n) : r === "boolean" ? i = this.addBoolean(e, t) : r === "string" ? i = this.addString(e, t) : r === "function" && (i = this.addButton(e, t, ...n)), i;
1339
1339
  }
1340
1340
  _addInfo(e, t) {
1341
- e.info = (n) => (tn(t, n), e);
1341
+ e.info = (n) => (cn(t, n), e);
1342
1342
  }
1343
1343
  _addParameter(e, t, n, r) {
1344
1344
  n.name = (e) => (r.data[0].childNodes.length > 0 && r.data[0].firstChild.nodeType === 3 ? r.data[0].firstChild.textContent = e : r.data[0].insertBefore(document.createTextNode(e), r.data[0].firstChild), n), this._addInfo(n, r.data[0]), n.listen = () => {
@@ -1358,7 +1358,7 @@ var nn = class extends Zt {
1358
1358
  }), n.addEventListener("show", () => r.show()), n.addEventListener("hide", () => r.hide());
1359
1359
  }
1360
1360
  addString(e, t) {
1361
- let n = e[t], r = new fn({ value: n });
1361
+ let n = e[t], r = new vn({ value: n });
1362
1362
  r.addEventListener("change", ({ value: n }) => {
1363
1363
  e[t] = n;
1364
1364
  });
@@ -1372,7 +1372,7 @@ var nn = class extends Zt {
1372
1372
  return this.paramList.add(n.paramList), n;
1373
1373
  }
1374
1374
  addBoolean(e, t) {
1375
- let n = e[t], r = new sn({ value: n });
1375
+ let n = e[t], r = new pn({ value: n });
1376
1376
  r.addEventListener("change", ({ value: n }) => {
1377
1377
  e[t] = n;
1378
1378
  });
@@ -1388,7 +1388,7 @@ var nn = class extends Zt {
1388
1388
  }), this._addParameter(e, t, r, a), r;
1389
1389
  }
1390
1390
  addSelect(e, t, n) {
1391
- let r = e[t], i = new ln({
1391
+ let r = e[t], i = new hn({
1392
1392
  options: n,
1393
1393
  value: r
1394
1394
  });
@@ -1401,7 +1401,7 @@ var nn = class extends Zt {
1401
1401
  return this.paramList.add(o), o.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, i, o), i;
1402
1402
  }
1403
1403
  addColor(e, t) {
1404
- let n = e[t], r = new un({ value: n });
1404
+ let n = e[t], r = new gn({ value: n });
1405
1405
  r.addEventListener("change", ({ value: n }) => {
1406
1406
  e[t] = n;
1407
1407
  });
@@ -1411,7 +1411,7 @@ var nn = class extends Zt {
1411
1411
  return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
1412
1412
  }
1413
1413
  addSlider(e, t, n = 0, r = 1, i = .01) {
1414
- let a = e[t], o = new cn({
1414
+ let a = e[t], o = new mn({
1415
1415
  value: a,
1416
1416
  min: n,
1417
1417
  max: r,
@@ -1426,7 +1426,7 @@ var nn = class extends Zt {
1426
1426
  return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
1427
1427
  }
1428
1428
  addNumber(e, t, ...n) {
1429
- let r = e[t], [i, a] = n, o = new on({
1429
+ let r = e[t], [i, a] = n, o = new fn({
1430
1430
  value: r,
1431
1431
  min: i,
1432
1432
  max: a
@@ -1440,7 +1440,7 @@ var nn = class extends Zt {
1440
1440
  return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
1441
1441
  }
1442
1442
  addButton(e, t) {
1443
- let n = e[t], r = new dn({
1443
+ let n = e[t], r = new _n({
1444
1444
  text: t,
1445
1445
  value: n
1446
1446
  });
@@ -1453,70 +1453,70 @@ var nn = class extends Zt {
1453
1453
  return t.childNodes.length > 0 && t.firstChild.nodeType === 3 ? t.firstChild.textContent = e : t.insertBefore(document.createTextNode(e), t.firstChild), r;
1454
1454
  }, this._addInfo(r, r.domElement.childNodes[0]), this._registerParameter(e, t, r, i), r;
1455
1455
  }
1456
- }, mn = class extends Zt {
1456
+ }, bn = class extends rn {
1457
1457
  constructor(e = {}) {
1458
1458
  super(e.name || "Parameters", e);
1459
- let t = new Qt("Property", "Value");
1459
+ let t = new an("Property", "Value");
1460
1460
  t.domElement.classList.add("parameters"), t.setGridStyle(".5fr 1fr"), t.domElement.style.minWidth = "300px";
1461
1461
  let n = document.createElement("div");
1462
1462
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n), this.paramList = t, this.groups = [];
1463
1463
  }
1464
1464
  createGroup(e) {
1465
- let t = new pn(this, e);
1465
+ let t = new yn(this, e);
1466
1466
  return this.paramList.add(t.paramList), this.groups.push(t), t;
1467
1467
  }
1468
- }, hn = [{
1468
+ }, xn = [{
1469
1469
  name: "TSL Graph",
1470
1470
  url: "../extensions/tsl-graph/TSLGraphEditor.js"
1471
- }], gn = xe.prototype.init;
1472
- function _n(e) {
1473
- e ? xe.prototype.init = async function() {
1471
+ }], Sn = De.prototype.init;
1472
+ function Cn(e) {
1473
+ e ? De.prototype.init = async function() {
1474
1474
  if (this.backend.isWebGLBackend !== !0) {
1475
1475
  let e = this.backend.parameters;
1476
- this.backend = new be(e);
1476
+ this.backend = new Ee(e);
1477
1477
  }
1478
- return gn.call(this);
1479
- } : xe.prototype.init = gn;
1478
+ return Sn.call(this);
1479
+ } : De.prototype.init = Sn;
1480
1480
  }
1481
1481
  var Z = null;
1482
- function vn() {
1482
+ function wn() {
1483
1483
  if (Z !== null) return Z;
1484
- let e = On("settings");
1484
+ let e = Pn("settings");
1485
1485
  return Z = {
1486
1486
  forceWebGL: e.forceWebGL === void 0 ? !1 : e.forceWebGL,
1487
1487
  captureStackTrace: e.captureStackTrace === void 0 ? !1 : e.captureStackTrace,
1488
1488
  activeExtensions: e.activeExtensions === void 0 ? {} : e.activeExtensions,
1489
1489
  storage: e.storage === void 0 ? "url" : e.storage
1490
- }, Z.forceWebGL && _n(!0), Z.captureStackTrace && (he.captureStackTrace = !0), Z;
1490
+ }, Z.forceWebGL && Cn(!0), Z.captureStackTrace && (xe.captureStackTrace = !0), Z;
1491
1491
  }
1492
- function yn() {
1493
- kn("settings", {
1492
+ function Tn() {
1493
+ Fn("settings", {
1494
1494
  forceWebGL: Z.forceWebGL,
1495
1495
  captureStackTrace: Z.captureStackTrace,
1496
1496
  activeExtensions: Z.activeExtensions,
1497
1497
  storage: Z.storage
1498
1498
  });
1499
1499
  }
1500
- vn();
1501
- var bn = class extends mn {
1500
+ wn();
1501
+ var En = class extends bn {
1502
1502
  constructor() {
1503
1503
  super({ name: "Settings" }), this.extensions = {};
1504
- let e = vn(), t = this.createGroup("Renderer");
1504
+ let e = wn(), t = this.createGroup("Renderer");
1505
1505
  t.add(e, "forceWebGL").name("Force WebGL").onChange((e) => {
1506
- _n(e), yn(), location.reload();
1506
+ Cn(e), Tn(), location.reload();
1507
1507
  }), t.add(e, "captureStackTrace").name("Capture Stack Trace").onChange((e) => {
1508
- he.captureStackTrace = e, yn(), location.reload();
1508
+ xe.captureStackTrace = e, Tn(), location.reload();
1509
1509
  }), this.createGroup("Render Modes").add({ overdraw: !1 }, "overdraw").name("Overdraw").onChange((e) => {
1510
1510
  this.inspector.overdraw = e;
1511
1511
  }).info("Shows how many times each pixel is shaded.");
1512
1512
  }
1513
1513
  init() {
1514
- let e = this.createGroup("Extensions"), t = this.createGroup("Storage"), n = vn();
1514
+ let e = this.createGroup("Extensions"), t = this.createGroup("Storage"), n = wn();
1515
1515
  t.add(n, "storage", {
1516
1516
  "URL Session": "url",
1517
1517
  "Keep across Origin": "origin"
1518
1518
  }).name("Save Settings").onChange(() => {
1519
- yn();
1519
+ Tn();
1520
1520
  }).info("\nDefines how the **Inspector** preferences and states are stored in the browser.\n\n**URL Session**\nSaves state based on the exact URL. It will reset the settings whenever the URL changes.\n\n**Keep across Origin**\nShares the same state across any page within the current origin."), t.add({ clear: () => {
1521
1521
  localStorage.removeItem("threejs-inspector"), location.reload();
1522
1522
  } }, "clear").name("Clear Settings"), this._getExtensions().then((t) => {
@@ -1524,7 +1524,7 @@ var bn = class extends mn {
1524
1524
  this.setActiveExtension(n.name, e), e ? Z.activeExtensions[n.name] = {
1525
1525
  name: n.name,
1526
1526
  url: n.url
1527
- } : delete Z.activeExtensions[n.name], this._updateExtensionUI(n), yn();
1527
+ } : delete Z.activeExtensions[n.name], this._updateExtensionUI(n), Tn();
1528
1528
  }), Z.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
1529
1529
  });
1530
1530
  }
@@ -1552,17 +1552,17 @@ var bn = class extends mn {
1552
1552
  });
1553
1553
  }
1554
1554
  async _getExtensions() {
1555
- return hn;
1555
+ return xn;
1556
1556
  }
1557
- }, xn = /* @__PURE__ */ new d(), Sn = /* @__PURE__ */ V(([e, t, n]) => {
1558
- let r = L(0);
1559
- Tt(() => {
1557
+ }, Dn = /* @__PURE__ */ new p(), On = /* @__PURE__ */ V(([e, t, n]) => {
1558
+ let r = j(0);
1559
+ Mt(() => {
1560
1560
  let { width: e, height: n } = t.value;
1561
1561
  r.value = e / n;
1562
1562
  });
1563
- let i = n.div(r), a = e.sub(.5), o = B(a.x.mul(i), a.y).add(.5), s = B(a.x, a.y.div(i)).add(.5), c = n.greaterThan(r).select(o, s);
1564
- return P(c, ct(0, c.x).mul(ct(c.x, 1)).mul(ct(0, c.y)).mul(ct(c.y, 1)));
1565
- }), Cn = class extends Zt {
1563
+ let i = n.div(r), a = e.sub(.5), o = M(a.x.mul(i), a.y).add(.5), s = M(a.x, a.y.div(i)).add(.5), c = n.greaterThan(r).select(o, s);
1564
+ return N(c, ct(0, c.x).mul(ct(c.x, 1)).mul(ct(0, c.y)).mul(ct(c.y, 1)));
1565
+ }), kn = class extends rn {
1566
1566
  constructor(e = {}) {
1567
1567
  super("Viewer", e), this.content.style.overflow = "hidden", this.maximizedByFullscreenButton = !1;
1568
1568
  let t = document.createElement("div");
@@ -1575,7 +1575,7 @@ var bn = class extends mn {
1575
1575
  i.className = "select", i.style.width = "200px";
1576
1576
  let a = document.createElement("option");
1577
1577
  a.value = "list", a.textContent = "List", i.appendChild(a), t.appendChild(i), this.content.appendChild(t);
1578
- let o = new Qt("Viewer", "Name");
1578
+ let o = new an("Viewer", "Name");
1579
1579
  o.setGridStyle("150px minmax(200px, 2fr)"), o.domElement.style.minWidth = "400px";
1580
1580
  let s = document.createElement("div");
1581
1581
  s.className = "list-scroll-wrapper", s.style.flexGrow = "1", s.style.overflowY = "auto", s.style.minHeight = "0", s.appendChild(o.domElement), this.content.appendChild(s);
@@ -1691,16 +1691,16 @@ var bn = class extends mn {
1691
1691
  getCanvasDataByNode(e, t) {
1692
1692
  let n = this.canvasNodes.get(t);
1693
1693
  if (n === void 0) {
1694
- let r = new we(document.createElement("canvas"));
1694
+ let r = new Ae(document.createElement("canvas"));
1695
1695
  r.setPixelRatio(window.devicePixelRatio), r.setSize(140, 140);
1696
- let i = t.id, { path: a, name: o } = $t(en(t.getName() || "(unnamed)")), s = L(1), c = H(1), l = F(P(t.context({ getUV: (e) => {
1697
- let t = Sn(kt, e, s), n = t.xy;
1696
+ let i = t.id, { path: a, name: o } = on(sn(t.getName() || "(unnamed)")), s = j(1), c = H(1), l = P(N(t.context({ getUV: (e) => {
1697
+ let t = On(ht, e, s), n = t.xy;
1698
1698
  return c.assign(t.z), n;
1699
1699
  } })), 1).mul(c);
1700
- l = yt(l, 0, e.outputColorSpace), l = l.context({ inspector: !0 });
1701
- let u = new j();
1700
+ l = Nt(l, 0, e.outputColorSpace), l = l.context({ inspector: !0 });
1701
+ let u = new k();
1702
1702
  u.outputNode = l;
1703
- let d = new Se(u);
1703
+ let d = new Oe(u);
1704
1704
  d.name = "Viewer - " + o, n = {
1705
1705
  id: i,
1706
1706
  name: o,
@@ -1740,7 +1740,7 @@ var bn = class extends mn {
1740
1740
  }
1741
1741
  let t = !1;
1742
1742
  if (this.pendingRestoreView) {
1743
- let e = On("viewerLastView");
1743
+ let e = Pn("viewerLastView");
1744
1744
  if (e !== "list") {
1745
1745
  for (let n = 0; n < this.select.options.length; n++) if (this.select.options[n].textContent === e) {
1746
1746
  this.select.selectedIndex = n;
@@ -1778,7 +1778,7 @@ var bn = class extends mn {
1778
1778
  let e = this.getFolder(i);
1779
1779
  o[i] === void 0 && (o[i] = 0), (e.parent === null || n.parent !== e || e.children.indexOf(n) !== o[i]) && e.add(n), o[i]++;
1780
1780
  } else n.parent || this.nodes.add(n);
1781
- let a = [], s = r.getDrawingBufferSize(xn);
1781
+ let a = [], s = r.getDrawingBufferSize(Dn);
1782
1782
  e.node.traverse((e) => {
1783
1783
  if (e.isRTTNode && e.autoResize === !0) {
1784
1784
  let t = e.width, n = e.height;
@@ -1789,8 +1789,8 @@ var bn = class extends mn {
1789
1789
  });
1790
1790
  }
1791
1791
  });
1792
- let c = M.resetRendererState(t);
1793
- t.toneMapping = 0, t.outputColorSpace = u, t.setCanvasTarget(e.canvasTarget), e.canvasAspect && (e.canvasAspect.value = e.canvasTarget.domElement.width / e.canvasTarget.domElement.height), e.quad.render(t), t.setCanvasTarget(r), M.restoreRendererState(t, c);
1792
+ let c = A.resetRendererState(t);
1793
+ t.toneMapping = 0, t.outputColorSpace = f, t.setCanvasTarget(e.canvasTarget), e.canvasAspect && (e.canvasAspect.value = e.canvasTarget.domElement.width / e.canvasTarget.domElement.height), e.quad.render(t), t.setCanvasTarget(r), A.restoreRendererState(t, c);
1794
1794
  for (let e of a) e.node.width = e.oldWidth, e.node.height = e.oldHeight;
1795
1795
  }
1796
1796
  this.currentDataList = r;
@@ -1799,15 +1799,15 @@ var bn = class extends mn {
1799
1799
  super.setActive(e);
1800
1800
  }
1801
1801
  saveLastView() {
1802
- if (this.select.value === "list") kn("viewerLastView", "list");
1802
+ if (this.select.value === "list") Fn("viewerLastView", "list");
1803
1803
  else {
1804
1804
  let e = this.select.options[this.select.selectedIndex];
1805
- e && kn("viewerLastView", e.textContent);
1805
+ e && Fn("viewerLastView", e.textContent);
1806
1806
  }
1807
1807
  }
1808
- }, wn = 500, Tn = 60, En = class extends Zt {
1808
+ }, An = 500, jn = 60, Mn = class extends rn {
1809
1809
  constructor(e = {}) {
1810
- super("Timeline", e), this.content.style.overflow = "hidden", this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.callBlocks = /* @__PURE__ */ new WeakMap(), this.fallbackBlocks = [], this.originalBackend = null, this.originalMethods = /* @__PURE__ */ new Map(), this.renderer = null, this.graph = new Yt(wn), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )"), this.buildHeader(), this.buildUI(), window.addEventListener("resize", () => {
1810
+ super("Timeline", e), this.content.style.overflow = "hidden", this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.callBlocks = /* @__PURE__ */ new WeakMap(), this.fallbackBlocks = [], this.originalBackend = null, this.originalMethods = /* @__PURE__ */ new Map(), this.renderer = null, this.graph = new tn(An), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )"), this.buildHeader(), this.buildUI(), window.addEventListener("resize", () => {
1811
1811
  this.isActive && !this.isRecording && this.frames.length > 0 && this.renderSlider();
1812
1812
  });
1813
1813
  }
@@ -1830,8 +1830,8 @@ var bn = class extends mn {
1830
1830
  r.value = "counts", r.textContent = "Count", this.viewModeSelect.appendChild(r), this.viewModeSelect.value = this.isHierarchicalView ? "hierarchy" : "counts", this.viewModeSelect.addEventListener("change", () => {
1831
1831
  this.isHierarchicalView = this.viewModeSelect.value === "hierarchy", this.selectedFrameIndex !== void 0 && this.selectedFrameIndex !== -1 && this.selectFrame(this.selectedFrameIndex);
1832
1832
  }), this.recordRefreshButton = document.createElement("button"), this.recordRefreshButton.className = "console-copy-button", this.recordRefreshButton.title = "Refresh & Record", this.recordRefreshButton.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\"></path><path d=\"M21 3v5h-5\"></path><circle cx=\"12\" cy=\"12\" r=\"3\" fill=\"currentColor\"></circle></svg>", this.recordRefreshButton.style.padding = "0 10px", this.recordRefreshButton.style.lineHeight = "24px", this.recordRefreshButton.style.display = "flex", this.recordRefreshButton.style.alignItems = "center", this.recordRefreshButton.addEventListener("click", () => {
1833
- let e = On("timeline");
1834
- e.recording = !0, kn("timeline", e), window.location.reload();
1833
+ let e = Pn("timeline");
1834
+ e.recording = !0, Fn("timeline", e), window.location.reload();
1835
1835
  }), this.exportButton = document.createElement("button"), this.exportButton.className = "console-copy-button", this.exportButton.title = "Export", this.exportButton.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path><polyline points=\"7 10 12 15 17 10\"></polyline><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line></svg>", this.exportButton.style.padding = "0 10px", this.exportButton.style.lineHeight = "24px", this.exportButton.style.display = "flex", this.exportButton.style.alignItems = "center", this.exportButton.addEventListener("click", () => this.exportData());
1836
1836
  let i = document.createElement("div");
1837
1837
  i.className = "console-buttons-group", i.appendChild(this.recordButton), i.appendChild(this.recordRefreshButton), i.appendChild(this.exportButton), i.appendChild(t);
@@ -1913,8 +1913,8 @@ var bn = class extends mn {
1913
1913
  }
1914
1914
  setRenderer(e) {
1915
1915
  this.renderer = e;
1916
- let t = On("timeline");
1917
- t.recording && (t.recording = !1, kn("timeline", t), this.toggleRecording());
1916
+ let t = Pn("timeline");
1917
+ t.recording && (t.recording = !1, Fn("timeline", t), this.toggleRecording());
1918
1918
  }
1919
1919
  toggleRecording() {
1920
1920
  if (!this.renderer) {
@@ -1944,7 +1944,7 @@ var bn = class extends mn {
1944
1944
  for (let t = 0; t < n.length; t++) n[t] *= e;
1945
1945
  }
1946
1946
  }
1947
- let t = this.baseTriangles > 0 ? e / this.baseTriangles * Tn : 0;
1947
+ let t = this.baseTriangles > 0 ? e / this.baseTriangles * jn : 0;
1948
1948
  this.graph.addPoint("calls", this.currentFrame.calls.length), this.graph.addPoint("fps", this.currentFrame.fps), this.graph.addPoint("triangles", t), this.graph.update();
1949
1949
  }
1950
1950
  this.currentFrame = {
@@ -1952,7 +1952,7 @@ var bn = class extends mn {
1952
1952
  calls: [],
1953
1953
  fps: 0,
1954
1954
  triangles: 0
1955
- }, this.frames.push(this.currentFrame), this.frames.length > wn && this.frames.shift();
1955
+ }, this.frames.push(this.currentFrame), this.frames.length > An && this.frames.shift();
1956
1956
  }
1957
1957
  let a = {
1958
1958
  method: n,
@@ -1978,48 +1978,48 @@ var bn = class extends mn {
1978
1978
  r.href = n, r.download = "threejs-timeline.json", r.click(), URL.revokeObjectURL(n);
1979
1979
  }
1980
1980
  getRenderTargetDetails(t) {
1981
- let r = t.textures, i = [], l = (e) => {
1981
+ let n = t.textures, i = [], a = (e) => {
1982
1982
  switch (e.type) {
1983
- case v:
1983
+ case ee:
1984
1984
  case E: return "8";
1985
- case s:
1986
- case oe:
1985
+ case c:
1986
+ case de:
1987
+ case w:
1988
+ case fe:
1989
+ case y: return "16";
1990
+ case m:
1991
+ case ce:
1992
+ case b:
1987
1993
  case x:
1988
- case se:
1989
- case g: return "16";
1990
- case f:
1991
- case ie:
1992
- case _:
1993
- case y:
1994
- case h:
1995
- case b: return "32";
1994
+ case v:
1995
+ case S: return "32";
1996
1996
  default: return "?";
1997
1997
  }
1998
1998
  }, u = (t) => {
1999
1999
  switch (t.format) {
2000
- case re: return "a";
2001
- case w:
2000
+ case se: return "a";
2001
+ case ne:
2002
2002
  case e: return "r";
2003
- case n:
2004
- case ae: return "rg";
2005
- case te:
2006
- case ee: return "rgb";
2007
- case ne: return "depth";
2008
- case o: return "depth-stencil";
2009
- case a:
2010
- case c:
2003
+ case r:
2004
+ case ue: return "rg";
2005
+ case ie:
2006
+ case C: return "rgb";
2007
+ case ae: return "depth";
2008
+ case s: return "depth-stencil";
2009
+ case o:
2010
+ case l:
2011
2011
  default: return "rgba";
2012
2012
  }
2013
2013
  };
2014
- for (let e = 0; e < r.length; e++) {
2015
- let t = r[e], n = l(t), a = u(t), o = `[${e}]`;
2016
- t.name && !(t.isDepthTexture && t.name === "depth") && (o += ` ${t.name}`), o += ` ${a} ${n} bpc`, i.push(o);
2014
+ for (let e = 0; e < n.length; e++) {
2015
+ let t = n[e], r = a(t), o = u(t), s = `[${e}]`;
2016
+ t.name && !(t.isDepthTexture && t.name === "depth") && (s += ` ${t.name}`), s += ` ${o} ${r} bpc`, i.push(s);
2017
2017
  }
2018
2018
  let d = {
2019
2019
  target: t.name || "RenderTarget",
2020
- [`attachments(${r.length})`]: "\n" + i.join("\n")
2020
+ [`attachments(${n.length})`]: "\n" + i.join("\n")
2021
2021
  };
2022
- return t.depthTexture && (d.depth = `${l(t.depthTexture)} bpc`), d;
2022
+ return t.depthTexture && (d.depth = `${a(t.depthTexture)} bpc`), d;
2023
2023
  }
2024
2024
  getCallDetail(e, t) {
2025
2025
  switch (e) {
@@ -2218,7 +2218,7 @@ var bn = class extends mn {
2218
2218
  r > t && (t = r);
2219
2219
  }
2220
2220
  for (let n = 0; n < e.length; n++) {
2221
- let r = e[n].triangles || 0, i = t > 0 ? r / t * Tn : 0;
2221
+ let r = e[n].triangles || 0, i = t > 0 ? r / t * jn : 0;
2222
2222
  this.graph.addPoint("calls", e[n].calls.length), this.graph.addPoint("fps", e[n].fps || 0), this.graph.addPoint("triangles", i);
2223
2223
  }
2224
2224
  this.graph.update(), this.playhead.style.display = "block";
@@ -2287,7 +2287,7 @@ var bn = class extends mn {
2287
2287
  if (f.textContent = o.method, u.titleSpan.appendChild(f), o.details) {
2288
2288
  let e = `### ${o.method}\n`;
2289
2289
  for (let t in o.details) o.details[t] !== void 0 && (e += `**${t}**: ${o.details[t]}\n`);
2290
- let t = tn(u.titleSpan, e);
2290
+ let t = cn(u.titleSpan, e);
2291
2291
  t.style.flexShrink = "0", t.style.marginLeft = "6px", t.style.display = "inline-flex", t.style.verticalAlign = "middle";
2292
2292
  }
2293
2293
  let p = document.createElement("span"), m = o.formatedDetails ? o.formatedDetails : "";
@@ -2326,27 +2326,27 @@ var bn = class extends mn {
2326
2326
  getColorForMethod(e) {
2327
2327
  return e.startsWith("begin") ? "var(--color-green)" : e.startsWith("finish") || e.startsWith("destroy") ? "var(--color-red)" : e.startsWith("draw") || e.startsWith("compute") || e.startsWith("create") || e.startsWith("generate") ? "var(--color-yellow)" : "var(--text-secondary)";
2328
2328
  }
2329
- }, Dn = class extends qt {
2329
+ }, Nn = class extends $t {
2330
2330
  constructor() {
2331
2331
  super();
2332
- let e = new Xt(this);
2332
+ let e = new nn(this);
2333
2333
  e.addEventListener("resize", (e) => this.dispatchEvent(e));
2334
- let t = new mn({
2334
+ let t = new bn({
2335
2335
  builtin: !0,
2336
2336
  icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 6l8 0\" /><path d=\"M16 6l4 0\" /><path d=\"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 12l2 0\" /><path d=\"M10 12l10 0\" /><path d=\"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 18l11 0\" /><path d=\"M19 18l1 0\" /></svg>"
2337
2337
  });
2338
2338
  t.hide(), e.addTab(t);
2339
- let n = new Cn();
2339
+ let n = new kn();
2340
2340
  n.hide(), e.addTab(n);
2341
- let r = new nn();
2341
+ let r = new ln();
2342
2342
  e.addTab(r);
2343
- let i = new rn();
2343
+ let i = new un();
2344
2344
  e.addTab(i);
2345
- let a = new En();
2345
+ let a = new Mn();
2346
2346
  e.addTab(a);
2347
- let o = new an();
2347
+ let o = new dn();
2348
2348
  e.addTab(o);
2349
- let s = new bn();
2349
+ let s = new En();
2350
2350
  e.addTab(s), e.loadLayout(), e.activeTabId || e.setActiveTab(r.id), this.statsData = /* @__PURE__ */ new Map(), this.profiler = e, this.performance = r, this.memory = i, this.console = o, this.parameters = t, this.viewer = n, this.timeline = a, this.settings = s, this.once = {}, this.extensionsData = /* @__PURE__ */ new WeakMap(), this.displayCycle = {
2351
2351
  text: {
2352
2352
  needsUpdate: !1,
@@ -2426,7 +2426,7 @@ var bn = class extends mn {
2426
2426
  }
2427
2427
  }
2428
2428
  setRenderer(e) {
2429
- return super.setRenderer(e), e !== null && (p(this.resolveConsole.bind(this)), this.isAvailable && (e.init().then(() => {
2429
+ return super.setRenderer(e), e !== null && (h(this.resolveConsole.bind(this)), this.isAvailable && (e.init().then(() => {
2430
2430
  e.backend.trackTimestamp = !0, e.hasFeature("timestamp-query") !== !0 && this.console.addMessage("error", "THREE.Inspector: GPU Timestamp Queries not available.");
2431
2431
  }), this.timeline.setRenderer(e))), this;
2432
2432
  }
@@ -2480,41 +2480,41 @@ var bn = class extends mn {
2480
2480
  e.time += this.nodeFrame.deltaTime, e.time >= e.duration && (e.needsUpdate = !0, e.time = 0);
2481
2481
  }
2482
2482
  };
2483
- function On(e) {
2483
+ function Pn(e) {
2484
2484
  let t = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
2485
2485
  return t.version !== "185" || t.settings && t.settings.storage === "url" && t.settings.url !== location.href ? (localStorage.removeItem("threejs-inspector"), {}) : t[e] || {};
2486
2486
  }
2487
- function kn(e, t) {
2487
+ function Fn(e, t) {
2488
2488
  let n = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
2489
2489
  t === null ? delete n[e] : n[e] = t, n.settings = n.settings || {}, n.settings.url = n.settings.url || location.href, n.settings.storage = n.settings.storage || "url", n.version = "185", localStorage.setItem("threejs-inspector", JSON.stringify(n));
2490
2490
  }
2491
2491
  //#endregion
2492
2492
  //#region ../../node_modules/three/examples/jsm/tsl/display/SSGINode.js
2493
- var An = /* @__PURE__ */ new Se(), jn = /* @__PURE__ */ new d(), Mn = [
2493
+ var In = /* @__PURE__ */ new Oe(), Ln = /* @__PURE__ */ new p(), Rn = [
2494
2494
  60,
2495
2495
  300,
2496
2496
  180,
2497
2497
  240,
2498
2498
  120,
2499
2499
  0
2500
- ], Nn = [
2500
+ ], zn = [
2501
2501
  0,
2502
2502
  .5,
2503
2503
  .25,
2504
2504
  .75
2505
- ], Pn, Fn = class extends ge {
2505
+ ], Bn, Vn = class extends Se {
2506
2506
  static get type() {
2507
2507
  return "SSGINode";
2508
2508
  }
2509
2509
  constructor(e, t, n, r) {
2510
- super("vec4"), this.beautyNode = e, this.depthNode = t, this.normalNode = n, this.updateBeforeType = vt.FRAME, this.sliceCount = L(1, "uint"), this.stepCount = L(12, "uint"), this.aoIntensity = L(1, "float"), this.giIntensity = L(10, "float"), this.radius = L(12, "float"), this.useScreenSpaceSampling = L(!0, "bool"), this.expFactor = L(2, "float"), this.thickness = L(1, "float"), this.useLinearThickness = L(!1, "bool"), this.backfaceLighting = L(0, "float"), this.useTemporalFiltering = !0, this._resolution = L(new d()), this._halfProjScale = L(1), this._temporalDirection = L(0), this._temporalOffset = L(0), this._cameraProjectionMatrix = L(r.projectionMatrix), this._cameraProjectionMatrixInverse = L(r.projectionMatrixInverse), this._cameraNear = dt("near", "float", r), this._cameraFar = dt("far", "float", r), this._camera = r, this._ssgiRenderTarget = new C(1, 1, {
2510
+ super("vec4"), this.beautyNode = e, this.depthNode = t, this.normalNode = n, this.updateBeforeType = Et.FRAME, this.sliceCount = j(1, "uint"), this.stepCount = j(12, "uint"), this.aoIntensity = j(1, "float"), this.giIntensity = j(10, "float"), this.radius = j(12, "float"), this.useScreenSpaceSampling = j(!0, "bool"), this.expFactor = j(2, "float"), this.thickness = j(1, "float"), this.useLinearThickness = j(!1, "bool"), this.backfaceLighting = j(0, "float"), this.useTemporalFiltering = !0, this._resolution = j(new p()), this._halfProjScale = j(1), this._temporalDirection = j(0), this._temporalOffset = j(0), this._cameraProjectionMatrix = j(r.projectionMatrix), this._cameraProjectionMatrixInverse = j(r.projectionMatrixInverse), this._cameraNear = ut("near", "float", r), this._cameraFar = ut("far", "float", r), this._camera = r, this._ssgiRenderTarget = new T(1, 1, {
2511
2511
  depthBuffer: !1,
2512
2512
  count: 2
2513
2513
  });
2514
2514
  let i = this._ssgiRenderTarget.textures[0];
2515
- i.name = "SSGI.AO", i.type = E, i.format = w;
2515
+ i.name = "SSGI.AO", i.type = E, i.format = ne;
2516
2516
  let a = this._ssgiRenderTarget.textures[1];
2517
- a.name = "SSGI.GI", a.type = b, a.format = te, this._material = new j(), this._material.name = "SSGI", this._aoNode = Ye(this, this._ssgiRenderTarget.textures[0]), this._giNode = Ye(this, this._ssgiRenderTarget.textures[1]);
2517
+ a.name = "SSGI.GI", a.type = S, a.format = ie, this._material = new k(), this._material.name = "SSGI", this._aoNode = ot(this, this._ssgiRenderTarget.textures[0]), this._giNode = ot(this, this._ssgiRenderTarget.textures[1]);
2518
2518
  }
2519
2519
  getAONode() {
2520
2520
  return this._aoNode;
@@ -2523,25 +2523,25 @@ var An = /* @__PURE__ */ new Se(), jn = /* @__PURE__ */ new d(), Mn = [
2523
2523
  return this._giNode;
2524
2524
  }
2525
2525
  setSize(e, t) {
2526
- this._resolution.value.set(e, t), this._ssgiRenderTarget.setSize(e, t), this._halfProjScale.value = t / (Math.tan(this._camera.fov * S.DEG2RAD * .5) * 2) * .5;
2526
+ this._resolution.value.set(e, t), this._ssgiRenderTarget.setSize(e, t), this._halfProjScale.value = t / (Math.tan(this._camera.fov * te.DEG2RAD * .5) * 2) * .5;
2527
2527
  }
2528
2528
  updateBefore(e) {
2529
2529
  let { renderer: t } = e;
2530
- Pn = M.resetRendererState(t, Pn);
2531
- let n = t.getDrawingBufferSize(jn);
2530
+ Bn = A.resetRendererState(t, Bn);
2531
+ let n = t.getDrawingBufferSize(Ln);
2532
2532
  if (this.setSize(n.width, n.height), this.useTemporalFiltering === !0) {
2533
2533
  let t = e.frameId;
2534
- this._temporalDirection.value = Mn[t % 6] / 360, this._temporalOffset.value = Nn[t % 4];
2534
+ this._temporalDirection.value = Rn[t % 6] / 360, this._temporalOffset.value = zn[t % 4];
2535
2535
  } else this._temporalDirection.value = 1, this._temporalOffset.value = 1;
2536
- An.material = this._material, An.name = "SSGI", t.setClearColor(16777215, 1), t.setRenderTarget(this._ssgiRenderTarget), An.render(t), M.restoreRendererState(t, Pn);
2536
+ In.material = this._material, In.name = "SSGI", t.setClearColor(16777215, 1), t.setRenderTarget(this._ssgiRenderTarget), In.render(t), A.restoreRendererState(t, Bn);
2537
2537
  }
2538
2538
  setup(e) {
2539
2539
  let t = e.renderer;
2540
2540
  t.backend.isWebGPUBackend === !0 && t.hasFeature("rg11b10ufloat-renderable") === !1 && console.error("THREE.SSGINode: The device does not support the \"rg11b10ufloat-renderable\" feature which is required for SSGI.");
2541
- let n = pt(), r = U(32), i = U(0), a = (t) => {
2541
+ let n = Ne(), r = L(32), i = L(0), a = (t) => {
2542
2542
  let n = this.depthNode.sample(t).r;
2543
- return e.renderer.logarithmicDepthBuffer === !0 ? Fe(ze(n, this._cameraNear, this._cameraFar), this._cameraNear, this._cameraFar) : n;
2544
- }, o = (e) => this.normalNode === null ? ke(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), s = (e) => this.beautyNode.sample(e), c = V(([e]) => H(.25).mul(Ft(e.y, e.x).bitAnd(3))).setLayout({
2543
+ return e.renderer.logarithmicDepthBuffer === !0 ? Ke(Je(n, this._cameraNear, this._cameraFar), this._cameraNear, this._cameraFar) : n;
2544
+ }, o = (e) => this.normalNode === null ? Ie(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), s = (e) => this.beautyNode.sample(e), c = V(([e]) => H(.25).mul(ft(e.y, e.x).bitAnd(3))).setLayout({
2545
2545
  name: "spatialOffsets",
2546
2546
  type: "float",
2547
2547
  inputs: [{
@@ -2549,8 +2549,8 @@ var An = /* @__PURE__ */ new Se(), jn = /* @__PURE__ */ new d(), Mn = [
2549
2549
  type: "vec2"
2550
2550
  }]
2551
2551
  }), l = V(([e]) => {
2552
- let t = mt(e).mul(H(-.156583)).add(Ct);
2553
- return t.mulAssign(ut(mt(e).oneMinus())), B(e.x.greaterThanEqual(0).select(t.x, tt.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, tt.sub(t.y)));
2552
+ let t = B(e).mul(H(-.156583)).add(At);
2553
+ return t.mulAssign(bt(B(e).oneMinus())), M(e.x.greaterThanEqual(0).select(t.x, R.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, R.sub(t.y)));
2554
2554
  }).setLayout({
2555
2555
  name: "GTAOFastAcos",
2556
2556
  type: "vec2",
@@ -2559,94 +2559,154 @@ var An = /* @__PURE__ */ new Se(), jn = /* @__PURE__ */ new d(), Mn = [
2559
2559
  type: "vec2"
2560
2560
  }]
2561
2561
  }), u = V(([e, t, n, c, u, d, f, p, m, h]) => {
2562
- let g = this.stepCount.toConst(), _ = this.expFactor.toConst(), v = this.thickness.toConst(), y = this.backfaceLighting.toConst(), b = e.select(B(1, -1), B(-1, 1)), ee = e.select(1, -1), x = P(0);
2563
- return $e({
2564
- start: U(0),
2562
+ let g = this.stepCount.toConst(), _ = this.expFactor.toConst(), v = this.thickness.toConst(), y = this.backfaceLighting.toConst(), b = e.select(M(1, -1), M(-1, 1)), ee = e.select(1, -1), x = N(0);
2563
+ return lt({
2564
+ start: L(0),
2565
2565
  end: g,
2566
2566
  type: "uint",
2567
2567
  condition: "<"
2568
2568
  }, ({ i: g }) => {
2569
- let S = it(mt(qe(t, H(g).add(d)).div(n)), _).mul(n).toConst(), C = u.mul(N(S, H(g).add(1))).toConst(), w = f.add(C.mul(b)).toConst();
2569
+ let S = Ft(B(He(t, H(g).add(d)).div(n)), _).mul(n).toConst(), C = u.mul(F(S, H(g).add(1))).toConst(), w = f.add(C.mul(b)).toConst();
2570
2570
  z(w.x.lessThanEqual(0).or(w.y.lessThanEqual(0)).or(w.x.greaterThanEqual(1)).or(w.y.greaterThanEqual(1)), () => {
2571
- Dt();
2571
+ Pt();
2572
2572
  });
2573
- let T = Be(w, a(w), this._cameraProjectionMatrixInverse).toConst(), E = T.sub(c).normalize().toConst(), te = this.useLinearThickness.select(T.z.negate().div(this._cameraFar).clamp().mul(100), H(1)), ne = Je(T.sub(te.mul(p).mul(v)).sub(c)), D = B(I(E, p), I(ne, p));
2574
- D = l(gt(D, -1, 1)), D = gt(Mt(qe(ee, D.negate()).sub(h.sub(Ct)), tt)), D = e.select(D.yx, D.xy);
2575
- let O = D.x.toConst(), re = D.y.toConst(), ie = U(D.mul(H(r))).toConst(), k = U(bt(re.sub(O).mul(H(r)))).toConst(), ae = k.greaterThan(U(0)).select(U(rt(U(4294967295), U(32).sub(r).add(r.sub(k)))), U(0)).toConst().shiftLeft(ie);
2576
- ae = ae.bitAnd(i.bitNot()), i.assign(i.bitOr(ae));
2577
- let oe = At(ae);
2578
- z(oe.greaterThan(0), () => {
2573
+ let te = Ye(w, a(w), this._cameraProjectionMatrixInverse).toConst(), T = te.sub(c).normalize().toConst(), ne = this.useLinearThickness.select(te.z.negate().div(this._cameraFar).clamp().mul(100), H(1)), re = Ve(te.sub(ne.mul(p).mul(v)).sub(c)), E = M(I(T, p), I(re, p));
2574
+ E = l(wt(E, -1, 1)), E = wt(zt(He(ee, E.negate()).sub(h.sub(At)), R)), E = e.select(E.yx, E.xy);
2575
+ let ie = E.x.toConst(), ae = E.y.toConst(), oe = L(E.mul(H(r))).toConst(), D = L(Dt(ae.sub(ie).mul(H(r)))).toConst(), se = D.greaterThan(L(0)).select(L(vt(L(4294967295), L(32).sub(r).add(r.sub(D)))), L(0)).toConst().shiftLeft(oe);
2576
+ se = se.bitAnd(i.bitNot()), i.assign(i.bitOr(se));
2577
+ let ce = Rt(se);
2578
+ z(ce.greaterThan(0), () => {
2579
2579
  let e = s(w);
2580
- z(Ve(e).greaterThan(.001), () => {
2581
- let t = Je(E), n = gt(I(m, t));
2580
+ z(Ze(e).greaterThan(.001), () => {
2581
+ let t = Ve(T), n = wt(I(m, t));
2582
2582
  z(n.greaterThan(.001), () => {
2583
- let i = o(w), a = I(i, t.negate()), s = ot(a).lessThan(0).select(mt(a).mul(y), mt(a));
2584
- a = y.greaterThan(0).and(I(i, p).greaterThan(0)).select(s, gt(a)), x.rgb.addAssign(H(oe).div(H(r)).mul(e).mul(n).mul(a));
2583
+ let i = o(w), a = I(i, t.negate()), s = Ot(a).lessThan(0).select(B(a).mul(y), B(a));
2584
+ a = y.greaterThan(0).and(I(i, p).greaterThan(0)).select(s, wt(a)), x.rgb.addAssign(H(ce).div(H(r)).mul(e).mul(n).mul(a));
2585
2585
  });
2586
2586
  });
2587
2587
  });
2588
2588
  }), x;
2589
- }), d = _t("float"), f = _t("vec3"), p = St(d, f), m = V(() => {
2589
+ }), d = jt("float"), f = jt("vec3"), p = We(d, f), m = V(() => {
2590
2590
  let e = a(n).toVar();
2591
2591
  e.greaterThanEqual(1).discard();
2592
- let t = Be(n, e, this._cameraProjectionMatrixInverse).toVar(), s = o(n).toVar(), l = Je(t.xyz.negate()).toVar(), p = c(ht), m = ft(ht), h = this._temporalDirection.mul(.02), g = je(p.add(this._temporalOffset)).add(wt(n.add(h).mul(2).sub(1))), _ = H(0), v = P(0), y = this.sliceCount.toConst(), b = this.stepCount.toConst(), ee = this.aoIntensity.toConst(), x = this.giIntensity.toConst(), S = this.radius.toConst(), C = H(0).toVar();
2592
+ let t = Ye(n, e, this._cameraProjectionMatrixInverse).toVar(), s = o(n).toVar(), l = Ve(t.xyz.negate()).toVar(), p = c(Lt), m = Ct(Lt), h = this._temporalDirection.mul(.02), g = Re(p.add(this._temporalOffset)).add(St(n.add(h).mul(2).sub(1))), _ = H(0), v = N(0), y = this.sliceCount.toConst(), b = this.stepCount.toConst(), ee = this.aoIntensity.toConst(), x = this.giIntensity.toConst(), S = this.radius.toConst(), C = H(0).toVar();
2593
2593
  z(this.useScreenSpaceSampling, () => {
2594
2594
  C.assign(S.mul(this._resolution.x.div(2)).div(H(16)));
2595
2595
  }).Else(() => {
2596
- C.assign(N(S.mul(this._halfProjScale).div(t.z.negate()), H(b)));
2596
+ C.assign(F(S.mul(this._halfProjScale).div(t.z.negate()), H(b)));
2597
2597
  }), C.divAssign(H(b).add(1));
2598
- let w = N(1, H(b.sub(1))).mul(C).toConst();
2599
- $e({
2600
- start: U(0),
2598
+ let w = F(1, H(b.sub(1))).mul(C).toConst();
2599
+ lt({
2600
+ start: L(0),
2601
2601
  end: y,
2602
2602
  type: "uint",
2603
2603
  condition: "<"
2604
2604
  }, ({ i: e }) => {
2605
- let a = qe(H(e).add(m).add(this._temporalDirection), tt.div(H(y))).toConst(), o = P(B(Qe(a), xt(a)), 0).toConst(), c = o.xy.mul(H(1).div(this._resolution)).toConst(), d = Je(Pt(o, l)).toConst(), f = Pt(l, d).toConst(), p = s.sub(d.mul(I(s, d))).toConst(), h = gt(I(Je(p).toConst(), l), -1, 1).toConst(), b = ot(I(p, f)).negate().mul(Ot(h)).toConst();
2606
- i.assign(0), v.addAssign(u(at(!0), C, w, t, c, g, n, l, s, b)), v.addAssign(u(at(!1), C, w, t, c, g, n, l, s, b)), _.addAssign(H(At(i)).div(H(r)));
2607
- }), _.divAssign(H(y)), _.assign(it(_.clamp().oneMinus(), ee).clamp()), v.divAssign(H(y)), v.mulAssign(x);
2608
- let T = H(7).toConst(), E = Ve(v), te = E.greaterThan(T).select(T.div(E), H(1));
2609
- return v.mulAssign(te), d.assign(_), f.assign(v), F(0);
2605
+ let a = He(H(e).add(m).add(this._temporalDirection), R.div(H(y))).toConst(), o = N(M(st(a), Tt(a)), 0).toConst(), c = o.xy.mul(H(1).div(this._resolution)).toConst(), d = Ve(Bt(o, l)).toConst(), f = Bt(l, d).toConst(), p = s.sub(d.mul(I(s, d))).toConst(), h = wt(I(Ve(p).toConst(), l), -1, 1).toConst(), b = Ot(I(p, f)).negate().mul(It(h)).toConst();
2606
+ i.assign(0), v.addAssign(u(_t(!0), C, w, t, c, g, n, l, s, b)), v.addAssign(u(_t(!1), C, w, t, c, g, n, l, s, b)), _.addAssign(H(Rt(i)).div(H(r)));
2607
+ }), _.divAssign(H(y)), _.assign(Ft(_.clamp().oneMinus(), ee).clamp()), v.divAssign(H(y)), v.mulAssign(x);
2608
+ let te = H(7).toConst(), T = Ze(v), ne = T.greaterThan(te).select(te.div(T), H(1));
2609
+ return v.mulAssign(ne), d.assign(_), f.assign(v), P(0);
2610
2610
  });
2611
2611
  return this._material.colorNode = m().context(e.getSharedContext()), this._material.outputNode = p, this._material.needsUpdate = !0, this._aoNode;
2612
2612
  }
2613
2613
  dispose() {
2614
2614
  this._ssgiRenderTarget.dispose(), this._material.dispose();
2615
2615
  }
2616
- }, In = (e, t, n, r) => new Fn(st(e), t, n, r), Ln = class e extends Ht {
2616
+ }, Hn = (e, t, n, r) => new Vn(yt(e), t, n, r), Un = class extends Se {
2617
+ static get type() {
2618
+ return "DenoiseNode";
2619
+ }
2620
+ constructor(e, t, n, r) {
2621
+ super("vec4"), this.textureNode = e, this.depthNode = t, this.normalNode = n, this.noiseNode = U(Gn()), this.lumaPhi = j(5), this.depthPhi = j(5), this.normalPhi = j(5), this.radius = j(5), this.index = j(0), this.updateBeforeType = Et.FRAME, this._resolution = j(new p()), this._sampleVectors = Le(Wn(16, 2, 1)), this._cameraProjectionMatrixInverse = j(r.projectionMatrixInverse);
2622
+ }
2623
+ updateBefore() {
2624
+ let e = this.textureNode.value;
2625
+ this._resolution.value.set(e.image.width, e.image.height);
2626
+ }
2627
+ setup() {
2628
+ let e = Ne(), t = (e) => this.textureNode.sample(e), n = (e) => this.depthNode.sample(e).x, r = (e) => this.normalNode === null ? Ie(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), i = (e) => this.noiseNode.sample(e), a = V(([e, i, a, o]) => {
2629
+ let s = t(o).toVar(), c = n(o).toVar(), l = r(o).toVar(), u = s.rgb, d = Ye(o, c, this._cameraProjectionMatrixInverse).toVar(), f = Ft(F(I(i, l).toVar(), 0), this.normalPhi).toVar(), p = B(Ze(u).sub(Ze(e))).toVar(), m = F(H(1).sub(p.div(this.lumaPhi)), 0).toVar(), h = B(I(a.sub(d), i)).toVar(), g = F(H(1).sub(h.div(this.depthPhi)), 0), _ = m.mul(g).mul(f);
2630
+ return P(u.mul(_), _);
2631
+ }), o = V(([e]) => {
2632
+ let o = n(e).toVar(), s = r(e).toVar(), c = t(e).toVar(), l = jt("vec4");
2633
+ return z(o.greaterThanEqual(1).or(I(s, s).equal(0)), () => {
2634
+ l.assign(c);
2635
+ }).Else(() => {
2636
+ let t = N(c.rgb), n = Ye(e, o, this._cameraProjectionMatrixInverse).toConst(), r = $e(this.noiseNode, 0), u = M(e.x, e.y.oneMinus());
2637
+ u = u.mul(this._resolution.div(r));
2638
+ let d = i(u).toVar(), f = M(Tt(d.element(this.index.mod(4).mul(2).mul(R))), st(d.element(this.index.mod(4).mul(2).mul(R)))), p = ze(f.x, f.y.negate(), f.x, f.y), m = H(1).toVar(), h = N(c.rgb).toVar();
2639
+ lt({
2640
+ start: Me(0),
2641
+ end: Me(16),
2642
+ type: "int",
2643
+ condition: "<"
2644
+ }, ({ i: r }) => {
2645
+ let i = this._sampleVectors.element(r), o = p.mul(i.xy.mul(H(1).add(i.z.mul(this.radius.sub(1))))).div(this._resolution), c = a(t, s, n, e.add(o));
2646
+ h.addAssign(c.xyz), m.addAssign(c.w);
2647
+ }), z(m.greaterThan(H(0)), () => {
2648
+ h.divAssign(m);
2649
+ }), l.assign(P(h, c.a));
2650
+ }), l;
2651
+ });
2652
+ return V(() => o(e))();
2653
+ }
2654
+ };
2655
+ function Wn(e, t, r) {
2656
+ let i = [];
2657
+ for (let a = 0; a < e; a++) {
2658
+ let o = 2 * Math.PI * t * a / e, s = (a / (e - 1)) ** r;
2659
+ i.push(new n(Math.cos(o), Math.sin(o), s));
2660
+ }
2661
+ return i;
2662
+ }
2663
+ function Gn(e = 64) {
2664
+ let t = new pe(), n = e * e * 4, r = new Uint8Array(n);
2665
+ for (let n = 0; n < e; n++) for (let i = 0; i < e; i++) {
2666
+ let a = n, o = i;
2667
+ r[(n * e + i) * 4] = (t.noise(a, o) * .5 + .5) * 255, r[(n * e + i) * 4 + 1] = (t.noise(a + e, o) * .5 + .5) * 255, r[(n * e + i) * 4 + 2] = (t.noise(a, o + e) * .5 + .5) * 255, r[(n * e + i) * 4 + 3] = (t.noise(a + e, o + e) * .5 + .5) * 255;
2668
+ }
2669
+ let i = new g(r, e, e);
2670
+ return i.wrapS = u, i.wrapT = u, i.needsUpdate = !0, i;
2671
+ }
2672
+ var Kn = (e, t, n, r) => new Un(yt(e), tt(t), tt(n), r), qn = class e extends Jt {
2617
2673
  static {
2618
2674
  this.passId = "SsgiRenderPass";
2619
2675
  }
2620
2676
  constructor(t) {
2621
- super(), this.passId = e.passId, this.sliceCount = L(t.sliceCount, "uint"), this.stepCount = L(t.stepCount, "uint"), this.radius = L(t.radius), this.expFactor = L(t.expFactor), this.thickness = L(t.thickness), this.backfaceLighting = L(t.backfaceLighting), this.aoIntensity = L(t.aoIntensity), this.giIntensity = L(t.giIntensity), this.useLinearThickness = L(t.useLinearThickness), this.useScreenSpaceSampling = L(t.useScreenSpaceSampling), this.useTemporalFiltering = t.useTemporalFiltering;
2677
+ super(), this.passId = e.passId, this.sliceCount = j(t.sliceCount, "uint"), this.stepCount = j(t.stepCount, "uint"), this.radius = j(t.radius), this.expFactor = j(t.expFactor), this.thickness = j(t.thickness), this.backfaceLighting = j(t.backfaceLighting), this.aoIntensity = j(t.aoIntensity), this.giIntensity = j(t.giIntensity), this.useLinearThickness = j(t.useLinearThickness), this.useScreenSpaceSampling = j(t.useScreenSpaceSampling), this.giDenoiseRadius = j(t.giDenoiseRadius), this.aoDenoiseRadius = j(t.aoDenoiseRadius), this.useTemporalFiltering = t.useTemporalFiltering;
2622
2678
  }
2623
2679
  updatePerformanceParameters(e) {
2624
2680
  this.sliceCount.value = e.sliceCount, this.stepCount.value = e.stepCount;
2625
2681
  }
2626
2682
  addParametersToGUI(e, t) {
2627
2683
  let n = e.addFolder("SSGI Settings");
2628
- n.add(this.sliceCount, "value", 1, 4, 1).name("slice count").onChange(() => t()), n.add(this.stepCount, "value", 1, 32, 1).name("step count").onChange(() => t()), n.add(this.radius, "value", 1, 25).name("radius").onChange(() => t()), n.add(this.expFactor, "value", 1, 3).name("exp factor").onChange(() => t()), n.add(this.thickness, "value", .01, 10).name("thickness").onChange(() => t()), n.add(this.backfaceLighting, "value", 0, 1).name("backface lighting").onChange(() => t()), n.add(this.aoIntensity, "value", 0, 4).name("AO intensity").onChange(() => t()), n.add(this.giIntensity, "value", 0, 100).name("GI intensity").onChange(() => t()), n.add(this.useLinearThickness, "value").name("use linear thickness").onChange(() => t()), n.add(this.useScreenSpaceSampling, "value").name("use screen-space sampling").onChange(() => t());
2684
+ n.add(this.sliceCount, "value", 1, 4, 1).name("slice count").onChange(() => t()), n.add(this.stepCount, "value", 1, 32, 1).name("step count").onChange(() => t()), n.add(this.radius, "value", 1, 25).name("radius").onChange(() => t()), n.add(this.expFactor, "value", 1, 3).name("exp factor").onChange(() => t()), n.add(this.thickness, "value", .01, 10).name("thickness").onChange(() => t()), n.add(this.backfaceLighting, "value", 0, 1).name("backface lighting").onChange(() => t()), n.add(this.aoIntensity, "value", 0, 4).name("AO intensity").onChange(() => t()), n.add(this.giIntensity, "value", 0, 100).name("GI intensity").onChange(() => t()), n.add(this.useLinearThickness, "value").name("use linear thickness").onChange(() => t()), n.add(this.useScreenSpaceSampling, "value").name("use screen-space sampling").onChange(() => t()), n.add(this.aoDenoiseRadius, "value", 0, 20).name("AO denoise radius").onChange(() => t()), n.add(this.giDenoiseRadius, "value", 0, 20).name("GI denoise radius").onChange(() => t());
2629
2685
  }
2630
2686
  assemble(e, t, n, r, i) {
2631
- if (!(r instanceof l) || this.sliceCount.value === 0 || this.stepCount.value === 0) return t;
2632
- let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), u = In(a, s, Et((e) => Ae(c.sample(e))), r);
2687
+ if (!(r instanceof d) || this.sliceCount.value === 0 || this.stepCount.value === 0) return t;
2688
+ let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), l = pt((e) => Xe(c.sample(e))), u = Hn(a, s, l, r);
2633
2689
  u.sliceCount = this.sliceCount, u.stepCount = this.stepCount, u.radius = this.radius, u.expFactor = this.expFactor, u.thickness = this.thickness, u.backfaceLighting = this.backfaceLighting, u.aoIntensity = this.aoIntensity, u.giIntensity = this.giIntensity, u.useLinearThickness = this.useLinearThickness, u.useScreenSpaceSampling = this.useScreenSpaceSampling, u.useTemporalFiltering = this.useTemporalFiltering;
2634
- let d = u.getGINode(), f = u.getAONode(), p = F(nt(a.rgb.mul(f.r), o.rgb.mul(d.rgb)), a.a);
2635
- return p.name = "Ssgi Composite", i === "ao only" ? F(P(f), 1) : i === "gi only" ? F(d, 1) : i === "direct lighting only" ? a : p;
2636
- }
2637
- }, Rn = /* @__PURE__ */ new Se(), zn = /* @__PURE__ */ new d(), Bn, Vn = class extends ge {
2690
+ let f = u.getGINode(), p = u.getAONode(), m = Kn(f, s, l, r);
2691
+ m.radius = this.giDenoiseRadius;
2692
+ let h = Kn(p, s, l, r);
2693
+ h.radius = this.aoDenoiseRadius;
2694
+ let g = P(mt(a.rgb.mul(h.r), o.rgb.mul(m.rgb)), a.a);
2695
+ return g.name = "Ssgi Composite", i === "ao only" ? P(N(p.r), 1) : i === "gi only" ? P(f.rgb, 1) : i === "denoised ao only" ? P(N(h.r), 1) : i === "denoised gi only" ? P(m.rgb, 1) : i === "direct lighting only" ? a : i === "without denoise" ? P(mt(a.rgb.mul(p.r), o.rgb.mul(f.rgb)), a.a) : g;
2696
+ }
2697
+ }, Jn = /* @__PURE__ */ new Oe(), Yn = /* @__PURE__ */ new p(), Xn, Zn = class extends Se {
2638
2698
  static get type() {
2639
2699
  return "TRAANode";
2640
2700
  }
2641
2701
  constructor(e, t, n, r) {
2642
- super("vec4"), this.isTRAANode = !0, this.updateBeforeType = ve.FRAME, this.beautyNode = e, this.depthNode = t, this.velocityNode = n, this.camera = r, this.depthThreshold = 5e-4, this.edgeDepthDiff = .001, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = L(new d()), this._historyRenderTarget = new C(1, 1, {
2702
+ super("vec4"), this.isTRAANode = !0, this.updateBeforeType = we.FRAME, this.beautyNode = e, this.depthNode = t, this.velocityNode = n, this.camera = r, this.depthThreshold = 5e-4, this.edgeDepthDiff = .001, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = j(new p()), this._historyRenderTarget = new T(1, 1, {
2643
2703
  depthBuffer: !1,
2644
- type: x,
2645
- depthTexture: new m()
2646
- }), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new C(1, 1, {
2704
+ type: w,
2705
+ depthTexture: new _()
2706
+ }), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new T(1, 1, {
2647
2707
  depthBuffer: !1,
2648
- type: x
2649
- }), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new j(), this._resolveMaterial.name = "TRAA.resolve", this._textureNode = Ye(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new O(), this._cameraNearFar = L(new d()), this._cameraWorldMatrix = L(new O()), this._cameraWorldMatrixInverse = L(new O()), this._cameraProjectionMatrixInverse = L(new O()), this._previousCameraWorldMatrix = L(new O()), this._previousCameraProjectionMatrixInverse = L(new O()), this._previousDepthNode = R(new m(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
2708
+ type: w
2709
+ }), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new k(), this._resolveMaterial.name = "TRAA.resolve", this._textureNode = ot(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new D(), this._cameraNearFar = j(new p()), this._cameraWorldMatrix = j(new D()), this._cameraWorldMatrixInverse = j(new D()), this._cameraProjectionMatrixInverse = j(new D()), this._previousCameraWorldMatrix = j(new D()), this._previousCameraProjectionMatrixInverse = j(new D()), this._previousDepthNode = U(new _(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
2650
2710
  }
2651
2711
  getTextureNode() {
2652
2712
  return this._textureNode;
@@ -2663,45 +2723,45 @@ var An = /* @__PURE__ */ new Se(), jn = /* @__PURE__ */ new d(), Mn = [
2663
2723
  offsetY: 0,
2664
2724
  width: e,
2665
2725
  height: t
2666
- }, r = Un[this._jitterIndex];
2726
+ }, r = $n[this._jitterIndex];
2667
2727
  this.camera.setViewOffset(n.fullWidth, n.fullHeight, n.offsetX + r[0] - .5, n.offsetY + r[1] - .5, n.width, n.height);
2668
2728
  }
2669
2729
  clearViewOffset() {
2670
- this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= Un.length - 1;
2730
+ this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= $n.length - 1;
2671
2731
  }
2672
2732
  updateBefore(e) {
2673
2733
  let { renderer: t } = e;
2674
2734
  this._previousCameraWorldMatrix.value.copy(this._cameraWorldMatrix.value), this._previousCameraProjectionMatrixInverse.value.copy(this._cameraProjectionMatrixInverse.value), this._cameraNearFar.value.set(this.camera.near, this.camera.far), this._cameraWorldMatrix.value.copy(this.camera.matrixWorld), this._cameraWorldMatrixInverse.value.copy(this.camera.matrixWorldInverse), this._cameraProjectionMatrixInverse.value.copy(this.camera.projectionMatrixInverse);
2675
2735
  let n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, r = n.texture.width, i = n.texture.height;
2676
- this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), Bn = M.resetRendererState(t, Bn);
2736
+ this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), Xn = A.resetRendererState(t, Xn);
2677
2737
  let a = this._historyRenderTarget.width !== r || this._historyRenderTarget.height !== i;
2678
- this.setSize(r, i), a === !0 && (t.initRenderTarget(this._historyRenderTarget), t.initRenderTarget(this._resolveRenderTarget), t.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), t.setRenderTarget(this._resolveRenderTarget), Rn.material = this._resolveMaterial, Rn.name = "TRAA", Rn.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
2679
- let o = t.getDrawingBufferSize(zn);
2738
+ this.setSize(r, i), a === !0 && (t.initRenderTarget(this._historyRenderTarget), t.initRenderTarget(this._resolveRenderTarget), t.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), t.setRenderTarget(this._resolveRenderTarget), Jn.material = this._resolveMaterial, Jn.name = "TRAA", Jn.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
2739
+ let o = t.getDrawingBufferSize(Yn);
2680
2740
  if (this._historyRenderTarget.height === o.height && this._historyRenderTarget.width === o.width) {
2681
2741
  let e = this.depthNode.value;
2682
2742
  t.copyTextureToTexture(e, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
2683
2743
  }
2684
- M.restoreRendererState(t, Bn);
2744
+ A.restoreRendererState(t, Xn);
2685
2745
  }
2686
2746
  setup(e) {
2687
2747
  let t = e.context.renderPipeline;
2688
2748
  t && (this._needsPostProcessingSync = !0, t.context.onBeforeRenderPipeline = () => {
2689
- let t = e.renderer.getDrawingBufferSize(zn);
2749
+ let t = e.renderer.getDrawingBufferSize(Yn);
2690
2750
  this.setViewOffset(t.width, t.height);
2691
2751
  }, t.context.onAfterRenderPipeline = () => {
2692
2752
  this.clearViewOffset();
2693
- }), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = _), e.context.velocity === void 0 ? this._velocityNode = He : this._velocityNode = e.context.velocity;
2753
+ }), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = b), e.context.velocity === void 0 ? this._velocityNode = Be : this._velocityNode = e.context.velocity;
2694
2754
  let n = (e) => {
2695
2755
  let { x: t, y: n } = this._cameraNearFar;
2696
- return Fe(ze(e, t, n), t, n);
2697
- }, r = jt({
2756
+ return Ke(Je(e, t, n), t, n);
2757
+ }, r = Vt({
2698
2758
  closestDepth: "float",
2699
2759
  closestPositionTexel: "vec2",
2700
2760
  farthestDepth: "float"
2701
2761
  }), i = V(([t]) => {
2702
- let i = H(2).toVar(), a = B(0).toVar(), o = H(-1).toVar();
2762
+ let i = H(2).toVar(), a = M(0).toVar(), o = H(-1).toVar();
2703
2763
  for (let r = -1; r <= 1; ++r) for (let s = -1; s <= 1; ++s) {
2704
- let c = t.add(B(r, s)).toVar(), l = this.depthNode.load(c).r;
2764
+ let c = t.add(M(r, s)).toVar(), l = this.depthNode.load(c).r;
2705
2765
  e.renderer.reversedDepthBuffer && (l = l.oneMinus()), e.renderer.logarithmicDepthBuffer && (l = n(l)), l = l.toVar(), z(l.lessThan(i), () => {
2706
2766
  i.assign(l), a.assign(c);
2707
2767
  }), z(l.greaterThan(o), () => {
@@ -2712,11 +2772,11 @@ var An = /* @__PURE__ */ new Se(), jn = /* @__PURE__ */ new d(), Mn = [
2712
2772
  }), a = (t) => {
2713
2773
  let r = this._previousDepthNode.sample(t).r;
2714
2774
  e.renderer.logarithmicDepthBuffer && (r = n(r));
2715
- let i = Be(t, r, this._previousCameraProjectionMatrixInverse), a = this._previousCameraWorldMatrix.mul(F(i, 1)).xyz, o = this._cameraWorldMatrixInverse.mul(F(a, 1)).z;
2716
- return this.camera.isOrthographicCamera ? Me(o, this._cameraNearFar.x, this._cameraNearFar.y) : Fe(o, this._cameraNearFar.x, this._cameraNearFar.y);
2775
+ let i = Ye(t, r, this._previousCameraProjectionMatrixInverse), a = this._previousCameraWorldMatrix.mul(P(i, 1)).xyz, o = this._cameraWorldMatrixInverse.mul(P(a, 1)).z;
2776
+ return this.camera.isOrthographicCamera ? Ue(o, this._cameraNearFar.x, this._cameraNearFar.y) : Ke(o, this._cameraNearFar.x, this._cameraNearFar.y);
2717
2777
  }, o = V(([e, t, n, r]) => {
2718
- let i = r.rgb.add(n.rgb).mul(.5), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7), o = t.sub(F(i, e.a)), s = o.xyz.div(a).abs(), c = N(s.x, s.y, s.z);
2719
- return c.greaterThan(1).select(F(i, e.a).add(o.div(c)), t);
2778
+ let i = r.rgb.add(n.rgb).mul(.5), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7), o = t.sub(P(i, e.a)), s = o.xyz.div(a).abs(), c = F(s.x, s.y, s.z);
2779
+ return c.greaterThan(1).select(P(i, e.a).add(o.div(c)), t);
2720
2780
  }).setLayout({
2721
2781
  name: "clipAABB",
2722
2782
  type: "vec4",
@@ -2750,13 +2810,13 @@ var An = /* @__PURE__ */ new Se(), jn = /* @__PURE__ */ new d(), Mn = [
2750
2810
  [-1, 0]
2751
2811
  ], a = t.toVar(), s = t.pow2().toVar();
2752
2812
  for (let [t, n] of i) {
2753
- let r = this.beautyNode.offset(Re(t, n)).load(e).max(0);
2813
+ let r = this.beautyNode.offset(qe(t, n)).load(e).max(0);
2754
2814
  a.addAssign(r), s.addAssign(r.pow2());
2755
2815
  }
2756
2816
  let c = H(i.length + 1), l = a.div(c), u = s.div(c).sub(l.pow2()).max(0).sqrt().mul(r), d = l.sub(u), f = l.add(u);
2757
2817
  return o(l.clamp(d, f), n, d, f);
2758
2818
  }), c = V(([e, t]) => {
2759
- let n = e.mul(t).fract().abs(), r = N(n, n.oneMinus());
2819
+ let n = e.mul(t).fract().abs(), r = F(n, n.oneMinus());
2760
2820
  return r.x.mul(r.y).oneMinus().div(.75);
2761
2821
  }).setLayout({
2762
2822
  name: "subpixelCorrection",
@@ -2769,11 +2829,11 @@ var An = /* @__PURE__ */ new Se(), jn = /* @__PURE__ */ new d(), Mn = [
2769
2829
  type: "ivec2"
2770
2830
  }]
2771
2831
  }), l = V(([e, t, n]) => {
2772
- let r = n.oneMinus(), i = e.mul(H(1).div(N(e.r, e.g, e.b).add(1))), a = t.mul(H(1).div(N(t.r, t.g, t.b).add(1))), o = Ve(i.rgb), s = Ve(a.rgb);
2773
- return n.mulAssign(H(1).div(o.add(1))), r.mulAssign(H(1).div(s.add(1))), nt(e.mul(n), t.mul(r)).div(N(n.add(r), 1e-5)).toVar();
2774
- }), u = R(this._historyRenderTarget.texture), d = V(() => {
2775
- let e = pt(), t = this.beautyNode.size(), n = e.mul(t), r = i(n), o = r.get("closestDepth"), d = r.get("closestPositionTexel"), f = r.get("farthestDepth"), p = this.velocityNode.load(d).xy.mul(B(.5, -.5)), m = e.sub(p), h = a(m), g = m.greaterThanEqual(0).all().and(m.lessThanEqual(1).all()), _ = f.sub(o).greaterThan(this.edgeDepthDiff), v = o.sub(h).greaterThan(this.depthThreshold), y = g.and(_.or(v.not())), b = this.beautyNode.sample(e), ee = u.sample(e.sub(p)), x = e.sub(m).mul(t).length().div(this.maxVelocityLength).saturate(), S = H(.05).toVar();
2776
- return this.useSubpixelCorrection && S.addAssign(c(p, t).mul(.25)), S.assign(y.select(S.add(x).saturate(), 1)), l(b, s(n, b, ee, It(.5, 1, x.oneMinus().pow2())), S);
2832
+ let r = n.oneMinus(), i = e.mul(H(1).div(F(e.r, e.g, e.b).add(1))), a = t.mul(H(1).div(F(t.r, t.g, t.b).add(1))), o = Ze(i.rgb), s = Ze(a.rgb);
2833
+ return n.mulAssign(H(1).div(o.add(1))), r.mulAssign(H(1).div(s.add(1))), mt(e.mul(n), t.mul(r)).div(F(n.add(r), 1e-5)).toVar();
2834
+ }), u = U(this._historyRenderTarget.texture), d = V(() => {
2835
+ let e = Ne(), t = this.beautyNode.size(), n = e.mul(t), r = i(n), o = r.get("closestDepth"), d = r.get("closestPositionTexel"), f = r.get("farthestDepth"), p = this.velocityNode.load(d).xy.mul(M(.5, -.5)), m = e.sub(p), h = a(m), g = m.greaterThanEqual(0).all().and(m.lessThanEqual(1).all()), _ = f.sub(o).greaterThan(this.edgeDepthDiff), v = o.sub(h).greaterThan(this.depthThreshold), y = g.and(_.or(v.not())), b = this.beautyNode.sample(e), ee = u.sample(e.sub(p)), x = e.sub(m).mul(t).length().div(this.maxVelocityLength).saturate(), S = H(.05).toVar();
2836
+ return this.useSubpixelCorrection && S.addAssign(c(p, t).mul(.25)), S.assign(y.select(S.add(x).saturate(), 1)), l(b, s(n, b, ee, Pe(.5, 1, x.oneMinus().pow2())), S);
2777
2837
  });
2778
2838
  return this._resolveMaterial.colorNode = d(), this._textureNode;
2779
2839
  }
@@ -2781,12 +2841,12 @@ var An = /* @__PURE__ */ new Se(), jn = /* @__PURE__ */ new d(), Mn = [
2781
2841
  this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
2782
2842
  }
2783
2843
  };
2784
- function Hn(e, t) {
2844
+ function Qn(e, t) {
2785
2845
  let n = 1, r = 0;
2786
2846
  for (; e > 0;) n /= t, r += e % t * n, e = Math.floor(e / t);
2787
2847
  return r;
2788
2848
  }
2789
- var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(t + 1, 3)]), Wn = (e, t, n, r) => new Vn(st(e), t, n, r), Gn = class e extends Ht {
2849
+ var $n = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Qn(t + 1, 2), Qn(t + 1, 3)]), er = (e, t, n, r) => new Zn(yt(e), t, n, r), tr = class e extends Jt {
2790
2850
  constructor(...t) {
2791
2851
  super(...t), this.passId = e.passId;
2792
2852
  }
@@ -2794,7 +2854,7 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
2794
2854
  this.passId = "TraaRenderPass";
2795
2855
  }
2796
2856
  assemble(e, t, n, r, i) {
2797
- return r instanceof l ? Wn(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), r) : t;
2857
+ return r instanceof d ? er(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), r) : t;
2798
2858
  }
2799
2859
  addParametersToGUI(e, t) {}
2800
2860
  }, Q = {
@@ -2811,7 +2871,7 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
2811
2871
  Q.MEDIUM,
2812
2872
  Q.LOW,
2813
2873
  Q.LOWEST
2814
- ], Kn = $[0], qn = $[$.length - 1], Jn = Q.HIGHEST, Yn = new Map([
2874
+ ], nr = $[0], rr = $[$.length - 1], ir = Q.HIGHEST, ar = new Map([
2815
2875
  [Q.HIGHEST, {
2816
2876
  maxPixelRatio: 1.5,
2817
2877
  ssgiPerformanceParameters: {
@@ -2854,7 +2914,7 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
2854
2914
  stepCount: 0
2855
2915
  }
2856
2916
  }]
2857
- ]), Xn = [
2917
+ ]), or = [
2858
2918
  {
2859
2919
  min: 70,
2860
2920
  max: Infinity,
@@ -2885,16 +2945,16 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
2885
2945
  max: 19,
2886
2946
  value: Q.LOWEST
2887
2947
  }
2888
- ], Zn = (e) => Xn.find((t) => e >= t.min && e <= t.max).value, Qn = class {
2948
+ ], sr = (e) => or.find((t) => e >= t.min && e <= t.max).value, cr = class {
2889
2949
  constructor(e) {
2890
- this.qualityLevel = Jn, this.qualityMap = Yn, this.fpsCounter = new pe(), this.applyQualityParametersCallback = e;
2950
+ this.qualityLevel = ir, this.qualityMap = ar, this.fpsCounter = new ye(), this.applyQualityParametersCallback = e;
2891
2951
  }
2892
2952
  getQualityLevel() {
2893
2953
  return this.qualityLevel;
2894
2954
  }
2895
2955
  manageQualitySettings(e, t) {
2896
2956
  this.fpsCounter.update();
2897
- let n = this.fpsCounter.getFps(), r = n > 0 && n < e && this.qualityLevel !== qn, i = n > t && this.qualityLevel !== Kn, a = r ? "decrement" : i ? "increment" : void 0;
2957
+ let n = this.fpsCounter.getFps(), r = n > 0 && n < e && this.qualityLevel !== rr, i = n > t && this.qualityLevel !== nr, a = r ? "decrement" : i ? "increment" : void 0;
2898
2958
  if (a === void 0) {
2899
2959
  this.qualityChangePendingSince = void 0, this.qualityChangePendingDirection = void 0;
2900
2960
  return;
@@ -2934,28 +2994,28 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
2934
2994
  async autoDetectInitialQualityLevel() {
2935
2995
  let { getGPUTier: e } = await import("./dist-Blgk0vU0.mjs"), t = await e({ benchmarksURL: "./benchmarks" });
2936
2996
  if (!t || !t.fps) {
2937
- console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel = Jn;
2997
+ console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel = ir;
2938
2998
  return;
2939
2999
  }
2940
- this.qualityLevel = Zn(t.fps), console.info(`The initial quality setting has been set to ${this.qualityLevel} based on a benchmark performance of ${t.fps}fps of the graphics hardware.`);
3000
+ this.qualityLevel = sr(t.fps), console.info(`The initial quality setting has been set to ${this.qualityLevel} based on a benchmark performance of ${t.fps}fps of the graphics hardware.`);
2941
3001
  }
2942
- }, $n = class e extends Ht {
3002
+ }, lr = class e extends Jt {
2943
3003
  static {
2944
3004
  this.passId = "FogRenderPass";
2945
3005
  }
2946
3006
  constructor(t) {
2947
- super(), this.passId = e.passId, this.sceneWithFog = void 0, this.fogColor = L(new k(t.color)), this.fogNearBlend = L(t.nearBlend), this.fogFarBlend = L(t.farBlend);
3007
+ super(), this.passId = e.passId, this.sceneWithFog = void 0, this.fogColor = j(new le(t.color)), this.fogNearBlend = j(t.nearBlend), this.fogFarBlend = j(t.farBlend);
2948
3008
  }
2949
3009
  assemble(e, t, n, r, i) {
2950
- if (!(r instanceof l) || i === "no fog") return this.removeSceneFog(), t;
3010
+ if (!(r instanceof d) || i === "no fog") return this.removeSceneFog(), t;
2951
3011
  let a = e.getTextureNode("depth");
2952
- if (i === "depth") return this.removeSceneFog(), F(P(a.r), 1);
2953
- let o = L(r.projectionMatrixInverse), s = L(r.matrixWorld), c = We(L(r.far).onRenderUpdate(() => r.far), 50).sub(this.fogFarBlend), u = c.sub(this.fogNearBlend), d = F(kt.x.mul(2).sub(1), kt.y.mul(2).sub(1), a.r, 1), f = o.mul(d), p = f.xyz.div(f.w), m = s.mul(F(p, 1)).xyz.xz.length(), h = c.sub(m).div(c.sub(u)).clamp(0, 1);
2954
- return this.addSceneFog(n, u, c), It(F(this.fogColor, 1), t, h);
3012
+ if (i === "depth") return this.removeSceneFog(), P(N(a.r), 1);
3013
+ let o = j(r.projectionMatrixInverse), s = j(r.matrixWorld), c = Ht(j(r.far).onRenderUpdate(() => r.far), 50).sub(this.fogFarBlend), l = c.sub(this.fogNearBlend), u = P(ht.x.mul(2).sub(1), ht.y.mul(2).sub(1), a.r, 1), f = o.mul(u), p = f.xyz.div(f.w), m = s.mul(P(p, 1)).xyz.xz.length(), h = c.sub(m).div(c.sub(l)).clamp(0, 1);
3014
+ return this.addSceneFog(n, l, c), Pe(P(this.fogColor, 1), t, h);
2955
3015
  }
2956
3016
  addSceneFog(e, t, n) {
2957
- let r = Te.xz.length(), i = n.sub(r).div(n.sub(t)).clamp(0, 1).oneMinus();
2958
- e.fogNode = Ge(this.fogColor, i), this.sceneWithFog = e;
3017
+ let r = gt.xz.length(), i = n.sub(r).div(n.sub(t)).clamp(0, 1).oneMinus();
3018
+ e.fogNode = et(this.fogColor, i), this.sceneWithFog = e;
2959
3019
  }
2960
3020
  removeSceneFog() {
2961
3021
  this.sceneWithFog &&= (this.sceneWithFog.fogNode = null, void 0);
@@ -2966,17 +3026,17 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
2966
3026
  this.fogColor.value.set(e), n();
2967
3027
  });
2968
3028
  }
2969
- }, er = {
2970
- [A.NONE]: 0,
2971
- [A.LINEAR]: 1,
2972
- [A.REINHARD]: 2,
2973
- [A.CINEON]: 3,
2974
- [A.ACES_FILMIC]: 4,
2975
- [A.AGX]: 6,
2976
- [A.NEUTRAL]: 7
2977
- }, tr = class extends fe {
3029
+ }, ur = {
3030
+ [O.NONE]: 0,
3031
+ [O.LINEAR]: 1,
3032
+ [O.REINHARD]: 2,
3033
+ [O.CINEON]: 3,
3034
+ [O.ACES_FILMIC]: 4,
3035
+ [O.AGX]: 6,
3036
+ [O.NEUTRAL]: 7
3037
+ }, dr = class extends ve {
2978
3038
  constructor(e, t, n, r, i = n) {
2979
- super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.qualityManager = new Qn(this.applyQualityParameters.bind(this)), this.freezeFrames = 0, this.freezeRenderTarget = new C(), this.renderPipeline = new ye(t), this.applyToneMappingConfig(), this.enableDefaultRenderPasses(n, r, i), this._initData.webGpuConfig.autoDetectQualityLevel ? this.qualityManager.autoDetectInitialQualityLevel().then(() => this.qualityManager.applyCurrentQualityLevel(0)) : this.qualityManager.applyCurrentQualityLevel(0);
3039
+ super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.qualityManager = new cr(this.applyQualityParameters.bind(this)), this.freezeFrames = 0, this.freezeRenderTarget = new T(), this.renderPipeline = new Te(t), this.applyToneMappingConfig(), this.enableDefaultRenderPasses(n, r, i), this._initData.webGpuConfig.autoDetectQualityLevel ? this.qualityManager.autoDetectInitialQualityLevel().then(() => this.qualityManager.applyCurrentQualityLevel(0)) : this.qualityManager.applyCurrentQualityLevel(0);
2980
3040
  }
2981
3041
  enableDefaultRenderPasses(e, t, n) {
2982
3042
  let r = this._initData.webGpuConfig.fog.enabled, i = this._initData.transparentBackground;
@@ -3015,15 +3075,15 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
3015
3075
  this.renderer.setRenderTarget(this.freezeRenderTarget), this.renderPipeline.render(), this.renderer.setRenderTarget(e);
3016
3076
  }
3017
3077
  updateCameraProjectionMatrix(e) {
3018
- (e instanceof r || e instanceof l) && e.updateProjectionMatrix();
3078
+ (e instanceof i || e instanceof d) && e.updateProjectionMatrix();
3019
3079
  }
3020
3080
  assembleRenderPasses(e, t) {
3021
- let n = Xe(e, t), r = n;
3022
- n.setMRT(De({
3023
- output: Le,
3024
- diffuseColor: et,
3025
- normal: Ie(Ke),
3026
- velocity: He
3081
+ let n = it(e, t), r = n;
3082
+ n.setMRT(nt({
3083
+ output: kt,
3084
+ diffuseColor: dt,
3085
+ normal: at(rt),
3086
+ velocity: Be
3027
3087
  }));
3028
3088
  for (let i of this.renderPasses.values()) r = i.assemble(n, r, e, t, this.debugMode);
3029
3089
  return r;
@@ -3036,7 +3096,7 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
3036
3096
  this.isConfiguratorMode && this._webGpuGroundShadowReflection.setReceiveShadow(e);
3037
3097
  }
3038
3098
  enableOutline(e, t) {
3039
- this.getOutlinePassOrUndefined() || this.addRenderPass(new Ut({
3099
+ this.getOutlinePassOrUndefined() || this.addRenderPass(new Yt({
3040
3100
  selectedObjects: [],
3041
3101
  visibleEdgeColor: e,
3042
3102
  hiddenEdgeColor: t,
@@ -3046,11 +3106,13 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
3046
3106
  }));
3047
3107
  }
3048
3108
  getOutlinePassOrUndefined() {
3049
- let e = this.renderPasses.get(Ut.passId);
3050
- if (e && e instanceof Ut) return e;
3109
+ let e = this.renderPasses.get(Yt.passId);
3110
+ if (e && e instanceof Yt) return e;
3051
3111
  }
3052
3112
  enableSsgiPass(e) {
3053
- this.renderPasses.get(Ln.passId) || this.addRenderPass(new Ln({
3113
+ if (this.renderPasses.get(qn.passId)) return;
3114
+ let t = this._initData.webGpuConfig.ssgi;
3115
+ this.addRenderPass(new qn({
3054
3116
  sliceCount: 2,
3055
3117
  stepCount: 12,
3056
3118
  radius: 8,
@@ -3059,26 +3121,28 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
3059
3121
  backfaceLighting: 0,
3060
3122
  aoIntensity: .6,
3061
3123
  giIntensity: 4,
3124
+ aoDenoiseRadius: t.aoDenoiseRadius,
3125
+ giDenoiseRadius: t.giDenoiseRadius,
3062
3126
  useLinearThickness: !1,
3063
3127
  useScreenSpaceSampling: !0,
3064
3128
  useTemporalFiltering: e
3065
3129
  }));
3066
3130
  }
3067
3131
  enableTraaPass() {
3068
- this.renderPasses.get(Gn.passId) || this.addRenderPass(new Gn());
3132
+ this.renderPasses.get(tr.passId) || this.addRenderPass(new tr());
3069
3133
  }
3070
3134
  enableFogPass() {
3071
- if (this.renderPasses.get($n.passId)) return;
3135
+ if (this.renderPasses.get(lr.passId)) return;
3072
3136
  let e = this._initData.webGpuConfig.fog;
3073
- this.addRenderPass(new $n({
3137
+ this.addRenderPass(new lr({
3074
3138
  color: this._initData.colors.DEFAULT_BACKGROUND,
3075
3139
  nearBlend: e.nearBlend,
3076
3140
  farBlend: e.farBlend
3077
3141
  }));
3078
3142
  }
3079
3143
  disableFogPass() {
3080
- let e = this.renderPasses.get($n.passId);
3081
- !e || !(e instanceof $n) || (e.removeSceneFog(), this.renderPasses.delete($n.passId));
3144
+ let e = this.renderPasses.get(lr.passId);
3145
+ !e || !(e instanceof lr) || (e.removeSceneFog(), this.renderPasses.delete(lr.passId));
3082
3146
  }
3083
3147
  applyQualityParameters(e, t) {
3084
3148
  this.freezeFrames = Math.max(t, this.freezeFrames);
@@ -3086,17 +3150,17 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
3086
3150
  this.renderer.setPixelRatio(Math.min(n, e.maxPixelRatio)), this.getSsgiPassOrUndefined()?.updatePerformanceParameters(e.ssgiPerformanceParameters), this.passNeedsReassembly = !0;
3087
3151
  }
3088
3152
  getSsgiPassOrUndefined() {
3089
- let e = this.renderPasses.get(Ln.passId);
3090
- if (e && e instanceof Ln) return e;
3153
+ let e = this.renderPasses.get(qn.passId);
3154
+ if (e && e instanceof qn) return e;
3091
3155
  }
3092
3156
  setShadingType(e) {
3093
- e !== ce.DEFAULT && console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
3157
+ e !== me.DEFAULT && console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
3094
3158
  }
3095
3159
  showGUI(e) {
3096
- if (this.renderer.inspector instanceof Dn) return;
3160
+ if (this.renderer.inspector instanceof Nn) return;
3097
3161
  let t = document.createElement("style");
3098
3162
  t.innerText = ".profiler-toggle,\n .profiler-mini-panel {\n left: 15px;\n right: auto !important;\n }", document.head.appendChild(t);
3099
- let n = new Dn();
3163
+ let n = new Nn();
3100
3164
  this.renderer.inspector = n, this._domHelper.element?.appendChild(n.domElement), this.addDebugGUI(n, e), this.qualityManager.addGUI(n, e);
3101
3165
  let r = n.createParameters("Render Pass Settings");
3102
3166
  for (let t of this.renderPasses.values()) t.addParametersToGUI(r, e);
@@ -3110,6 +3174,9 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
3110
3174
  Direct: "direct lighting only",
3111
3175
  Ao: "ao only",
3112
3176
  Gi: "gi only",
3177
+ DenoisedAo: "denoised ao only",
3178
+ DenoisedGi: "denoised gi only",
3179
+ WithoutDenoise: "without denoise",
3113
3180
  NoFog: "no fog",
3114
3181
  Depth: "depth"
3115
3182
  }).onChange((e) => {
@@ -3120,7 +3187,7 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
3120
3187
  }
3121
3188
  applyToneMappingConfig() {
3122
3189
  let { toneMapping: e, toneMappingExposure: t } = this._initData.webGpuConfig;
3123
- this.renderer.toneMapping = er[e], this.renderer.toneMappingExposure = t;
3190
+ this.renderer.toneMapping = ur[e], this.renderer.toneMappingExposure = t;
3124
3191
  }
3125
3192
  addToneMappingSettings(e, t) {
3126
3193
  let n = e.addFolder("Tone Mapping"), r = {
@@ -3143,7 +3210,7 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
3143
3210
  }
3144
3211
  getOrCreateGUIParameters(e) {
3145
3212
  let t = this.renderer.inspector;
3146
- if (t instanceof Dn) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
3213
+ if (t instanceof Nn) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
3147
3214
  throw Error("Inspector GUI is not initialized. Call showGUI() before creating parameter groups.");
3148
3215
  }
3149
3216
  createAndCacheGUIParameters(e, t) {
@@ -3151,8 +3218,8 @@ var Un = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Hn(t + 1, 2), Hn(
3151
3218
  return this.guiParameterGroups.set(t, n), n;
3152
3219
  }
3153
3220
  };
3154
- de([ue, le("design:type", Object)], tr.prototype, "_domHelper", void 0), de([ue, le("design:type", Object)], tr.prototype, "_webGpuGroundShadowReflection", void 0), de([ue, le("design:type", Object)], tr.prototype, "_initData", void 0);
3221
+ _e([ge, he("design:type", Object)], dr.prototype, "_domHelper", void 0), _e([ge, he("design:type", Object)], dr.prototype, "_webGpuGroundShadowReflection", void 0), _e([ge, he("design:type", Object)], dr.prototype, "_initData", void 0);
3155
3222
  //#endregion
3156
- export { tr as RoomleWebGPURenderer };
3223
+ export { dr as RoomleWebGPURenderer };
3157
3224
 
3158
- //# sourceMappingURL=roomle-webgpu-renderer-Dzuy_Y39.mjs.map
3225
+ //# sourceMappingURL=roomle-webgpu-renderer-Lt55gNj5.mjs.map