@roomle/web-sdk 3.10.0-alpha.2 → 3.10.0-alpha.4

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 (122) hide show
  1. package/lib/{BufferGeometry-Dxcf7n9V.mjs → BufferGeometry-Dj5loCTL.mjs} +2 -2
  2. package/lib/{BufferGeometry-Dxcf7n9V.mjs.map → BufferGeometry-Dj5loCTL.mjs.map} +1 -1
  3. package/lib/ConfiguratorKernel.wasm +0 -0
  4. package/lib/{GLTFExporter-kpv1e-Ks.mjs → GLTFExporter-CquK-kkI.mjs} +1 -1
  5. package/lib/{GLTFExporter-kpv1e-Ks.mjs.map → GLTFExporter-CquK-kkI.mjs.map} +1 -1
  6. package/lib/{GaussianBlurNode-CMVlBe39.mjs → GaussianBlurNode-CDYPio-x.mjs} +3 -3
  7. package/lib/{GaussianBlurNode-CMVlBe39.mjs.map → GaussianBlurNode-CDYPio-x.mjs.map} +1 -1
  8. package/lib/{Object3D-BZaiqQIE.mjs → Object3D-YXSPdGeJ.mjs} +1 -1
  9. package/lib/{Object3D-BZaiqQIE.mjs.map → Object3D-YXSPdGeJ.mjs.map} +1 -1
  10. package/lib/{PointLightHelper-fzRB58rC.mjs → PointLightHelper-g98giMRd.mjs} +4 -4
  11. package/lib/{PointLightHelper-fzRB58rC.mjs.map → PointLightHelper-g98giMRd.mjs.map} +1 -1
  12. package/lib/RoomleCore.wasm +0 -0
  13. package/lib/RoomleToolsCore.wasm +0 -0
  14. package/lib/{SpotLightHelper-D5UFwRPb.mjs → SpotLightHelper-xR8lCZau.mjs} +3 -3
  15. package/lib/{SpotLightHelper-D5UFwRPb.mjs.map → SpotLightHelper-xR8lCZau.mjs.map} +1 -1
  16. package/lib/{USDZExporter-Y0SSGr5_.mjs → USDZExporter-BMqBymZI.mjs} +2 -2
  17. package/lib/{USDZExporter-Y0SSGr5_.mjs.map → USDZExporter-BMqBymZI.mjs.map} +1 -1
  18. package/lib/{Vector4-BfZH1ecw.mjs → Vector4-CqzXUndP.mjs} +2 -2
  19. package/lib/{Vector4-BfZH1ecw.mjs.map → Vector4-CqzXUndP.mjs.map} +1 -1
  20. package/lib/{api-BXU3pZnX.mjs → api-ckpzIPty.mjs} +2 -2
  21. package/lib/{api-BXU3pZnX.mjs.map → api-ckpzIPty.mjs.map} +1 -1
  22. package/lib/{asset-loader.worker-C911tbNL.mjs → asset-loader.worker-CHyN7JB1.mjs} +1 -1
  23. package/lib/asset-loader.worker-CHyN7JB1.mjs.map +1 -0
  24. package/lib/{banana-for-scale-B_LIHI9q.mjs → banana-for-scale-Cs2s9dNp.mjs} +3 -3
  25. package/lib/{banana-for-scale-B_LIHI9q.mjs.map → banana-for-scale-Cs2s9dNp.mjs.map} +1 -1
  26. package/lib/{budgeteer.sw-D3VxiASa.mjs → budgeteer.sw-BCLEIWCW.mjs} +1 -1
  27. package/lib/budgeteer.sw-BCLEIWCW.mjs.map +1 -0
  28. package/lib/{common-utils-B9PC_rvS.mjs → common-utils-DMk5jc_R.mjs} +1 -1
  29. package/lib/{common-utils-B9PC_rvS.mjs.map → common-utils-DMk5jc_R.mjs.map} +1 -1
  30. package/lib/{component-dimensioning-5iIw1f_3.mjs → component-dimensioning-DcmDM6gV.mjs} +6 -6
  31. package/lib/{component-dimensioning-5iIw1f_3.mjs.map → component-dimensioning-DcmDM6gV.mjs.map} +1 -1
  32. package/lib/{component-raycast-helper-O27_buEg.mjs → component-raycast-helper-CXN2MHtG.mjs} +4 -4
  33. package/lib/{component-raycast-helper-O27_buEg.mjs.map → component-raycast-helper-CXN2MHtG.mjs.map} +1 -1
  34. package/lib/{configurator-BwxEIDv7.mjs → configurator-D6lTTIlU.mjs} +4 -4
  35. package/lib/{configurator-BwxEIDv7.mjs.map → configurator-D6lTTIlU.mjs.map} +1 -1
  36. package/lib/configurator-DZotRC5_.mjs +2 -0
  37. package/lib/{continuous-drawing-helper-D25YPUle.mjs → continuous-drawing-helper-BlGATN0C.mjs} +2 -2
  38. package/lib/{continuous-drawing-helper-D25YPUle.mjs.map → continuous-drawing-helper-BlGATN0C.mjs.map} +1 -1
  39. package/lib/{dat.gui.module-CZ-DIWHM.mjs → dat.gui.module-BLjoST8r.mjs} +1 -1
  40. package/lib/{dat.gui.module-CZ-DIWHM.mjs.map → dat.gui.module-BLjoST8r.mjs.map} +1 -1
  41. package/lib/{decorate-C9r0zXzz.mjs → decorate-CTUwswpM.mjs} +1 -1
  42. package/lib/{decorate-C9r0zXzz.mjs.map → decorate-CTUwswpM.mjs.map} +1 -1
  43. package/lib/dimensioning-helper-BwBj5QDM.mjs +2 -0
  44. package/lib/{dimensioning-helper-d6JA4UMr.mjs → dimensioning-helper-DMop5qcu.mjs} +4 -4
  45. package/lib/{dimensioning-helper-d6JA4UMr.mjs.map → dimensioning-helper-DMop5qcu.mjs.map} +1 -1
  46. package/lib/dist-DGov-RNo.mjs +438 -0
  47. package/lib/dist-DGov-RNo.mjs.map +1 -0
  48. package/lib/{fflate.module-CBz7CLOg.mjs → fflate.module-n0Jozp8Z.mjs} +1 -1
  49. package/lib/{fflate.module-CBz7CLOg.mjs.map → fflate.module-n0Jozp8Z.mjs.map} +1 -1
  50. package/lib/{glb-viewer-C0Et5SO6.mjs → glb-viewer-CuRDCxVq.mjs} +6 -6
  51. package/lib/{glb-viewer-C0Et5SO6.mjs.map → glb-viewer-CuRDCxVq.mjs.map} +1 -1
  52. package/lib/glb-viewer-DKWeC8wq.mjs +2 -0
  53. package/lib/{highlight-coordinator-DdQ8yNjO.mjs → highlight-coordinator-CTZ_qcde.mjs} +2 -2
  54. package/lib/{highlight-coordinator-DdQ8yNjO.mjs.map → highlight-coordinator-CTZ_qcde.mjs.map} +1 -1
  55. package/lib/{homag-intelligence-DrKayEjK.mjs → homag-intelligence-CIBPifJk.mjs} +3 -3
  56. package/lib/{homag-intelligence-DrKayEjK.mjs.map → homag-intelligence-CIBPifJk.mjs.map} +1 -1
  57. package/lib/{imos-ix-poc-export-helper-DU0ag-Lw.mjs → imos-ix-poc-export-helper-D2KaQu_v.mjs} +3 -3
  58. package/lib/{imos-ix-poc-export-helper-DU0ag-Lw.mjs.map → imos-ix-poc-export-helper-D2KaQu_v.mjs.map} +1 -1
  59. package/lib/{kernel-utils-Cj5B4fDD.mjs → kernel-utils-042AuCQh.mjs} +1 -1
  60. package/lib/{kernel-utils-Cj5B4fDD.mjs.map → kernel-utils-042AuCQh.mjs.map} +1 -1
  61. package/lib/{layer-C_JtkhdO.mjs → layer-CFAr2mK_.mjs} +1 -1
  62. package/lib/{layer-C_JtkhdO.mjs.map → layer-CFAr2mK_.mjs.map} +1 -1
  63. package/lib/{main-D2BulNeN.mjs → main-KSs3XdXO.mjs} +21603 -22104
  64. package/lib/main-KSs3XdXO.mjs.map +1 -0
  65. package/lib/{material-viewer-CZQwo8Nc.mjs → material-viewer-Ced_pruD.mjs} +6 -6
  66. package/lib/{material-viewer-CZQwo8Nc.mjs.map → material-viewer-Ced_pruD.mjs.map} +1 -1
  67. package/lib/packages-oEzg5zoT.mjs +4 -0
  68. package/lib/planner-QF8IrfPz.mjs +2 -0
  69. package/lib/{planner-OgIPgZ1m.mjs → planner-ykpwnVZa.mjs} +3 -3
  70. package/lib/{planner-OgIPgZ1m.mjs.map → planner-ykpwnVZa.mjs.map} +1 -1
  71. package/lib/{plugin-system-DlME_5b_.mjs → plugin-system-DRpL0Rer.mjs} +3 -3
  72. package/lib/{plugin-system-DlME_5b_.mjs.map → plugin-system-DRpL0Rer.mjs.map} +1 -1
  73. package/lib/rolldown-runtime-DgwB9i60.mjs +13 -0
  74. package/lib/{roomle-headless-setup-CMK-quZI.mjs → roomle-headless-setup-Cc8EAnVe.mjs} +1 -1
  75. package/lib/{roomle-headless-setup-CMK-quZI.mjs.map → roomle-headless-setup-Cc8EAnVe.mjs.map} +1 -1
  76. package/lib/roomle-headless.d.ts +69 -29
  77. package/lib/roomle-headless.js +9 -9
  78. package/lib/{roomle-renderer-DYQvV88j.mjs → roomle-renderer-BD3ZmpLS.mjs} +23 -5
  79. package/lib/roomle-renderer-BD3ZmpLS.mjs.map +1 -0
  80. package/lib/roomle-sdk.d.ts +69 -29
  81. package/lib/roomle-sdk.js +7 -7
  82. package/lib/{roomle-webgpu-renderer-5-aG3CMs.mjs → roomle-webgpu-renderer-NhCn2iM-.mjs} +386 -240
  83. package/lib/roomle-webgpu-renderer-NhCn2iM-.mjs.map +1 -0
  84. package/lib/{scene-renderer-DvXjoKHZ.mjs → scene-renderer-DbHi1plp.mjs} +367 -1467
  85. package/lib/scene-renderer-DbHi1plp.mjs.map +1 -0
  86. package/lib/{script-loader-CScqyQhc.mjs → script-loader-DKx7ZvkP.mjs} +3 -3
  87. package/lib/{script-loader-CScqyQhc.mjs.map → script-loader-DKx7ZvkP.mjs.map} +1 -1
  88. package/lib/shading-settings-BWeccIZv.mjs +1108 -0
  89. package/lib/shading-settings-BWeccIZv.mjs.map +1 -0
  90. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  91. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  92. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  93. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  94. package/lib/{stats-helper-BYi5TI_H.mjs → stats-helper-Bs79UZne.mjs} +4 -4
  95. package/lib/{stats-helper-BYi5TI_H.mjs.map → stats-helper-Bs79UZne.mjs.map} +1 -1
  96. package/lib/{three.tsl-S0OKwamA.mjs → three.tsl-Bb8l7rD7.mjs} +1 -1
  97. package/lib/{three.tsl-CAEdYyg3.mjs → three.tsl-Caqi2VRr.mjs} +2 -2
  98. package/lib/{three.tsl-CAEdYyg3.mjs.map → three.tsl-Caqi2VRr.mjs.map} +1 -1
  99. package/lib/{three.webgpu-CkP2nkXM.mjs → three.webgpu-CT4fuV2X.mjs} +1 -1
  100. package/lib/{three.webgpu-CkP2nkXM.mjs.map → three.webgpu-CT4fuV2X.mjs.map} +1 -1
  101. package/lib/{three.webgpu-qrxDA_v0.mjs → three.webgpu-CxNhl3k-.mjs} +1 -1
  102. package/lib/{threejs-utils-C4J_TZ0o.mjs → threejs-utils-E4yVZATI.mjs} +4 -4
  103. package/lib/threejs-utils-E4yVZATI.mjs.map +1 -0
  104. package/lib/{tools-core-BCkbEbim.mjs → tools-core-D4EbqT91.mjs} +3 -3
  105. package/lib/{tools-core-BCkbEbim.mjs.map → tools-core-D4EbqT91.mjs.map} +1 -1
  106. package/lib/workers-Dc-RTL8D.mjs +6 -0
  107. package/lib/{workers-HXGCmmZS.mjs.map → workers-Dc-RTL8D.mjs.map} +1 -1
  108. package/package.json +1 -1
  109. package/lib/asset-loader.worker-C911tbNL.mjs.map +0 -1
  110. package/lib/budgeteer.sw-D3VxiASa.mjs.map +0 -1
  111. package/lib/configurator-BIyxKNI0.mjs +0 -2
  112. package/lib/dimensioning-helper-pPTkh8pl.mjs +0 -2
  113. package/lib/glb-viewer-DfMzLkqg.mjs +0 -2
  114. package/lib/main-D2BulNeN.mjs.map +0 -1
  115. package/lib/packages-BtLLQZLz.mjs +0 -4
  116. package/lib/planner-BF94NrwH.mjs +0 -2
  117. package/lib/rolldown-runtime-BwvMKf85.mjs +0 -23
  118. package/lib/roomle-renderer-DYQvV88j.mjs.map +0 -1
  119. package/lib/roomle-webgpu-renderer-5-aG3CMs.mjs.map +0 -1
  120. package/lib/scene-renderer-DvXjoKHZ.mjs.map +0 -1
  121. package/lib/threejs-utils-C4J_TZ0o.mjs.map +0 -1
  122. package/lib/workers-HXGCmmZS.mjs +0 -6
@@ -1,18 +1,18 @@
1
1
  import { Ar as e, Br as t, Cr as n, En as r, Gn as i, Hi as a, J as o, Jr as s, Kn as c, On as l, Qt as u, Tt as d, Wi as f, Y as p, _i as m, bi as h, ci as g, ct as _, g as v, gi as y, hi as b, hr as x, ht as S, in as C, jr as w, kr as T, mi as ee, mr as te, pi as ne, q as re, rt as E, sn as D, t as ie, vi as ae, w as O, wr as oe, xi as k, yi as se } from "./three.core-tV_4n8Wg.mjs";
2
- import { o as ce, t as le } from "./scene-renderer-DvXjoKHZ.mjs";
3
- import { n as ue, r as de, t as fe } from "./decorate-C9r0zXzz.mjs";
4
- import { n as pe } from "./roomle-renderer-DYQvV88j.mjs";
5
- import { Rt as A, Ut as me, Wn as he, Z as ge, bn as j, fr as _e, jn as ve, kt as ye, lr as be, un as xe, vn as Se, x as Ce } from "./three.webgpu-CkP2nkXM.mjs";
6
- import { A as we, B as Te, C as Ee, Ct as De, D as Oe, E as M, F as N, G as ke, H as Ae, I as je, J as Me, K as Ne, L as Pe, M as Fe, N as Ie, O as Le, P as Re, Q as ze, R as Be, S as Ve, St as He, T as Ue, U as We, V as Ge, W as Ke, Y as qe, Z as Je, _ as Ye, _t as Xe, a as Ze, at as Qe, b as $e, bt as P, c as et, ct as tt, d as nt, dt as rt, et as it, f as at, ft as F, g as ot, h as st, ht as I, i as L, it as ct, j as lt, k as ut, l as R, lt as dt, m as z, mt as B, n as V, nt as ft, o as pt, ot as mt, p as ht, pt as gt, q as _t, r as vt, rt as yt, s as bt, t as xt, tt as St, u as Ct, ut as wt, v as Tt, vt as H, w as U, x as Et, xt as Dt, y as Ot, yt as W, z as kt } from "./three.tsl-CAEdYyg3.mjs";
2
+ import { t as ce } from "./shading-settings-BWeccIZv.mjs";
3
+ import { n as le, r as ue, t as de } from "./decorate-CTUwswpM.mjs";
4
+ import { n as fe, r as pe } from "./roomle-renderer-BD3ZmpLS.mjs";
5
+ import { Rt as A, Ut as me, Wn as he, Z as ge, bn as j, fr as _e, jn as ve, kt as ye, lr as be, un as xe, vn as Se, x as Ce } from "./three.webgpu-CT4fuV2X.mjs";
6
+ import { A as we, B as Te, C as Ee, Ct as De, D as Oe, E as M, F as N, G as ke, H as Ae, I as je, J as Me, K as Ne, L as Pe, M as Fe, N as Ie, O as Le, P as Re, Q as ze, R as Be, S as Ve, St as He, T as Ue, U as We, V as Ge, W as Ke, Y as qe, Z as Je, _ as Ye, _t as Xe, a as Ze, at as Qe, b as $e, bt as P, c as et, ct as tt, d as nt, dt as rt, et as it, f as at, ft as F, g as ot, h as st, ht as I, i as L, it as ct, j as lt, k as ut, l as dt, lt as ft, m as pt, mt as R, n as z, nt as mt, o as ht, ot as gt, p as _t, pt as vt, q as yt, r as bt, rt as xt, s as St, t as Ct, tt as wt, u as Tt, ut as Et, v as Dt, vt as B, w as V, x as Ot, xt as kt, y as At, yt as H, z as jt } from "./three.tsl-Caqi2VRr.mjs";
7
7
  //#region ../../node_modules/three/examples/jsm/tsl/display/OutlineNode.js
8
- var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE__ */ new k(1, 0), Mt = /* @__PURE__ */ new k(0, 1), K, Nt = class extends he {
8
+ var U = /* @__PURE__ */ new xe(), Mt = /* @__PURE__ */ new k(), Nt = /* @__PURE__ */ new k(1, 0), Pt = /* @__PURE__ */ new k(0, 1), W, Ft = class extends he {
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 = M(1), edgeGlow: a = M(0), downSampleRatio: o = 2 } = n;
15
- this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode = Te(i), this.edgeGlowNode = Te(a), this.downSampleRatio = o, this.updateBeforeType = me.FRAME, this._renderTargetDepthBuffer = new w(), this._renderTargetDepthBuffer.depthTexture = new p(), this._renderTargetDepthBuffer.depthTexture.type = _, this._renderTargetMaskBuffer = new w(), this._renderTargetMaskDownSampleBuffer = new w(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new w(1, 1, { depthBuffer: !1 }), this._cameraNear = ze("near", "float", t), this._cameraFar = ze("far", "float", t), this._blurDirection = I(new k()), this._depthTextureUniform = F(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = F(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = F(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = F(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = F(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = F(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = W(1, 0, 0), this._hiddenEdgeColor = W(0, 1, 0), this._depthMaterial = new A(), this._depthMaterial.colorNode = st(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new ve(), this._depthSpriteMaterial.colorNode = st(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new A(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new ve(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new A(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new A(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new A(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new A(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new A(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = Ne(this, this._renderTargetComposite.texture);
15
+ this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode = Te(i), this.edgeGlowNode = Te(a), this.downSampleRatio = o, this.updateBeforeType = me.FRAME, this._renderTargetDepthBuffer = new w(), this._renderTargetDepthBuffer.depthTexture = new p(), this._renderTargetDepthBuffer.depthTexture.type = _, this._renderTargetMaskBuffer = new w(), this._renderTargetMaskDownSampleBuffer = new w(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new w(1, 1, { depthBuffer: !1 }), this._cameraNear = ze("near", "float", t), this._cameraFar = ze("far", "float", t), this._blurDirection = I(new k()), this._depthTextureUniform = F(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = F(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = F(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = F(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = F(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = F(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = H(1, 0, 0), this._hiddenEdgeColor = H(0, 1, 0), this._depthMaterial = new A(), this._depthMaterial.colorNode = st(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new ve(), this._depthSpriteMaterial.colorNode = st(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new A(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new ve(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new A(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new A(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new A(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new A(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new A(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = Ne(this, this._renderTargetComposite.texture);
16
16
  }
17
17
  get visibleEdge() {
18
18
  return this.r;
@@ -31,11 +31,11 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__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 && (K = j.resetRendererState(t, K), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), j.restoreRendererState(t, K), this._lastSelectionCount = 0);
34
+ this._lastSelectionCount > 0 && (W = j.resetRendererState(t, W), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), j.restoreRendererState(t, W), this._lastSelectionCount = 0);
35
35
  return;
36
36
  }
37
- this._lastSelectionCount = this._selectionCache.size, K = j.resetRendererAndSceneState(t, r, K);
38
- let i = t.getDrawingBufferSize(At);
37
+ this._lastSelectionCount = this._selectionCache.size, W = j.resetRendererAndSceneState(t, r, W);
38
+ let i = t.getDrawingBufferSize(Mt);
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,21 +48,21 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__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(K.renderObjectFunction), this._selectionCache.clear(), r.name = a, G.material = this._materialCopy, G.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), G.render(t), G.material = this._edgeDetectionMaterial, G.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), G.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(jt), G.material = this._separableBlurMaterial, G.name = "Outline [ Blur Half Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer1), G.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer1.texture, this._blurDirection.value.copy(Mt), t.setRenderTarget(this._renderTargetEdgeBuffer1), G.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(jt), G.material = this._separableBlurMaterial2, G.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer2), G.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer2.texture, this._blurDirection.value.copy(Mt), t.setRenderTarget(this._renderTargetEdgeBuffer2), G.render(t), G.material = this._compositeMaterial, G.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), G.render(t), j.restoreRendererAndSceneState(t, r, K);
51
+ }), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(W.renderObjectFunction), this._selectionCache.clear(), r.name = a, U.material = this._materialCopy, U.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), U.render(t), U.material = this._edgeDetectionMaterial, U.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), U.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Nt), U.material = this._separableBlurMaterial, U.name = "Outline [ Blur Half Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer1), U.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer1.texture, this._blurDirection.value.copy(Pt), t.setRenderTarget(this._renderTargetEdgeBuffer1), U.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Nt), U.material = this._separableBlurMaterial2, U.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer2), U.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer2.texture, this._blurDirection.value.copy(Pt), t.setRenderTarget(this._renderTargetEdgeBuffer2), U.render(t), U.material = this._compositeMaterial, U.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), U.render(t), j.restoreRendererAndSceneState(t, r, W);
52
52
  }
53
53
  setup() {
54
54
  let e = () => {
55
- let e = this._depthTextureUniform.sample(yt), t;
56
- return t = this.camera.isPerspectiveCamera ? _t(e, this._cameraNear, this._cameraFar) : We(e, this._cameraNear, this._cameraFar), W(0, Me.z.lessThanEqual(t).select(1, 0), 1);
55
+ let e = this._depthTextureUniform.sample(xt), t;
56
+ return t = this.camera.isPerspectiveCamera ? yt(e, this._cameraNear, this._cameraFar) : We(e, this._cameraNear, this._cameraFar), H(0, Me.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
- let t = V(() => {
60
- let e = gt(this._maskTextureDownsSampleUniform), t = H(1).div(e).toVar(), n = P(1, 0, 0, 1).mul(P(t, t)), r = Xe(), 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 = H(kt(i.r.sub(a.r), .5), kt(o.r.sub(s.r), .5)).length();
59
+ let t = z(() => {
60
+ let e = vt(this._maskTextureDownsSampleUniform), t = B(1).div(e).toVar(), n = P(1, 0, 0, 1).mul(P(t, t)), r = Xe(), 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(jt(i.r.sub(a.r), .5), jt(o.r.sub(s.r), .5)).length();
61
61
  return P(je(je(i.g, a.g), je(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]) => M(.39894).mul(Ue(M(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = V(([e]) => {
65
- let t = gt(this._maskTextureDownsSampleUniform), r = H(1).div(t).toVar(), i = Xe(), 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();
64
+ let n = z(([e, t]) => M(.39894).mul(Ue(M(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = z(([e]) => {
65
+ let t = vt(this._maskTextureDownsSampleUniform), r = B(1).div(t).toVar(), i = Xe(), 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
66
  return Ze({
67
67
  start: we(1),
68
68
  end: we(4),
@@ -74,7 +74,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
74
74
  }), s.div(o);
75
75
  });
76
76
  this._separableBlurMaterial.fragmentNode = r(this.edgeThicknessNode), this._separableBlurMaterial.needsUpdate = !0, this._separableBlurMaterial2.fragmentNode = r(4), this._separableBlurMaterial2.needsUpdate = !0;
77
- let i = V(() => {
77
+ let i = z(() => {
78
78
  let e = this._edge1TextureUniform, t = this._edge2TextureUniform, n = this._maskTextureUniform, r = e.add(t.mul(this.edgeGlowNode));
79
79
  return n.r.mul(r);
80
80
  });
@@ -88,7 +88,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
88
88
  (e.isMesh || e.isSprite) && this._selectionCache.add(e);
89
89
  });
90
90
  }
91
- }, Pt = (e, t, n) => new Nt(e, t, n), Ft = class {}, It = class e extends Ft {
91
+ }, It = (e, t, n) => new Ft(e, t, n), Lt = class {}, Rt = class e extends Lt {
92
92
  static {
93
93
  this.passId = "OutlineRenderPass";
94
94
  }
@@ -102,7 +102,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
102
102
  this.visibleEdgeColor.value = new O(e), this.hiddenEdgeColor.value = new O(t);
103
103
  }
104
104
  assemble(e, t, n, r, i) {
105
- let { visibleEdge: a, hiddenEdge: o } = Pt(n, r, {
105
+ let { visibleEdge: a, hiddenEdge: o } = It(n, r, {
106
106
  selectedObjects: this.selectedObjects,
107
107
  edgeThickness: this.edgeThickness,
108
108
  edgeGlow: this.edgeGlow
@@ -117,20 +117,20 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
117
117
  this.hiddenEdgeColor.value.set(e), n();
118
118
  });
119
119
  }
120
- }, Lt = class {
120
+ }, zt = 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
- }, Rt = class extends Lt {
124
+ }, Bt = class extends zt {
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
- }, zt = class extends Lt {
129
+ }, Vt = class extends zt {
130
130
  constructor(e, t) {
131
131
  super(e, t.name), this.computeNode = t, this.isComputeStats = !0;
132
132
  }
133
- }, Bt = class extends ge {
133
+ }, Ht = class extends ge {
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.isRendererInspector = !0;
136
136
  }
@@ -219,7 +219,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
219
219
  beginCompute(e, t) {
220
220
  let n = this.getFrame();
221
221
  if (!n) return;
222
- let r = new zt(e, t);
222
+ let r = new Vt(e, t);
223
223
  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;
224
224
  }
225
225
  finishCompute() {
@@ -230,7 +230,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
230
230
  beginRender(e, t, n, r) {
231
231
  let i = this.getFrame();
232
232
  if (!i) return;
233
- let a = new Rt(e, t, n, r);
233
+ let a = new Bt(e, t, n, r);
234
234
  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;
235
235
  }
236
236
  finishRender() {
@@ -238,15 +238,15 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
238
238
  let e = this.currentRender;
239
239
  e.cpu = performance.now() - e.timestamp, this.currentRender = e.parent;
240
240
  }
241
- }, Vt = class {
241
+ }, Ut = class {
242
242
  static init() {
243
243
  if (document.getElementById("profiler-styles")) return;
244
244
  let e = document.createElement("style");
245
245
  e.id = "profiler-styles", e.textContent = "\n:root {\n --profiler-bg: #1e1e24f5;\n --profiler-header-bg: #2a2a33aa;\n --profiler-header: #2a2a33;\n --profiler-border: #4a4a5a;\n --text-primary: #e0e0e0;\n --text-secondary: #9a9aab;\n --accent-color: #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: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n --font-mono: 'Fira Code', 'Courier New', Courier, monospace;\n}\n\n@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Fira+Code&display=swap');\n\n#profiler-panel *, #profiler-toggle * {\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}\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.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(--accent-color);\n}\n\n#profiler-toggle.panel-open #toggle-icon {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--accent-color);\n}\n\n#toggle-icon {\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#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 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 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(--accent-color);\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(--accent-color);\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-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#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.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/* 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(--accent-color);\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}\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-bg);\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-bg);\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% - 134px);\n height: 38px;\n user-select: none;\n -webkit-user-select: none;\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% - 134px);\n}\n\n#profiler-panel.position-bottom .profiler-header,\n#profiler-panel.position-top .profiler-header {\n width: calc(100% - 134px);\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% - 90px);\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: 38px !important;\n min-height: 38px !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: 38px;\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: 45px !important;\n min-width: 45px !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: 45px;\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}\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: 45px !important;\n min-width: 45px !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 width: 8px;\n height: 8px;\n}\n\n.profiler-header::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.profiler-header::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.profiler-header::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.profiler-header::-webkit-scrollbar-corner {\n background: 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}\n\n.profiler-tabs:active {\n cursor: grabbing;\n}\n\n.profiler-tabs::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.profiler-tabs::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.profiler-tabs::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.profiler-tabs::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.profiler-tabs::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n.profiler-controls {\n display: flex;\n position: absolute;\n right: 0;\n top: 0;\n height: 38px;\n background: var(--profiler-header-bg);\n border-bottom: 1px solid var(--profiler-border);\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: 8px 18px;\n cursor: default;\n display: flex;\n align-items: center;\n font-family: var(--font-family);\n font-weight: 600;\n font-size: 14px;\n user-select: none;\n transition: opacity 0.2s, transform 0.2s;\n touch-action: pan-x;\n}\n\n.tab-btn.active {\n border-bottom: 2px solid var(--accent-color);\n color: white;\n}\n\n.tab-btn.active::before {\n content: '⋮⋮';\n position: absolute;\n left: 3px;\n top: calc(50% - .1rem);\n transform: translateY(-50%);\n color: var(--profiler-border);\n font-size: 18px;\n letter-spacing: -2px;\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: 45px;\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.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.profiler-content::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.profiler-content::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.profiler-content::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.profiler-content::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.profiler-content::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n.profiler-content {\n scrollbar-width: thin; /* \"auto\" | \"thin\" */\n scrollbar-color: rgba(0, 0, 0, 0.25) transparent;\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: 31px;\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: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(--accent-color);\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 line-height: 1;\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 {\n width: 100%;\n height: 80px;\n background-color: var(--profiler-header);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n}\n\n.graph-path {\n stroke-width: 2;\n fill-opacity: 0.4;\n}\n\n.console-header {\n padding: 10px;\n border-bottom: 1px solid var(--profiler-border);\n display: flex;\n gap: 20px;\n flex-shrink: 0;\n align-items: center;\n justify-content: space-between;\n}\n\n.console-buttons-group {\n display: flex;\n gap: 20px;\n}\n\n.console-filter-input {\n background-color: var(--profiler-bg);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 8px;\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 padding: 2px 5px;\n white-space: pre-wrap;\n word-break: break-all;\n border-radius: 3px;\n line-height: 1.5 !important;\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-bg);\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(--accent-color);\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}\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(--accent-color);\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 .checkmark::after {\n content: '';\n width: 6px;\n height: 6px;\n background-color: var(--accent-color);\n border-radius: 1px;\n display: block;\n transform: scale(0);\n transition: transform 0.2s;\n}\n\n.custom-checkbox input:checked+.checkmark {\n border-color: var(--accent-color);\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-bg);\n border: 1px solid var(--accent-color);\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-bg);\n border: 2px solid var(--accent-color);\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.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@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(--accent-color);\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-bg);\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}\n\n#profiler-panel:not(.visible) ~ * .detached-tab-panel,\nbody:has(#profiler-panel:not(.visible)) .detached-tab-panel {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.detached-tab-header {\n background: var(--profiler-header-bg);\n padding: 0 7px 0 15px;\n font-family: var(--font-family);\n font-size: 14px;\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: 38px;\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(--accent-color);\n}\n\n.detached-tab-content {\n flex: 1;\n overflow: auto;\n position: relative;\n background: var(--profiler-bg);\n}\n\n.detached-tab-content::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.detached-tab-content::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.detached-tab-content::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.detached-tab-content::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.detached-tab-content::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n.detached-tab-content .profiler-content {\n display: block !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(--accent-color);\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", document.head.appendChild(e);
246
246
  }
247
- }, Ht = class extends E {
247
+ }, Wt = class extends E {
248
248
  constructor(e) {
249
- 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, Vt.init(), this.setupShell(), this.setupResizing(), this.setupWindowResizeListener(), this.setupOrientationListener();
249
+ 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, Ut.init(), this.setupShell(), this.setupResizing(), this.setupWindowResizeListener(), this.setupOrientationListener();
250
250
  }
251
251
  getSize() {
252
252
  return this.panel.classList.contains("visible") === !1 || this.panel.classList.contains("no-tabs") ? {
@@ -604,7 +604,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
604
604
  });
605
605
  });
606
606
  try {
607
- yn("layout", e);
607
+ xn("layout", e);
608
608
  } catch (e) {
609
609
  console.warn("Failed to save profiler layout:", e);
610
610
  }
@@ -612,7 +612,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
612
612
  loadLayout() {
613
613
  this.isLoadingLayout = !0;
614
614
  try {
615
- let e = vn("layout");
615
+ let e = bn("layout");
616
616
  if (Object.keys(e).length === 0) return;
617
617
  if (e.detachedTabs && e.detachedTabs.length > 0) {
618
618
  let t = window.innerWidth, n = window.innerHeight;
@@ -659,7 +659,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
659
659
  this.updatePanelSize();
660
660
  }
661
661
  }
662
- }, q = class extends E {
662
+ }, G = class extends E {
663
663
  constructor(e, t = {}) {
664
664
  super(), this.id = e.toLowerCase(), this.button = document.createElement("button"), this.button.className = "tab-btn", this.button.textContent = e, this.content = document.createElement("div"), this.content.id = `${this.id}-content`, this.content.className = "profiler-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;
665
665
  }
@@ -699,7 +699,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
699
699
  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"));
700
700
  }
701
701
  }
702
- }, Ut = class {
702
+ }, Gt = class {
703
703
  constructor(...e) {
704
704
  this.headers = e, this.children = [], this.domElement = document.createElement("div"), this.domElement.className = "list-container", this.domElement.style.padding = "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);
705
705
  let t = document.createElement("div");
@@ -723,7 +723,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
723
723
  let t = this.children.indexOf(e);
724
724
  return t !== -1 && (this.children.splice(t, 1), this.domElement.removeChild(e.domElement), e.parent = null), this;
725
725
  }
726
- }, Wt = class {
726
+ }, Kt = class {
727
727
  constructor(e = 512) {
728
728
  this.maxPoints = e, this.lines = {}, this.limit = 0, this.limitIndex = 0, this.domElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this.domElement.setAttribute("class", "graph-svg");
729
729
  }
@@ -758,7 +758,7 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
758
758
  }
759
759
  this.limitIndex++ > this.maxPoints && this.resetLimit();
760
760
  }
761
- }, J = class {
761
+ }, K = class {
762
762
  constructor(...e) {
763
763
  this.children = [], this.isOpen = !0, this.childrenContainer = null, this.parent = null, this.domElement = document.createElement("div"), this.domElement.className = "list-item-wrapper", this.itemRow = document.createElement("div"), this.itemRow.className = "list-item-row", this.userData = {}, this.data = e, this.data.forEach((e) => {
764
764
  let t = document.createElement("div");
@@ -788,15 +788,15 @@ var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE_
788
788
  };
789
789
  //#endregion
790
790
  //#region ../../node_modules/three/examples/jsm/inspector/ui/utils.js
791
- function Y(e = null) {
791
+ function q(e = null) {
792
792
  let t = document.createElement("span");
793
793
  return t.className = "value", e !== null && (t.id = e), t;
794
794
  }
795
- function X(e, t) {
795
+ function J(e, t) {
796
796
  let n = e instanceof HTMLElement ? e : document.getElementById(e);
797
797
  n && n.textContent !== t && (n.textContent = t);
798
798
  }
799
- function Gt(e) {
799
+ function qt(e) {
800
800
  let t = e.lastIndexOf("/");
801
801
  return t === -1 ? {
802
802
  path: "",
@@ -806,10 +806,10 @@ function Gt(e) {
806
806
  name: e.substring(t + 1).trim()
807
807
  };
808
808
  }
809
- function Kt(e) {
809
+ function Jt(e) {
810
810
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
811
811
  }
812
- function Z(e, t = 2) {
812
+ function Y(e, t = 2) {
813
813
  if (e === 0) return "0 Bytes";
814
814
  let n = 1024, r = t < 0 ? 0 : t, i = [
815
815
  "Bytes",
@@ -826,36 +826,36 @@ function Z(e, t = 2) {
826
826
  }
827
827
  //#endregion
828
828
  //#region ../../node_modules/three/examples/jsm/inspector/tabs/Performance.js
829
- var qt = class extends q {
829
+ var Yt = class extends G {
830
830
  constructor(e = {}) {
831
831
  super("Performance", e);
832
- let t = new Ut("Name", "CPU", "GPU", "Total");
832
+ let t = new Gt("Name", "CPU", "GPU", "Total");
833
833
  t.setGridStyle("minmax(200px, 2fr) 80px 80px 80px"), t.domElement.style.minWidth = "600px";
834
834
  let n = document.createElement("div");
835
835
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
836
836
  let r = document.createElement("div");
837
837
  r.className = "graph-container";
838
- let i = new Wt();
838
+ let i = new Kt();
839
839
  i.addLine("fps", "var( --color-fps )"), r.append(i.domElement);
840
- let a = new J("Graph Stats", Y(), Y(), Y("graph-fps-counter"));
840
+ let a = new K("Graph Stats", q(), q(), q("graph-fps-counter"));
841
841
  t.add(a);
842
- let o = new J(r);
842
+ let o = new K(r);
843
843
  o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o);
844
- let s = new J("Frame Stats", Y(), Y(), Y());
844
+ let s = new K("Frame Stats", q(), q(), q());
845
845
  t.add(s);
846
- let c = new J("Miscellaneous & Idle", Y(), Y(), Y());
846
+ let c = new K("Miscellaneous & Idle", q(), q(), q());
847
847
  c.domElement.firstChild.style.backgroundColor = "#00ff0b1a", c.domElement.firstChild.classList.add("no-hover"), s.add(c), this.notInUse = /* @__PURE__ */ new Map(), this.frameStats = s, this.graphStats = a, this.graph = i, this.miscellaneous = c, this.currentRender = null, this.currentItem = null, this.frameItems = /* @__PURE__ */ new Map();
848
848
  }
849
849
  resolveStats(e, t) {
850
850
  let n = e.getStatsData(t.cid), r = n.item;
851
- if (r === void 0) r = new J(Y(), Y(), Y(), Y()), t.name ? t.isComputeStats === !0 && (t.name = `${t.name} [ Compute ]`) : t.name = `Unnamed ${t.cid}`, r.userData.name = t.name, this.currentItem.add(r), n.item = r;
851
+ if (r === void 0) r = new K(q(), q(), q(), q()), t.name ? t.isComputeStats === !0 && (t.name = `${t.name} [ Compute ]`) : t.name = `Unnamed ${t.cid}`, r.userData.name = t.name, this.currentItem.add(r), n.item = r;
852
852
  else {
853
853
  r.userData.name = t.name, this.notInUse.has(t.cid) && (r.domElement.firstElementChild.classList.remove("alert"), this.notInUse.delete(t.cid));
854
854
  let e = t.parent.children.indexOf(t);
855
855
  (r.parent === null || r.parent.children.indexOf(r) !== e) && this.currentItem.add(r, e);
856
856
  }
857
857
  let i = r.userData.name;
858
- t.isComputeStats && (i += " [ Compute ]"), X(r.data[0], i), X(r.data[1], n.cpu.toFixed(2)), X(r.data[2], t.gpuNotAvailable === !0 ? "-" : n.gpu.toFixed(2)), X(r.data[3], n.total.toFixed(2));
858
+ t.isComputeStats && (i += " [ Compute ]"), J(r.data[0], i), J(r.data[1], n.cpu.toFixed(2)), J(r.data[2], t.gpuNotAvailable === !0 ? "-" : n.gpu.toFixed(2)), J(r.data[3], n.total.toFixed(2));
859
859
  let a = this.currentItem;
860
860
  this.currentItem = r;
861
861
  for (let n of t.children) this.resolveStats(e, n);
@@ -874,7 +874,7 @@ var qt = class extends q {
874
874
  let { item: t, time: n } = this.notInUse.get(e), r = performance.now(), i = 5 - Math.floor((r - n) / 1e3);
875
875
  if (i >= 0) {
876
876
  let e = "*".repeat(Math.max(0, i));
877
- X(t.domElement.querySelector(".list-item-cell .value"), t.userData.name + " (not in use) " + e);
877
+ J(t.domElement.querySelector(".list-item-cell .value"), t.userData.name + " (not in use) " + e);
878
878
  } else t.domElement.firstElementChild.classList.remove("alert"), t.parent.remove(t), this.notInUse.delete(e);
879
879
  }
880
880
  updateText(e, t) {
@@ -883,23 +883,23 @@ var qt = class extends q {
883
883
  for (let n of t.children) this.resolveStats(e, n);
884
884
  for (let [e, t] of n) this.frameItems.has(e) || (this.addNotInUse(e, t), n.delete(e));
885
885
  for (let e of this.notInUse.keys()) this.updateNotInUse(e);
886
- X("graph-fps-counter", e.fps.toFixed() + " FPS"), X(this.frameStats.data[1], t.cpu.toFixed(2)), X(this.frameStats.data[2], t.gpu.toFixed(2)), X(this.frameStats.data[3], t.total.toFixed(2)), X(this.miscellaneous.data[1], t.miscellaneous.toFixed(2)), X(this.miscellaneous.data[2], "-"), X(this.miscellaneous.data[3], t.miscellaneous.toFixed(2)), this.currentItem = null;
886
+ J("graph-fps-counter", e.fps.toFixed() + " FPS"), J(this.frameStats.data[1], t.cpu.toFixed(2)), J(this.frameStats.data[2], 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;
887
887
  }
888
- }, Jt = class extends q {
888
+ }, Xt = class extends G {
889
889
  constructor(e = {}) {
890
890
  super("Memory", e);
891
- let t = new Ut("Name", "Count", "Size");
891
+ let t = new Gt("Name", "Count", "Size");
892
892
  t.setGridStyle("minmax(200px, 2fr) 60px 100px"), t.domElement.style.minWidth = "300px";
893
893
  let n = document.createElement("div");
894
894
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
895
895
  let r = document.createElement("div");
896
896
  r.className = "graph-container";
897
- let i = new Wt();
897
+ let i = new Kt();
898
898
  i.addLine("total", "var( --color-yellow )"), r.append(i.domElement);
899
- let a = new J("Graph Stats", "", "");
899
+ let a = new K("Graph Stats", "", "");
900
900
  t.add(a);
901
- let o = new J(r);
902
- o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o), this.memoryStats = new J("Renderer Info", "", Y()), this.memoryStats.domElement.firstChild.classList.add("no-hover"), t.add(this.memoryStats), this.attributes = new J("Attributes", Y(), Y()), this.memoryStats.add(this.attributes), this.geometries = new J("Geometries", Y(), "N/A"), this.memoryStats.add(this.geometries), this.indexAttributes = new J("Index Attributes", Y(), Y()), this.memoryStats.add(this.indexAttributes), this.indirectStorageAttributes = new J("Indirect Storage Attributes", Y(), Y()), this.memoryStats.add(this.indirectStorageAttributes), this.programs = new J("Programs", Y(), Y()), this.memoryStats.add(this.programs), this.readbackBuffers = new J("Readback Buffers", Y(), Y()), this.memoryStats.add(this.readbackBuffers), this.renderTargets = new J("Render Targets", Y(), "N/A"), this.memoryStats.add(this.renderTargets), this.storageAttributes = new J("Storage Attributes", Y(), Y()), this.memoryStats.add(this.storageAttributes), this.textures = new J("Textures", Y(), Y()), this.memoryStats.add(this.textures), this.graph = i;
901
+ let o = new K(r);
902
+ o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o), this.memoryStats = new K("Renderer Info", "", q()), this.memoryStats.domElement.firstChild.classList.add("no-hover"), t.add(this.memoryStats), this.attributes = new K("Attributes", q(), q()), this.memoryStats.add(this.attributes), this.geometries = new K("Geometries", q(), "N/A"), this.memoryStats.add(this.geometries), this.indexAttributes = new K("Index Attributes", q(), q()), this.memoryStats.add(this.indexAttributes), this.indirectStorageAttributes = new K("Indirect Storage Attributes", q(), q()), this.memoryStats.add(this.indirectStorageAttributes), this.programs = new K("Programs", q(), q()), this.memoryStats.add(this.programs), this.readbackBuffers = new K("Readback Buffers", q(), q()), this.memoryStats.add(this.readbackBuffers), this.renderTargets = new K("Render Targets", q(), "N/A"), this.memoryStats.add(this.renderTargets), this.storageAttributes = new K("Storage Attributes", q(), q()), this.memoryStats.add(this.storageAttributes), this.textures = new K("Textures", q(), q()), this.memoryStats.add(this.textures), this.graph = i;
903
903
  }
904
904
  updateGraph(e) {
905
905
  let t = e.getRenderer();
@@ -911,9 +911,9 @@ var qt = class extends q {
911
911
  let t = e.getRenderer();
912
912
  if (!t) return;
913
913
  let n = t.info.memory;
914
- X(this.memoryStats.data[2], Z(n.total)), X(this.attributes.data[1], n.attributes.toString()), X(this.attributes.data[2], Z(n.attributesSize)), X(this.geometries.data[1], n.geometries.toString()), X(this.indexAttributes.data[1], n.indexAttributes.toString()), X(this.indexAttributes.data[2], Z(n.indexAttributesSize)), X(this.indirectStorageAttributes.data[1], n.indirectStorageAttributes.toString()), X(this.indirectStorageAttributes.data[2], Z(n.indirectStorageAttributesSize)), X(this.programs.data[1], n.programs.toString()), X(this.programs.data[2], Z(n.programsSize)), X(this.readbackBuffers.data[1], n.readbackBuffers.toString()), X(this.readbackBuffers.data[2], Z(n.readbackBuffersSize)), X(this.renderTargets.data[1], n.renderTargets.toString()), X(this.storageAttributes.data[1], n.storageAttributes.toString()), X(this.storageAttributes.data[2], Z(n.storageAttributesSize)), X(this.textures.data[1], n.textures.toString()), X(this.textures.data[2], Z(n.texturesSize));
914
+ 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));
915
915
  }
916
- }, Yt = class extends q {
916
+ }, Zt = class extends G {
917
917
  constructor(e = {}) {
918
918
  super("Console", e), this.filters = {
919
919
  info: !0,
@@ -984,7 +984,7 @@ var qt = class extends q {
984
984
  let r = this.filters[e], i = t.toLowerCase().includes(this.filterText);
985
985
  n.classList.toggle("hidden", !(r && i)), this.logContainer.appendChild(n), this.logContainer.scrollTop = this.logContainer.scrollHeight, this.logContainer.children.length > 200 && this.logContainer.removeChild(this.logContainer.firstChild);
986
986
  }
987
- }, Q = class extends E {
987
+ }, X = class extends E {
988
988
  constructor() {
989
989
  super(), this.domElement = document.createElement("div"), this.domElement.className = "param-control", this._onChangeFunction = null, this.addEventListener("change", (e) => {
990
990
  requestAnimationFrame(() => {
@@ -1007,7 +1007,7 @@ var qt = class extends q {
1007
1007
  onChange(e) {
1008
1008
  return this._onChangeFunction = e, this;
1009
1009
  }
1010
- }, Xt = class extends Q {
1010
+ }, Qt = class extends X {
1011
1011
  constructor({ value: e = 0, step: t = .1, min: n = -Infinity, max: r = Infinity }) {
1012
1012
  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();
1013
1013
  }
@@ -1038,7 +1038,7 @@ var qt = class extends q {
1038
1038
  getValue() {
1039
1039
  return parseFloat(this.input.value);
1040
1040
  }
1041
- }, Zt = class extends Q {
1041
+ }, $t = class extends X {
1042
1042
  constructor({ value: e = !1 }) {
1043
1043
  super();
1044
1044
  let t = document.createElement("label");
@@ -1056,10 +1056,10 @@ var qt = class extends q {
1056
1056
  getValue() {
1057
1057
  return this.checkbox.checked;
1058
1058
  }
1059
- }, Qt = class extends Q {
1059
+ }, en = class extends X {
1060
1060
  constructor({ value: e = 0, min: t = 0, max: n = 1, step: r = .01 }) {
1061
1061
  super(), this.slider = document.createElement("input"), this.slider.type = "range", this.slider.min = t, this.slider.max = n, this.slider.step = r;
1062
- let i = new Xt({
1062
+ let i = new Qt({
1063
1063
  value: e,
1064
1064
  min: t,
1065
1065
  max: n,
@@ -1080,7 +1080,7 @@ var qt = class extends q {
1080
1080
  step(e) {
1081
1081
  return this.slider.step = e, this.numberInput.step = e, this;
1082
1082
  }
1083
- }, $t = class extends Q {
1083
+ }, tn = class extends X {
1084
1084
  constructor({ options: e = [], value: t = "" }) {
1085
1085
  super();
1086
1086
  let n = document.createElement("select"), r = (e, r) => {
@@ -1095,7 +1095,7 @@ var qt = class extends q {
1095
1095
  let e = this.options;
1096
1096
  return Array.isArray(e) ? e[this.select.selectedIndex] : e[this.select.value];
1097
1097
  }
1098
- }, en = class extends Q {
1098
+ }, nn = class extends X {
1099
1099
  constructor({ value: e = "#ffffff" }) {
1100
1100
  super();
1101
1101
  let t = document.createElement("input");
@@ -1111,13 +1111,13 @@ var qt = class extends q {
1111
1111
  let e = this._value;
1112
1112
  return typeof e == "string" && (e = parseInt(e.slice(1), 16)), e;
1113
1113
  }
1114
- }, tn = class extends Q {
1114
+ }, rn = class extends X {
1115
1115
  constructor({ text: e = "Button", value: t = () => {} }) {
1116
1116
  super();
1117
1117
  let n = document.createElement("button");
1118
1118
  n.textContent = e, n.onclick = t, this.domElement.appendChild(n);
1119
1119
  }
1120
- }, nn = class extends Q {
1120
+ }, an = class extends X {
1121
1121
  constructor({ value: e = "" }) {
1122
1122
  super();
1123
1123
  let t = document.createElement("input");
@@ -1131,9 +1131,9 @@ var qt = class extends q {
1131
1131
  getValue() {
1132
1132
  return this.input.value;
1133
1133
  }
1134
- }, rn = class e {
1134
+ }, on = class e {
1135
1135
  constructor(e, t) {
1136
- this.parameters = e, this.name = t, this.paramList = new J(t), this.objects = [];
1136
+ this.parameters = e, this.name = t, this.paramList = new K(t), this.objects = [];
1137
1137
  }
1138
1138
  close() {
1139
1139
  return this.paramList.close(), this;
@@ -1160,13 +1160,13 @@ var qt = class extends q {
1160
1160
  });
1161
1161
  }
1162
1162
  addString(e, t) {
1163
- let n = e[t], r = new nn({ value: n });
1163
+ let n = e[t], r = new an({ value: n });
1164
1164
  r.addEventListener("change", ({ value: n }) => {
1165
1165
  e[t] = n;
1166
1166
  });
1167
- let i = Y();
1167
+ let i = q();
1168
1168
  i.textContent = t;
1169
- let a = new J(i, r.domElement);
1169
+ let a = new K(i, r.domElement);
1170
1170
  return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
1171
1171
  }
1172
1172
  addFolder(t) {
@@ -1174,13 +1174,13 @@ var qt = class extends q {
1174
1174
  return this.paramList.add(n.paramList), n;
1175
1175
  }
1176
1176
  addBoolean(e, t) {
1177
- let n = e[t], r = new Zt({ value: n });
1177
+ let n = e[t], r = new $t({ value: n });
1178
1178
  r.addEventListener("change", ({ value: n }) => {
1179
1179
  e[t] = n;
1180
1180
  });
1181
- let i = Y();
1181
+ let i = q();
1182
1182
  i.textContent = t;
1183
- let a = new J(i, r.domElement);
1183
+ let a = new K(i, r.domElement);
1184
1184
  this.paramList.add(a);
1185
1185
  let o = a.domElement.firstChild;
1186
1186
  return o.classList.add("actionable"), o.addEventListener("click", (e) => {
@@ -1190,30 +1190,30 @@ var qt = class extends q {
1190
1190
  }), this._addParameter(e, t, r, a), r;
1191
1191
  }
1192
1192
  addSelect(e, t, n) {
1193
- let r = e[t], i = new $t({
1193
+ let r = e[t], i = new tn({
1194
1194
  options: n,
1195
1195
  value: r
1196
1196
  });
1197
1197
  i.addEventListener("change", ({ value: n }) => {
1198
1198
  e[t] = n;
1199
1199
  });
1200
- let a = Y();
1200
+ let a = q();
1201
1201
  a.textContent = t;
1202
- let o = new J(a, i.domElement);
1202
+ let o = new K(a, i.domElement);
1203
1203
  return this.paramList.add(o), o.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, i, o), i;
1204
1204
  }
1205
1205
  addColor(e, t) {
1206
- let n = e[t], r = new en({ value: n });
1206
+ let n = e[t], r = new nn({ value: n });
1207
1207
  r.addEventListener("change", ({ value: n }) => {
1208
1208
  e[t] = n;
1209
1209
  });
1210
- let i = Y();
1210
+ let i = q();
1211
1211
  i.textContent = t;
1212
- let a = new J(i, r.domElement);
1212
+ let a = new K(i, r.domElement);
1213
1213
  return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
1214
1214
  }
1215
1215
  addSlider(e, t, n = 0, r = 1, i = .01) {
1216
- let a = e[t], o = new Qt({
1216
+ let a = e[t], o = new en({
1217
1217
  value: a,
1218
1218
  min: n,
1219
1219
  max: r,
@@ -1222,13 +1222,13 @@ var qt = class extends q {
1222
1222
  o.addEventListener("change", ({ value: n }) => {
1223
1223
  e[t] = n;
1224
1224
  });
1225
- let s = Y();
1225
+ let s = q();
1226
1226
  s.textContent = t;
1227
- let c = new J(s, o.domElement);
1227
+ let c = new K(s, o.domElement);
1228
1228
  return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
1229
1229
  }
1230
1230
  addNumber(e, t, ...n) {
1231
- let r = e[t], [i, a] = n, o = new Xt({
1231
+ let r = e[t], [i, a] = n, o = new Qt({
1232
1232
  value: r,
1233
1233
  min: i,
1234
1234
  max: a
@@ -1236,81 +1236,81 @@ var qt = class extends q {
1236
1236
  o.addEventListener("change", ({ value: n }) => {
1237
1237
  e[t] = n;
1238
1238
  });
1239
- let s = Y();
1239
+ let s = q();
1240
1240
  s.textContent = t;
1241
- let c = new J(s, o.domElement);
1241
+ let c = new K(s, o.domElement);
1242
1242
  return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
1243
1243
  }
1244
1244
  addButton(e, t) {
1245
- let n = e[t], r = new tn({
1245
+ let n = e[t], r = new rn({
1246
1246
  text: t,
1247
1247
  value: n
1248
1248
  });
1249
1249
  r.addEventListener("change", ({ value: n }) => {
1250
1250
  e[t] = n;
1251
1251
  });
1252
- let i = new J(r.domElement);
1252
+ let i = new K(r.domElement);
1253
1253
  return i.itemRow.childNodes[0].style.gridColumn = "1 / -1", this.paramList.add(i), i.domElement.firstChild.classList.add("actionable"), r.name = (e) => (r.domElement.childNodes[0].textContent = e, r), this._registerParameter(e, t, r, i), r;
1254
1254
  }
1255
- }, an = class extends q {
1255
+ }, sn = class extends G {
1256
1256
  constructor(e = {}) {
1257
1257
  super(e.name || "Parameters", e);
1258
- let t = new Ut("Property", "Value");
1258
+ let t = new Gt("Property", "Value");
1259
1259
  t.domElement.classList.add("parameters"), t.setGridStyle(".5fr 1fr"), t.domElement.style.minWidth = "300px";
1260
1260
  let n = document.createElement("div");
1261
1261
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n), this.paramList = t, this.groups = [];
1262
1262
  }
1263
1263
  createGroup(e) {
1264
- let t = new rn(this, e);
1264
+ let t = new on(this, e);
1265
1265
  return this.paramList.add(t.paramList), this.groups.push(t), t;
1266
1266
  }
1267
- }, on = "../extensions/extensions.json", sn = _e.prototype.init;
1268
- function cn(e) {
1267
+ }, cn = "../extensions/extensions.json", ln = _e.prototype.init;
1268
+ function un(e) {
1269
1269
  e ? _e.prototype.init = async function() {
1270
1270
  if (this.backend.isWebGLBackend !== !0) {
1271
1271
  let e = this.backend.parameters;
1272
1272
  this.backend = new be(e);
1273
1273
  }
1274
- return sn.call(this);
1275
- } : _e.prototype.init = sn;
1274
+ return ln.call(this);
1275
+ } : _e.prototype.init = ln;
1276
1276
  }
1277
- var $ = null;
1278
- function ln() {
1279
- if ($ !== null) return $;
1280
- let e = vn("settings");
1281
- return $ = {
1277
+ var Z = null;
1278
+ function dn() {
1279
+ if (Z !== null) return Z;
1280
+ let e = bn("settings");
1281
+ return Z = {
1282
1282
  forceWebGL: e.forceWebGL === void 0 ? !1 : e.forceWebGL,
1283
1283
  captureStackTrace: e.captureStackTrace === void 0 ? !1 : e.captureStackTrace,
1284
1284
  activeExtensions: e.activeExtensions === void 0 ? {} : e.activeExtensions
1285
- }, $.forceWebGL && cn(!0), $.captureStackTrace && (ye.captureStackTrace = !0), $;
1285
+ }, Z.forceWebGL && un(!0), Z.captureStackTrace && (ye.captureStackTrace = !0), Z;
1286
1286
  }
1287
- function un() {
1288
- yn("settings", {
1289
- forceWebGL: $.forceWebGL,
1290
- captureStackTrace: $.captureStackTrace,
1291
- activeExtensions: $.activeExtensions
1287
+ function fn() {
1288
+ xn("settings", {
1289
+ forceWebGL: Z.forceWebGL,
1290
+ captureStackTrace: Z.captureStackTrace,
1291
+ activeExtensions: Z.activeExtensions
1292
1292
  });
1293
1293
  }
1294
- ln();
1295
- var dn = class extends an {
1294
+ dn();
1295
+ var pn = class extends sn {
1296
1296
  constructor() {
1297
1297
  super({ name: "Settings" }), this.extensions = {};
1298
- let e = ln(), t = this.createGroup("Renderer");
1298
+ let e = dn(), t = this.createGroup("Renderer");
1299
1299
  t.add(e, "forceWebGL").name("Force WebGL").onChange((e) => {
1300
- cn(e), un(), location.reload();
1300
+ un(e), fn(), location.reload();
1301
1301
  }), t.add(e, "captureStackTrace").name("Capture Stack Trace").onChange((e) => {
1302
- ye.captureStackTrace = e, un(), location.reload();
1302
+ ye.captureStackTrace = e, fn(), location.reload();
1303
1303
  });
1304
1304
  }
1305
1305
  init() {
1306
1306
  let e = this.createGroup("Extensions");
1307
1307
  this._getExtensions().then((t) => {
1308
1308
  for (let n of t) n.active = !1, n.loaded = !1, n.tab = null, this.extensions[n.name] = n, n.ui = e.add({ [n.name]: !1 }, n.name).onChange(async (e) => {
1309
- this.setActiveExtension(n.name, e), e ? $.activeExtensions[n.name] = {
1309
+ this.setActiveExtension(n.name, e), e ? Z.activeExtensions[n.name] = {
1310
1310
  name: n.name,
1311
1311
  url: n.url
1312
- } : delete $.activeExtensions[n.name], this._updateExtensionUI(n), un();
1313
- }), $.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
1312
+ } : delete Z.activeExtensions[n.name], this._updateExtensionUI(n), fn();
1313
+ }), Z.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
1314
1314
  });
1315
1315
  }
1316
1316
  async setActiveExtension(e, t) {
@@ -1318,7 +1318,7 @@ var dn = class extends an {
1318
1318
  n && (t ? await this._loadExtension(r, n) : await this._unloadExtension(r, n));
1319
1319
  }
1320
1320
  _updateExtensionUI(e) {
1321
- e.active && $.activeExtensions[e.name] === void 0 ? (e.ui.checkbox.checked = !0, e.ui.domElement.style.setProperty("--accent-color", "var(--color-green)")) : e.ui.domElement.style.removeProperty("--accent-color");
1321
+ e.active && Z.activeExtensions[e.name] === void 0 ? (e.ui.checkbox.checked = !0, e.ui.domElement.style.setProperty("--accent-color", "var(--color-green)")) : e.ui.domElement.style.removeProperty("--accent-color");
1322
1322
  }
1323
1323
  async _unloadExtension(e, t) {
1324
1324
  t.active !== !1 && (e.removeTab(t.tab), t.active = !1, t.loaded = !1, t.tab = null, this._updateExtensionUI(t), this.dispatchEvent({
@@ -1329,7 +1329,7 @@ var dn = class extends an {
1329
1329
  async _loadExtension(e, t) {
1330
1330
  if (t.active === !0) return;
1331
1331
  t.active = !0;
1332
- let n = await import(new URL(t.url, new URL(on, import.meta.url)).href), r = n[Object.keys(n)[0]], i = new r();
1332
+ let n = await import(new URL(t.url, new URL(cn, import.meta.url)).href), r = n[Object.keys(n)[0]], i = new r();
1333
1333
  e.addTab(i), t.loaded = !0, t.tab = i, this._updateExtensionUI(t), this.dispatchEvent({
1334
1334
  type: "extensionadded",
1335
1335
  name: t.name,
@@ -1337,36 +1337,36 @@ var dn = class extends an {
1337
1337
  });
1338
1338
  }
1339
1339
  async _getExtensions() {
1340
- let e = new URL(on, import.meta.url);
1340
+ let e = new URL(cn, import.meta.url);
1341
1341
  return await fetch(e).then((e) => e.json());
1342
1342
  }
1343
- }, fn = /* @__PURE__ */ V(([e, t]) => {
1343
+ }, mn = /* @__PURE__ */ z(([e, t]) => {
1344
1344
  let n = I(0);
1345
- bt(() => {
1345
+ St(() => {
1346
1346
  let { width: e, height: r } = t.value;
1347
1347
  n.value = e / r;
1348
1348
  });
1349
- let r = e.sub(.5), i = H(r.x.div(n), r.y).add(.5);
1350
- return W(i, dt(0, i.x).mul(dt(i.x, 1)).mul(dt(0, i.y)).mul(dt(i.y, 1)));
1351
- }), pn = class extends q {
1349
+ let r = e.sub(.5), i = B(r.x.div(n), r.y).add(.5);
1350
+ return H(i, ft(0, i.x).mul(ft(i.x, 1)).mul(ft(0, i.y)).mul(ft(i.y, 1)));
1351
+ }), hn = class extends G {
1352
1352
  constructor(e = {}) {
1353
1353
  super("Viewer", e);
1354
- let t = new Ut("Viewer", "Name");
1354
+ let t = new Gt("Viewer", "Name");
1355
1355
  t.setGridStyle("150px minmax(200px, 2fr)"), t.domElement.style.minWidth = "400px";
1356
1356
  let n = document.createElement("div");
1357
1357
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
1358
- let r = new J("Nodes");
1358
+ let r = new K("Nodes");
1359
1359
  t.add(r), this.itemLibrary = /* @__PURE__ */ new Map(), this.folderLibrary = /* @__PURE__ */ new Map(), this.canvasNodes = /* @__PURE__ */ new Map(), this.currentDataList = [], this.nodeList = t, this.nodes = r;
1360
1360
  }
1361
1361
  getFolder(e) {
1362
1362
  let t = this.folderLibrary.get(e);
1363
- return t === void 0 && (t = new J(e), this.folderLibrary.set(e, t), this.nodeList.add(t)), t;
1363
+ return t === void 0 && (t = new K(e), this.folderLibrary.set(e, t), this.nodeList.add(t)), t;
1364
1364
  }
1365
1365
  addNodeItem(e) {
1366
1366
  let t = this.itemLibrary.get(e.id);
1367
1367
  if (t === void 0) {
1368
1368
  let n = e.name, r = e.canvasTarget.domElement;
1369
- t = new J(r, n), t.itemRow.children[1].style["justify-content"] = "flex-start", this.itemLibrary.set(e.id, t);
1369
+ t = new K(r, n), t.itemRow.children[1].style["justify-content"] = "flex-start", this.itemLibrary.set(e.id, t);
1370
1370
  }
1371
1371
  return t;
1372
1372
  }
@@ -1375,8 +1375,8 @@ var dn = class extends an {
1375
1375
  if (n === void 0) {
1376
1376
  let r = new Ce(document.createElement("canvas"));
1377
1377
  r.setPixelRatio(window.devicePixelRatio), r.setSize(140, 140);
1378
- let i = t.id, { path: a, name: o } = Gt(Kt(t.getName() || "(unnamed)")), s = P(W(t.context({ getUV: (e) => {
1379
- let t = fn(yt, e), n = t.xy, r = t.z;
1378
+ let i = t.id, { path: a, name: o } = qt(Jt(t.getName() || "(unnamed)")), s = P(H(t.context({ getUV: (e) => {
1379
+ let t = mn(xt, e), n = t.xy, r = t.z;
1380
1380
  return n.mul(r);
1381
1381
  } })), 1);
1382
1382
  s = it(s, 0, e.outputColorSpace), s = s.context({ inspector: !0 });
@@ -1422,9 +1422,9 @@ var dn = class extends an {
1422
1422
  t.toneMapping = 0, t.outputColorSpace = u, t.setCanvasTarget(e.canvasTarget), e.quad.render(t), t.setCanvasTarget(i), j.restoreRendererState(t, s);
1423
1423
  }
1424
1424
  }
1425
- }, mn = 500, hn = 60, gn = class extends q {
1425
+ }, gn = 500, _n = 60, vn = class extends G {
1426
1426
  constructor(e = {}) {
1427
- super("Timeline", e), 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 Wt(mn), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )");
1427
+ super("Timeline", e), 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 Kt(gn), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )");
1428
1428
  let t = document.createElement("div");
1429
1429
  t.className = "list-scroll-wrapper", this.scrollWrapper = t, this.content.appendChild(t), this.buildHeader(), this.buildUI(), window.addEventListener("resize", () => {
1430
1430
  !this.isRecording && this.frames.length > 0 && this.renderSlider();
@@ -1437,8 +1437,8 @@ var dn = class extends an {
1437
1437
  t.className = "console-copy-button", t.title = "Clear", t.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\"><polyline points=\"3 6 5 6 21 6\"></polyline><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path><line x1=\"10\" y1=\"11\" x2=\"10\" y2=\"17\"></line><line x1=\"14\" y1=\"11\" x2=\"14\" y2=\"17\"></line></svg>", t.style.padding = "0 10px", t.style.lineHeight = "24px", t.style.display = "flex", t.style.alignItems = "center", t.addEventListener("click", () => this.clear()), this.viewModeButton = document.createElement("button"), this.viewModeButton.className = "console-copy-button", this.viewModeButton.title = "Toggle View Mode", this.viewModeButton.textContent = "Mode: Hierarchy", this.viewModeButton.style.padding = "0 10px", this.viewModeButton.style.lineHeight = "24px", this.viewModeButton.addEventListener("click", () => {
1438
1438
  this.isHierarchicalView = !this.isHierarchicalView, this.viewModeButton.textContent = this.isHierarchicalView ? "Mode: Hierarchy" : "Mode: Counts", this.selectedFrameIndex !== void 0 && this.selectedFrameIndex !== -1 && this.selectFrame(this.selectedFrameIndex);
1439
1439
  }), 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", () => {
1440
- let e = vn("timeline");
1441
- e.recording = !0, yn("timeline", e), window.location.reload();
1440
+ let e = bn("timeline");
1441
+ e.recording = !0, xn("timeline", e), window.location.reload();
1442
1442
  }), 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());
1443
1443
  let n = document.createElement("div");
1444
1444
  n.className = "console-buttons-group", n.appendChild(this.viewModeButton), n.appendChild(this.recordButton), n.appendChild(this.recordRefreshButton), n.appendChild(this.exportButton), n.appendChild(t), e.style.display = "flex", e.style.justifyContent = "space-between", e.style.padding = "6px", e.style.borderBottom = "1px solid var(--border-color)";
@@ -1520,8 +1520,8 @@ var dn = class extends an {
1520
1520
  }
1521
1521
  setRenderer(e) {
1522
1522
  this.renderer = e;
1523
- let t = vn("timeline");
1524
- t.recording && (t.recording = !1, yn("timeline", t), this.toggleRecording());
1523
+ let t = bn("timeline");
1524
+ t.recording && (t.recording = !1, xn("timeline", t), this.toggleRecording());
1525
1525
  }
1526
1526
  toggleRecording() {
1527
1527
  if (!this.renderer) {
@@ -1551,7 +1551,7 @@ var dn = class extends an {
1551
1551
  for (let t = 0; t < n.length; t++) n[t] *= e;
1552
1552
  }
1553
1553
  }
1554
- let t = this.baseTriangles > 0 ? e / this.baseTriangles * hn : 0;
1554
+ let t = this.baseTriangles > 0 ? e / this.baseTriangles * _n : 0;
1555
1555
  this.graph.addPoint("calls", this.currentFrame.calls.length), this.graph.addPoint("fps", this.currentFrame.fps), this.graph.addPoint("triangles", t), this.graph.update();
1556
1556
  }
1557
1557
  if (this.currentFrame = {
@@ -1559,7 +1559,7 @@ var dn = class extends an {
1559
1559
  calls: [],
1560
1560
  fps: 0,
1561
1561
  triangles: 0
1562
- }, this.frames.push(this.currentFrame), this.frames.length > mn && this.frames.shift(), !this.isManualScrubbing) {
1562
+ }, this.frames.push(this.currentFrame), this.frames.length > gn && this.frames.shift(), !this.isManualScrubbing) {
1563
1563
  if (this.isTrackingLatest) {
1564
1564
  let e = this.frames.length > 1 ? this.frames.length - 2 : 0;
1565
1565
  this.selectFrame(e);
@@ -1827,7 +1827,7 @@ var dn = class extends an {
1827
1827
  r > t && (t = r);
1828
1828
  }
1829
1829
  for (let n = 0; n < e.length; n++) {
1830
- let r = e[n].triangles || 0, i = t > 0 ? r / t * hn : 0;
1830
+ let r = e[n].triangles || 0, i = t > 0 ? r / t * _n : 0;
1831
1831
  this.graph.addPoint("calls", e[n].calls.length), this.graph.addPoint("fps", e[n].fps || 0), this.graph.addPoint("triangles", i);
1832
1832
  }
1833
1833
  this.graph.update(), this.playhead.style.display = "block";
@@ -1920,27 +1920,27 @@ var dn = class extends an {
1920
1920
  getColorForMethod(e) {
1921
1921
  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)";
1922
1922
  }
1923
- }, _n = class extends Bt {
1923
+ }, yn = class extends Ht {
1924
1924
  constructor() {
1925
1925
  super();
1926
- let e = new Ht(this);
1926
+ let e = new Wt(this);
1927
1927
  e.addEventListener("resize", (e) => this.dispatchEvent(e));
1928
- let t = new an({
1928
+ let t = new sn({
1929
1929
  builtin: !0,
1930
1930
  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>"
1931
1931
  });
1932
1932
  t.hide(), e.addTab(t);
1933
- let n = new pn();
1933
+ let n = new hn();
1934
1934
  n.hide(), e.addTab(n);
1935
- let r = new qt();
1935
+ let r = new Yt();
1936
1936
  e.addTab(r);
1937
- let i = new Jt();
1937
+ let i = new Xt();
1938
1938
  e.addTab(i);
1939
- let a = new gn();
1939
+ let a = new vn();
1940
1940
  e.addTab(a);
1941
- let o = new Yt();
1941
+ let o = new Zt();
1942
1942
  e.addTab(o);
1943
- let s = new dn();
1943
+ let s = new pn();
1944
1944
  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 = {
1945
1945
  text: {
1946
1946
  needsUpdate: !1,
@@ -2053,46 +2053,46 @@ var dn = class extends an {
2053
2053
  let n = this.getStatsData(t.cid);
2054
2054
  e.cpu += n.cpu, e.gpu += n.gpu, e.total += n.total;
2055
2055
  }
2056
- e.deltaTime = t.startTime - e.startTime, e.miscellaneous = e.deltaTime - e.total, e.miscellaneous < 0 && (e.miscellaneous = 0), this.updateCycle(this.displayCycle.text), this.updateCycle(this.displayCycle.graph), this.displayCycle.text.needsUpdate && (X("fps-counter", this.fps.toFixed()), this.performance.updateText(this, e), this.memory.updateText(this)), this.displayCycle.graph.needsUpdate && (this.performance.updateGraph(this, e), this.memory.updateGraph(this)), this.displayCycle.text.needsUpdate = !1, this.displayCycle.graph.needsUpdate = !1;
2056
+ e.deltaTime = t.startTime - e.startTime, e.miscellaneous = e.deltaTime - e.total, e.miscellaneous < 0 && (e.miscellaneous = 0), this.updateCycle(this.displayCycle.text), this.updateCycle(this.displayCycle.graph), this.displayCycle.text.needsUpdate && (J("fps-counter", this.fps.toFixed()), this.performance.updateText(this, e), this.memory.updateText(this)), this.displayCycle.graph.needsUpdate && (this.performance.updateGraph(this, e), this.memory.updateGraph(this)), this.displayCycle.text.needsUpdate = !1, this.displayCycle.graph.needsUpdate = !1;
2057
2057
  }
2058
2058
  }
2059
2059
  updateCycle(e) {
2060
2060
  e.time += this.nodeFrame.deltaTime, e.time >= e.duration && (e.needsUpdate = !0, e.time = 0);
2061
2061
  }
2062
2062
  static getItem(e) {
2063
- return console.warn("Inspector.getItem is deprecated. Use getItem directly instead."), vn(e);
2063
+ return console.warn("Inspector.getItem is deprecated. Use getItem directly instead."), bn(e);
2064
2064
  }
2065
2065
  static setItem(e, t) {
2066
- console.warn("Inspector.setItem is deprecated. Use setItem directly instead."), yn(e, t);
2066
+ console.warn("Inspector.setItem is deprecated. Use setItem directly instead."), xn(e, t);
2067
2067
  }
2068
2068
  };
2069
- function vn(e) {
2069
+ function bn(e) {
2070
2070
  return JSON.parse(localStorage.getItem("threejs-inspector") || "{}")[e] || {};
2071
2071
  }
2072
- function yn(e, t) {
2072
+ function xn(e, t) {
2073
2073
  let n = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
2074
2074
  t === null ? delete n[e] : n[e] = t, localStorage.setItem("threejs-inspector", JSON.stringify(n));
2075
2075
  }
2076
2076
  //#endregion
2077
2077
  //#region ../../node_modules/three/examples/jsm/tsl/display/SSGINode.js
2078
- var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2078
+ var Sn = /* @__PURE__ */ new xe(), Cn = /* @__PURE__ */ new k(), wn = [
2079
2079
  60,
2080
2080
  300,
2081
2081
  180,
2082
2082
  240,
2083
2083
  120,
2084
2084
  0
2085
- ], Cn = [
2085
+ ], Tn = [
2086
2086
  0,
2087
2087
  .5,
2088
2088
  .25,
2089
2089
  .75
2090
- ], wn, Tn = class extends he {
2090
+ ], En, Dn = class extends he {
2091
2091
  static get type() {
2092
2092
  return "SSGINode";
2093
2093
  }
2094
2094
  constructor(e, t, n, r) {
2095
- super("vec4"), this.beautyNode = e, this.depthNode = t, this.normalNode = n, this.updateBeforeType = pt.FRAME, this.sliceCount = I(1, "uint"), this.stepCount = I(12, "uint"), this.aoIntensity = I(1, "float"), this.giIntensity = I(10, "float"), this.radius = I(12, "float"), this.useScreenSpaceSampling = I(!0, "bool"), this.expFactor = I(2, "float"), this.thickness = I(1, "float"), this.useLinearThickness = I(!1, "bool"), this.backfaceLighting = I(0, "float"), this.useTemporalFiltering = !0, this._resolution = I(new k()), this._halfProjScale = I(1), this._temporalDirection = I(0), this._temporalOffset = I(0), this._cameraProjectionMatrix = I(r.projectionMatrix), this._cameraProjectionMatrixInverse = I(r.projectionMatrixInverse), this._cameraNear = ze("near", "float", r), this._cameraFar = ze("far", "float", r), this._camera = r, this._ssgiRenderTarget = new w(1, 1, { depthBuffer: !1 }), this._ssgiRenderTarget.texture.name = "SSGI", this._material = new A(), this._material.name = "SSGI", this._textureNode = Ne(this, this._ssgiRenderTarget.texture);
2095
+ super("vec4"), this.beautyNode = e, this.depthNode = t, this.normalNode = n, this.updateBeforeType = ht.FRAME, this.sliceCount = I(1, "uint"), this.stepCount = I(12, "uint"), this.aoIntensity = I(1, "float"), this.giIntensity = I(10, "float"), this.radius = I(12, "float"), this.useScreenSpaceSampling = I(!0, "bool"), this.expFactor = I(2, "float"), this.thickness = I(1, "float"), this.useLinearThickness = I(!1, "bool"), this.backfaceLighting = I(0, "float"), this.useTemporalFiltering = !0, this._resolution = I(new k()), this._halfProjScale = I(1), this._temporalDirection = I(0), this._temporalOffset = I(0), this._cameraProjectionMatrix = I(r.projectionMatrix), this._cameraProjectionMatrixInverse = I(r.projectionMatrixInverse), this._cameraNear = ze("near", "float", r), this._cameraFar = ze("far", "float", r), this._camera = r, this._ssgiRenderTarget = new w(1, 1, { depthBuffer: !1 }), this._ssgiRenderTarget.texture.name = "SSGI", this._material = new A(), this._material.name = "SSGI", this._textureNode = Ne(this, this._ssgiRenderTarget.texture);
2096
2096
  }
2097
2097
  getTextureNode() {
2098
2098
  return this._textureNode;
@@ -2102,28 +2102,28 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2102
2102
  }
2103
2103
  updateBefore(e) {
2104
2104
  let { renderer: t } = e;
2105
- wn = j.resetRendererState(t, wn);
2106
- let n = t.getDrawingBufferSize(xn);
2105
+ En = j.resetRendererState(t, En);
2106
+ let n = t.getDrawingBufferSize(Cn);
2107
2107
  if (this.setSize(n.width, n.height), this.useTemporalFiltering === !0) {
2108
2108
  let t = e.frameId;
2109
- this._temporalDirection.value = Sn[t % 6] / 360, this._temporalOffset.value = Cn[t % 4];
2109
+ this._temporalDirection.value = wn[t % 6] / 360, this._temporalOffset.value = Tn[t % 4];
2110
2110
  } else this._temporalDirection.value = 1, this._temporalOffset.value = 1;
2111
- bn.material = this._material, bn.name = "SSGI", t.setClearColor(0, 1), t.setRenderTarget(this._ssgiRenderTarget), bn.render(t), j.restoreRendererState(t, wn);
2111
+ Sn.material = this._material, Sn.name = "SSGI", t.setClearColor(0, 1), t.setRenderTarget(this._ssgiRenderTarget), Sn.render(t), j.restoreRendererState(t, En);
2112
2112
  }
2113
2113
  setup(e) {
2114
- let t = Xe(), n = B(32), r = B(0), i = (t) => {
2114
+ let t = Xe(), n = R(32), r = R(0), i = (t) => {
2115
2115
  let n = this.depthNode.sample(t).r;
2116
2116
  return e.renderer.logarithmicDepthBuffer === !0 ? De(Ie(n, this._cameraNear, this._cameraFar), this._cameraNear, this._cameraFar) : n;
2117
- }, a = (e) => this.normalNode === null ? Le(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), o = (e) => this.beautyNode.sample(e), s = V(([e]) => M(.25).mul(rt(e.y, e.x).bitAnd(3))).setLayout({
2117
+ }, a = (e) => this.normalNode === null ? Le(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), o = (e) => this.beautyNode.sample(e), s = z(([e]) => M(.25).mul(rt(e.y, e.x).bitAnd(3))).setLayout({
2118
2118
  name: "spatialOffsets",
2119
2119
  type: "float",
2120
2120
  inputs: [{
2121
2121
  name: "position",
2122
2122
  type: "vec2"
2123
2123
  }]
2124
- }), c = V(([e]) => {
2125
- let t = R(e).mul(M(-.156583)).add(vt);
2126
- return t.mulAssign(tt(R(e).oneMinus())), H(e.x.greaterThanEqual(0).select(t.x, et.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, et.sub(t.y)));
2124
+ }), c = z(([e]) => {
2125
+ let t = dt(e).mul(M(-.156583)).add(bt);
2126
+ return t.mulAssign(tt(dt(e).oneMinus())), B(e.x.greaterThanEqual(0).select(t.x, et.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, et.sub(t.y)));
2127
2127
  }).setLayout({
2128
2128
  name: "GTAOFastAcos",
2129
2129
  type: "vec2",
@@ -2131,52 +2131,52 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2131
2131
  name: "value",
2132
2132
  type: "vec2"
2133
2133
  }]
2134
- }), l = V(([e, t, s, l, u, d, f, p, m]) => {
2134
+ }), l = z(([e, t, s, l, u, d, f, p, m]) => {
2135
2135
  let h = this.stepCount.toConst(), g = this.expFactor.toConst(), _ = this.thickness.toConst(), v = this.backfaceLighting.toConst(), y = M(0);
2136
2136
  L(this.useScreenSpaceSampling.equal(!0), () => {
2137
2137
  y.assign(t.mul(this._resolution.x.div(2)).div(M(16)));
2138
2138
  }).Else(() => {
2139
2139
  y.assign(N(t.mul(this._halfProjScale).div(s.z.negate()), M(h)));
2140
2140
  }), y.divAssign(M(h).add(1));
2141
- let b = N(1, M(h.sub(1))).mul(y), x = e.equal(!0).select(H(1, -1), H(-1, 1)), S = e.equal(!0).select(1, -1), C = W(0);
2141
+ let b = N(1, M(h.sub(1))).mul(y), x = e.equal(!0).select(B(1, -1), B(-1, 1)), S = e.equal(!0).select(1, -1), C = H(0);
2142
2142
  return Ze({
2143
- start: B(0),
2143
+ start: R(0),
2144
2144
  end: h,
2145
2145
  type: "uint",
2146
2146
  condition: "<"
2147
2147
  }, ({ i: t }) => {
2148
- let h = qe(R(kt(y, M(t).add(u)).div(b)), g).mul(b).toConst(), w = l.mul(N(h, M(t).add(1))).toConst(), T = d.add(w.mul(x)).toConst();
2148
+ let h = qe(dt(jt(y, M(t).add(u)).div(b)), g).mul(b).toConst(), w = l.mul(N(h, M(t).add(1))).toConst(), T = d.add(w.mul(x)).toConst();
2149
2149
  L(T.x.lessThanEqual(0).or(T.y.lessThanEqual(0)).or(T.x.greaterThanEqual(1)).or(T.y.greaterThanEqual(1)), () => {
2150
- xt();
2150
+ Ct();
2151
2151
  });
2152
- let ee = ut(T, i(T), this._cameraProjectionMatrixInverse).toConst(), te = ee.sub(s).normalize().toConst(), ne = this.useLinearThickness.equal(!0).select(ee.z.negate().div(this._cameraFar).clamp().mul(100), M(1)), re = Ae(ee.sub(ne.mul(f).mul(_)).sub(s)), E = H(U(te, f), U(re, f));
2153
- E = c(z(E, -1, 1)), E = z(Ee(kt(S, E.negate()).sub(m.sub(vt)), et)), E = e.equal(!0).select(E.yx, E.xy);
2154
- let D = E.x.toConst(), ie = E.y.toConst(), ae = B(E.mul(M(n))).toConst(), O = B(ht(ie.sub(D).mul(M(n)))).toConst(), oe = O.greaterThan(B(0)).select(B(ct(B(4294967295), B(32).sub(n).add(n.sub(O)))), B(0)).toConst().shiftLeft(ae);
2152
+ let ee = ut(T, i(T), this._cameraProjectionMatrixInverse).toConst(), te = ee.sub(s).normalize().toConst(), ne = this.useLinearThickness.equal(!0).select(ee.z.negate().div(this._cameraFar).clamp().mul(100), M(1)), re = Ae(ee.sub(ne.mul(f).mul(_)).sub(s)), E = B(V(te, f), V(re, f));
2153
+ E = c(pt(E, -1, 1)), E = pt(Ee(jt(S, E.negate()).sub(m.sub(bt)), et)), E = e.equal(!0).select(E.yx, E.xy);
2154
+ let D = E.x.toConst(), ie = E.y.toConst(), ae = R(E.mul(M(n))).toConst(), O = R(_t(ie.sub(D).mul(M(n)))).toConst(), oe = O.greaterThan(R(0)).select(R(ct(R(4294967295), R(32).sub(n).add(n.sub(O)))), R(0)).toConst().shiftLeft(ae);
2155
2155
  oe = oe.bitAnd(r.bitNot()), r.assign(r.bitOr(oe));
2156
- let k = Ot(oe);
2156
+ let k = At(oe);
2157
2157
  L(k.greaterThan(0), () => {
2158
2158
  let e = o(T);
2159
2159
  L(Re(e).greaterThan(.001), () => {
2160
- let t = Ae(te), r = z(U(p, t));
2160
+ let t = Ae(te), r = pt(V(p, t));
2161
2161
  L(r.greaterThan(.001), () => {
2162
- let i = a(T), o = U(i, t.negate()), s = Qe(o).lessThan(0).select(R(o).mul(v), R(o));
2163
- o = v.greaterThan(0).and(U(i, f).greaterThan(0)).select(s, z(o)), C.rgb.addAssign(M(k).div(M(n)).mul(e).mul(r).mul(o));
2162
+ let i = a(T), o = V(i, t.negate()), s = Qe(o).lessThan(0).select(dt(o).mul(v), dt(o));
2163
+ o = v.greaterThan(0).and(V(i, f).greaterThan(0)).select(s, pt(o)), C.rgb.addAssign(M(k).div(M(n)).mul(e).mul(r).mul(o));
2164
2164
  });
2165
2165
  });
2166
2166
  });
2167
- }), W(C);
2168
- }), u = V(() => {
2167
+ }), H(C);
2168
+ }), u = z(() => {
2169
2169
  let e = i(t).toVar();
2170
2170
  e.greaterThanEqual(1).discard();
2171
- let o = ut(t, e, this._cameraProjectionMatrixInverse).toVar(), c = a(t).toVar(), u = Ae(o.xyz.negate()).toVar(), d = s(ft), f = lt(ft), p = this._temporalDirection.mul(.02), m = Oe(d.add(this._temporalOffset)).add(Je(t.add(p).mul(2).sub(1))), h = M(0), g = W(0), _ = this.sliceCount.toConst(), v = this.aoIntensity.toConst(), y = this.giIntensity.toConst(), b = this.radius.toConst();
2171
+ let o = ut(t, e, this._cameraProjectionMatrixInverse).toVar(), c = a(t).toVar(), u = Ae(o.xyz.negate()).toVar(), d = s(mt), f = lt(mt), p = this._temporalDirection.mul(.02), m = Oe(d.add(this._temporalOffset)).add(Je(t.add(p).mul(2).sub(1))), h = M(0), g = H(0), _ = this.sliceCount.toConst(), v = this.aoIntensity.toConst(), y = this.giIntensity.toConst(), b = this.radius.toConst();
2172
2172
  Ze({
2173
- start: B(0),
2173
+ start: R(0),
2174
2174
  end: _,
2175
2175
  type: "uint",
2176
2176
  condition: "<"
2177
2177
  }, ({ i: e }) => {
2178
- let i = kt(M(e).add(f).add(this._temporalDirection), et.div(M(_))).toConst(), a = W(H(Tt(i), mt(i)), 0).toConst(), s = a.xy.mul(M(1).div(this._resolution)).toConst(), d = Ae($e(a, u)).toConst(), p = $e(u, d).toConst(), v = c.sub(d.mul(U(c, d))).toConst(), y = z(U(Ae(v).toConst(), u), -1, 1).toConst(), x = Qe(U(v, p)).negate().mul(Ct(y)).toConst();
2179
- r.assign(0), g.addAssign(l(at(!0), b, o, s, m, t, u, c, x)), g.addAssign(l(at(!1), b, o, s, m, t, u, c, x)), h.addAssign(M(Ot(r)).div(M(n)));
2178
+ let i = jt(M(e).add(f).add(this._temporalDirection), et.div(M(_))).toConst(), a = H(B(Dt(i), gt(i)), 0).toConst(), s = a.xy.mul(M(1).div(this._resolution)).toConst(), d = Ae($e(a, u)).toConst(), p = $e(u, d).toConst(), v = c.sub(d.mul(V(c, d))).toConst(), y = pt(V(Ae(v).toConst(), u), -1, 1).toConst(), x = Qe(V(v, p)).negate().mul(Tt(y)).toConst();
2179
+ r.assign(0), g.addAssign(l(at(!0), b, o, s, m, t, u, c, x)), g.addAssign(l(at(!1), b, o, s, m, t, u, c, x)), h.addAssign(M(At(r)).div(M(n)));
2180
2180
  }), h.divAssign(M(_)), h.assign(qe(h.clamp().oneMinus(), v).clamp()), g.divAssign(M(_)), g.mulAssign(y);
2181
2181
  let x = M(7).toConst(), S = Re(g), C = S.greaterThan(x).select(x.div(S), M(1));
2182
2182
  return g.mulAssign(C), P(g, h);
@@ -2186,13 +2186,16 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2186
2186
  dispose() {
2187
2187
  this._ssgiRenderTarget.dispose(), this._material.dispose();
2188
2188
  }
2189
- }, En = (e, t, n, r) => new Tn(Ye(e), t, n, r), Dn = class e extends Ft {
2189
+ }, On = (e, t, n, r) => new Dn(Ye(e), t, n, r), kn = class e extends Lt {
2190
2190
  static {
2191
2191
  this.passId = "SsgiRenderPass";
2192
2192
  }
2193
2193
  constructor(t) {
2194
2194
  super(), this.passId = e.passId, this.sliceCount = I(t.sliceCount, "uint"), this.stepCount = I(t.stepCount, "uint"), this.radius = I(t.radius), this.expFactor = I(t.expFactor), this.thickness = I(t.thickness), this.backfaceLighting = I(t.backfaceLighting), this.aoIntensity = I(t.aoIntensity), this.giIntensity = I(t.giIntensity), this.useLinearThickness = I(t.useLinearThickness), this.useScreenSpaceSampling = I(t.useScreenSpaceSampling);
2195
2195
  }
2196
+ updatePerformanceParameters(e) {
2197
+ this.sliceCount.value = e.sliceCount, this.stepCount.value = e.stepCount;
2198
+ }
2196
2199
  addParametersToGUI(e, t) {
2197
2200
  let n = e.addFolder("SSGI Settings");
2198
2201
  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());
@@ -2201,16 +2204,16 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2201
2204
  if (!(r instanceof l)) return t;
2202
2205
  e.setMRT(Be({
2203
2206
  output: Ke,
2204
- diffuseColor: Et,
2207
+ diffuseColor: Ot,
2205
2208
  normal: Ve(Ge),
2206
- velocity: Dt
2209
+ velocity: kt
2207
2210
  }));
2208
- let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), u = En(a, s, St((e) => ot(c.sample(e))), r);
2211
+ let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), u = On(a, s, wt((e) => ot(c.sample(e))), r);
2209
2212
  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;
2210
2213
  let d = u.rgb, f = u.a, p = P(nt(a.rgb.mul(f), o.rgb.mul(d)), a.a);
2211
- return p.name = "Ssgi Composite", i === "ao only" ? P(W(f), 1) : i === "gi only" ? P(d, 1) : i === "direct lighting only" ? a : p;
2214
+ return p.name = "Ssgi Composite", i === "ao only" ? P(H(f), 1) : i === "gi only" ? P(d, 1) : i === "direct lighting only" ? a : p;
2212
2215
  }
2213
- }, On = /* @__PURE__ */ new xe(), kn = /* @__PURE__ */ new k(), An, jn = class extends he {
2216
+ }, An = /* @__PURE__ */ new xe(), jn = /* @__PURE__ */ new k(), Mn, Nn = class extends he {
2214
2217
  static get type() {
2215
2218
  return "TRAANode";
2216
2219
  }
@@ -2239,45 +2242,45 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2239
2242
  offsetY: 0,
2240
2243
  width: e,
2241
2244
  height: t
2242
- }, r = Nn[this._jitterIndex];
2245
+ }, r = Fn[this._jitterIndex];
2243
2246
  this.camera.setViewOffset(n.fullWidth, n.fullHeight, n.offsetX + r[0] - .5, n.offsetY + r[1] - .5, n.width, n.height);
2244
2247
  }
2245
2248
  clearViewOffset() {
2246
- this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= Nn.length - 1;
2249
+ this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= Fn.length - 1;
2247
2250
  }
2248
2251
  updateBefore(e) {
2249
2252
  let { renderer: t } = e;
2250
2253
  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);
2251
2254
  let n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, r = n.texture.width, i = n.texture.height;
2252
- this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), An = j.resetRendererState(t, An);
2255
+ this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), Mn = j.resetRendererState(t, Mn);
2253
2256
  let a = this._historyRenderTarget.width !== r || this._historyRenderTarget.height !== i;
2254
- 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), On.material = this._resolveMaterial, On.name = "TRAA", On.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
2255
- let o = t.getDrawingBufferSize(kn);
2257
+ 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), An.material = this._resolveMaterial, An.name = "TRAA", An.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
2258
+ let o = t.getDrawingBufferSize(jn);
2256
2259
  if (this._historyRenderTarget.height === o.height && this._historyRenderTarget.width === o.width) {
2257
2260
  let e = this.depthNode.value;
2258
2261
  t.copyTextureToTexture(e, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
2259
2262
  }
2260
- j.restoreRendererState(t, An);
2263
+ j.restoreRendererState(t, Mn);
2261
2264
  }
2262
2265
  setup(e) {
2263
2266
  let t = e.context.renderPipeline;
2264
2267
  t && (this._needsPostProcessingSync = !0, t.context.onBeforeRenderPipeline = () => {
2265
- let t = e.renderer.getDrawingBufferSize(kn);
2268
+ let t = e.renderer.getDrawingBufferSize(jn);
2266
2269
  this.setViewOffset(t.width, t.height);
2267
2270
  }, t.context.onAfterRenderPipeline = () => {
2268
2271
  this.clearViewOffset();
2269
- }), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = _), e.context.velocity === void 0 ? this._velocityNode = Dt : this._velocityNode = e.context.velocity;
2272
+ }), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = _), e.context.velocity === void 0 ? this._velocityNode = kt : this._velocityNode = e.context.velocity;
2270
2273
  let n = (e) => {
2271
2274
  let { x: t, y: n } = this._cameraNearFar;
2272
2275
  return De(Ie(e, t, n), t, n);
2273
- }, r = wt({
2276
+ }, r = Et({
2274
2277
  closestDepth: "float",
2275
2278
  closestPositionTexel: "vec2",
2276
2279
  farthestDepth: "float"
2277
- }), i = V(([t]) => {
2278
- let i = M(2).toVar(), a = H(0).toVar(), o = M(-1).toVar();
2280
+ }), i = z(([t]) => {
2281
+ let i = M(2).toVar(), a = B(0).toVar(), o = M(-1).toVar();
2279
2282
  for (let r = -1; r <= 1; ++r) for (let s = -1; s <= 1; ++s) {
2280
- let c = t.add(H(r, s)).toVar(), l = this.depthNode.load(c).r;
2283
+ let c = t.add(B(r, s)).toVar(), l = this.depthNode.load(c).r;
2281
2284
  e.renderer.reversedDepthBuffer && (l = l.oneMinus()), e.renderer.logarithmicDepthBuffer && (l = n(l)), l = l.toVar(), L(l.lessThan(i), () => {
2282
2285
  i.assign(l), a.assign(c);
2283
2286
  }), L(l.greaterThan(o), () => {
@@ -2290,7 +2293,7 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2290
2293
  e.renderer.logarithmicDepthBuffer && (r = n(r));
2291
2294
  let i = ut(t, r, this._previousCameraProjectionMatrixInverse), a = this._previousCameraWorldMatrix.mul(P(i, 1)).xyz, o = this._cameraWorldMatrixInverse.mul(P(a, 1)).z;
2292
2295
  return this.camera.isOrthographicCamera ? He(o, this._cameraNearFar.x, this._cameraNearFar.y) : De(o, this._cameraNearFar.x, this._cameraNearFar.y);
2293
- }, o = V(([e, t, n, r]) => {
2296
+ }, o = z(([e, t, n, r]) => {
2294
2297
  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 = N(s.x, s.y, s.z);
2295
2298
  return c.greaterThan(1).select(P(i, e.a).add(o.div(c)), t);
2296
2299
  }).setLayout({
@@ -2314,7 +2317,7 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2314
2317
  type: "vec4"
2315
2318
  }
2316
2319
  ]
2317
- }), s = V(([e, t, n, r]) => {
2320
+ }), s = z(([e, t, n, r]) => {
2318
2321
  let i = [
2319
2322
  [-1, -1],
2320
2323
  [-1, 1],
@@ -2331,7 +2334,7 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2331
2334
  }
2332
2335
  let c = M(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);
2333
2336
  return o(l.clamp(d, f), n, d, f);
2334
- }), c = V(([e, t]) => {
2337
+ }), c = z(([e, t]) => {
2335
2338
  let n = e.mul(t).fract().abs(), r = N(n, n.oneMinus());
2336
2339
  return r.x.mul(r.y).oneMinus().div(.75);
2337
2340
  }).setLayout({
@@ -2344,11 +2347,11 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2344
2347
  name: "textureSize",
2345
2348
  type: "ivec2"
2346
2349
  }]
2347
- }), l = V(([e, t, n]) => {
2350
+ }), l = z(([e, t, n]) => {
2348
2351
  let r = n.oneMinus(), i = e.mul(M(1).div(N(e.r, e.g, e.b).add(1))), a = t.mul(M(1).div(N(t.r, t.g, t.b).add(1))), o = Re(i.rgb), s = Re(a.rgb);
2349
2352
  return n.mulAssign(M(1).div(o.add(1))), r.mulAssign(M(1).div(s.add(1))), nt(e.mul(n), t.mul(r)).div(N(n.add(r), 1e-5)).toVar();
2350
- }), u = F(this._historyRenderTarget.texture), d = V(() => {
2351
- let e = Xe(), 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(H(.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), x = u.sample(e.sub(p)), S = e.sub(m).mul(t).length().div(this.maxVelocityLength).saturate(), C = M(.05).toVar();
2353
+ }), u = F(this._historyRenderTarget.texture), d = z(() => {
2354
+ let e = Xe(), 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), x = u.sample(e.sub(p)), S = e.sub(m).mul(t).length().div(this.maxVelocityLength).saturate(), C = M(.05).toVar();
2352
2355
  return this.useSubpixelCorrection && C.addAssign(c(p, t).mul(.25)), C.assign(y.select(C.add(S).saturate(), 1)), l(b, s(n, b, x, Pe(.5, 1, S.oneMinus().pow2())), C);
2353
2356
  });
2354
2357
  return this._resolveMaterial.colorNode = d(), this._textureNode;
@@ -2357,12 +2360,12 @@ var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
2357
2360
  this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
2358
2361
  }
2359
2362
  };
2360
- function Mn(e, t) {
2363
+ function Pn(e, t) {
2361
2364
  let n = 1, r = 0;
2362
2365
  for (; e > 0;) n /= t, r += e % t * n, e = Math.floor(e / t);
2363
2366
  return r;
2364
2367
  }
2365
- var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(t + 1, 3)]), Pn = (e, t, n, r) => new jn(Ye(e), t, n, r), Fn = class e extends Ft {
2368
+ var Fn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Pn(t + 1, 2), Pn(t + 1, 3)]), In = (e, t, n, r) => new Nn(Ye(e), t, n, r), Ln = class e extends Lt {
2366
2369
  constructor(...t) {
2367
2370
  super(...t), this.passId = e.passId;
2368
2371
  }
@@ -2370,12 +2373,154 @@ var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(
2370
2373
  this.passId = "TraaRenderPass";
2371
2374
  }
2372
2375
  assemble(e, t, n, r, i) {
2373
- return r instanceof l ? Pn(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), r) : t;
2376
+ return r instanceof l ? In(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), r) : t;
2374
2377
  }
2375
2378
  addParametersToGUI(e, t) {}
2376
- }, In = class extends pe {
2379
+ }, Q = {
2380
+ HIGHEST: "highest",
2381
+ HIGHER: "higher",
2382
+ HIGH: "high",
2383
+ MEDIUM: "medium",
2384
+ LOW: "low",
2385
+ LOWEST: "lowest"
2386
+ }, $ = [
2387
+ Q.HIGHEST,
2388
+ Q.HIGHER,
2389
+ Q.HIGH,
2390
+ Q.MEDIUM,
2391
+ Q.LOW,
2392
+ Q.LOWEST
2393
+ ], Rn = $[0], zn = $[$.length - 1], Bn = Q.HIGHEST, Vn = new Map([
2394
+ [Q.HIGHEST, {
2395
+ maxPixelRatio: 1.5,
2396
+ ssgiPerformanceParameters: {
2397
+ sliceCount: 3,
2398
+ stepCount: 16
2399
+ }
2400
+ }],
2401
+ [Q.HIGHER, {
2402
+ maxPixelRatio: 1.5,
2403
+ ssgiPerformanceParameters: {
2404
+ sliceCount: 2,
2405
+ stepCount: 8
2406
+ }
2407
+ }],
2408
+ [Q.HIGH, {
2409
+ maxPixelRatio: 1.5,
2410
+ ssgiPerformanceParameters: {
2411
+ sliceCount: 1,
2412
+ stepCount: 12
2413
+ }
2414
+ }],
2415
+ [Q.MEDIUM, {
2416
+ maxPixelRatio: 1.25,
2417
+ ssgiPerformanceParameters: {
2418
+ sliceCount: 1,
2419
+ stepCount: 12
2420
+ }
2421
+ }],
2422
+ [Q.LOW, {
2423
+ maxPixelRatio: 1,
2424
+ ssgiPerformanceParameters: {
2425
+ sliceCount: 1,
2426
+ stepCount: 8
2427
+ }
2428
+ }],
2429
+ [Q.LOWEST, {
2430
+ maxPixelRatio: 1,
2431
+ ssgiPerformanceParameters: {
2432
+ sliceCount: 0,
2433
+ stepCount: 0
2434
+ }
2435
+ }]
2436
+ ]), Hn = [
2437
+ {
2438
+ min: 70,
2439
+ max: Infinity,
2440
+ value: Q.HIGHEST
2441
+ },
2442
+ {
2443
+ min: 55,
2444
+ max: 69,
2445
+ value: Q.HIGHER
2446
+ },
2447
+ {
2448
+ min: 40,
2449
+ max: 54,
2450
+ value: Q.HIGH
2451
+ },
2452
+ {
2453
+ min: 30,
2454
+ max: 39,
2455
+ value: Q.MEDIUM
2456
+ },
2457
+ {
2458
+ min: 20,
2459
+ max: 29,
2460
+ value: Q.LOW
2461
+ },
2462
+ {
2463
+ min: 0,
2464
+ max: 19,
2465
+ value: Q.LOWEST
2466
+ }
2467
+ ], Un = (e) => Hn.find((t) => e >= t.min && e <= t.max).value, Wn = class {
2468
+ constructor(e) {
2469
+ this.qualityLevel = Bn, this.qualityMap = Vn, this.fpsCounter = new pe(), this.applyQualityParametersCallback = e;
2470
+ }
2471
+ getQualityLevel() {
2472
+ return this.qualityLevel;
2473
+ }
2474
+ manageQualitySettings(e, t) {
2475
+ this.fpsCounter.update();
2476
+ let n = this.fpsCounter.getFps(), r = n > 0 && n < e && this.qualityLevel !== zn, i = n > t && this.qualityLevel !== Rn, a = r ? "decrement" : i ? "increment" : void 0;
2477
+ if (a === void 0) {
2478
+ this.qualityChangePendingSince = void 0, this.qualityChangePendingDirection = void 0;
2479
+ return;
2480
+ }
2481
+ let o = (performance || Date).now();
2482
+ if (this.qualityChangePendingDirection !== a || this.qualityChangePendingSince === void 0) {
2483
+ this.qualityChangePendingDirection = a, this.qualityChangePendingSince = o;
2484
+ return;
2485
+ }
2486
+ o - this.qualityChangePendingSince < 800 || (a === "decrement" ? this.decrementQualityLevel() : this.incrementQualityLevel(), console.log(`fps at ${n}, setting quality level to ${this.qualityLevel}`), this.qualityChangePendingSince = void 0, this.qualityChangePendingDirection = void 0, this.fpsCounter.reset());
2487
+ }
2488
+ incrementQualityLevel() {
2489
+ let e = $.indexOf(this.qualityLevel);
2490
+ this.setQualityLevelByOrderIndex(e - 1);
2491
+ }
2492
+ decrementQualityLevel() {
2493
+ let e = $.indexOf(this.qualityLevel);
2494
+ this.setQualityLevelByOrderIndex(e + 1);
2495
+ }
2496
+ setQualityLevel(e) {
2497
+ this.qualityLevel !== e && (this.qualityLevel = e, this.applyCurrentQualityLevel());
2498
+ }
2499
+ addGUI(e, t) {
2500
+ let n = e.createParameters("Quality Settings"), r = Object.fromEntries($.map((e) => [e, e])), i = { qualityLevel: this.qualityLevel };
2501
+ n.add(i, "qualityLevel", r).onChange((e) => {
2502
+ this.setQualityLevel(e), t();
2503
+ });
2504
+ }
2505
+ setQualityLevelByOrderIndex(e) {
2506
+ let t = Math.min(Math.max(e, 0), $.length - 1);
2507
+ this.setQualityLevel($[t]);
2508
+ }
2509
+ applyCurrentQualityLevel(e = 6) {
2510
+ let t = this.qualityMap.get(this.qualityLevel);
2511
+ t && this.applyQualityParametersCallback(t, e);
2512
+ }
2513
+ async autoDetectInitialQualityLevel() {
2514
+ let { getGPUTier: e } = await import("./dist-DGov-RNo.mjs"), t = await e({ benchmarksURL: "./benchmarks" });
2515
+ if (!t || !t.fps) {
2516
+ console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel = Bn;
2517
+ return;
2518
+ }
2519
+ this.qualityLevel = Un(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.`);
2520
+ }
2521
+ }, Gn = class extends fe {
2377
2522
  constructor(e, t, n, r) {
2378
- super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.renderPipeline = new Se(t), this.enableRenderPasses(n, r);
2523
+ 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 Wn(this.applyQualityParameters.bind(this)), this.freezeFrames = 0, this.freezeRenderTarget = new w(), this.renderPipeline = new Se(t), this.enableRenderPasses(n, r), this._initData.featureFlags.webGpuConfig?.autoDetectQualityLevel ?? !0 ? this.qualityManager.autoDetectInitialQualityLevel().then(() => this.qualityManager.applyCurrentQualityLevel(0)) : this.qualityManager.applyCurrentQualityLevel(0);
2379
2524
  }
2380
2525
  enableRenderPasses(e, t) {
2381
2526
  e && this.enableSsgiPass(), t && this.enableOutline(t.outlineVisibleEdgeColor, t.outlineHiddenEdgeColor), e && this.enableTraaPass();
@@ -2389,9 +2534,6 @@ var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(
2389
2534
  clearCache() {}
2390
2535
  disableUiInteractionMode() {}
2391
2536
  enableUiInteractionMode() {}
2392
- getQualityLevel() {
2393
- return console.error("RoomleRenderer.getQualityLevel is part of autoquality/performance tuning which is not implemented yet for WebGPU"), le.HIGHEST;
2394
- }
2395
2537
  setCameraType(e) {
2396
2538
  super.setCameraType(e), this.passNeedsReassembly = !0;
2397
2539
  }
@@ -2408,7 +2550,15 @@ var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(
2408
2550
  console.error("RoomleWebGPURenderer.loadLutImages is not implemented yet");
2409
2551
  }
2410
2552
  render(e, t) {
2411
- this.updateCameraProjectionMatrix(t), (this.passNeedsReassembly || this.lastRenderCamera !== t) && (this.renderPipeline.outputNode = this.assembleRenderPasses(e, t), this.renderPipeline.needsUpdate = !0, this.passNeedsReassembly = !1, this.lastRenderCamera = t), this.renderPipeline.render();
2553
+ if (this.updateCameraProjectionMatrix(t), (this.passNeedsReassembly || this.lastRenderCamera !== t) && (this.renderPipeline.outputNode = this.assembleRenderPasses(e, t), this.renderPipeline.needsUpdate = !0, this.passNeedsReassembly = !1, this.lastRenderCamera = t), this.freezeFrames > 0) {
2554
+ this.freezeFrames--, this.renderToFreezeTarget();
2555
+ return;
2556
+ }
2557
+ this.renderPipeline.render(), this.qualityManager.manageQualitySettings(this._initData.featureFlags.webGpuConfig?.autoQualityMinFps ?? 24, this._initData.featureFlags.webGpuConfig?.autoQualityMaxFps ?? 59);
2558
+ }
2559
+ renderToFreezeTarget() {
2560
+ let e = this.renderer.getRenderTarget();
2561
+ this.renderer.setRenderTarget(this.freezeRenderTarget), this.renderPipeline.render(), this.renderer.setRenderTarget(e);
2412
2562
  }
2413
2563
  updateCameraProjectionMatrix(e) {
2414
2564
  (e instanceof r || e instanceof l) && e.updateProjectionMatrix();
@@ -2418,10 +2568,6 @@ var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(
2418
2568
  for (let i of this.renderPasses.values()) r = i.assemble(n, r, e, t, this.debugMode);
2419
2569
  return r;
2420
2570
  }
2421
- setAutoQuality(e) {
2422
- console.error("RoomleRenderer.setAutoQuality is part of autoquality/performance tuning which is not implemented yet for WebGPU");
2423
- }
2424
- setCustomShadingParameters(e, t) {}
2425
2571
  setCustomOutlineParameters(e) {
2426
2572
  let t = this.getOutlinePassOrUndefined();
2427
2573
  t && t.setOutlineColors(e.outlineVisibleEdgeColor, e.outlineHiddenEdgeColor);
@@ -2429,11 +2575,8 @@ var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(
2429
2575
  setGroundShadow(e, t) {
2430
2576
  this.isConfiguratorMode && this._webGpuGroundShadowReflection.setReceiveShadow(e);
2431
2577
  }
2432
- setOnQualityLevelChangeCallback(e) {
2433
- console.error("RoomleRenderer.setOnQualityLevelChangeCallback is part of autoquality/performance tuning which is not implemented yet for WebGPU");
2434
- }
2435
2578
  enableOutline(e, t) {
2436
- this.getOutlinePassOrUndefined() || this.addRenderPass(new It({
2579
+ this.getOutlinePassOrUndefined() || this.addRenderPass(new Rt({
2437
2580
  selectedObjects: [],
2438
2581
  visibleEdgeColor: e,
2439
2582
  hiddenEdgeColor: t,
@@ -2443,11 +2586,11 @@ var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(
2443
2586
  }));
2444
2587
  }
2445
2588
  getOutlinePassOrUndefined() {
2446
- let e = this.renderPasses.get(It.passId);
2447
- if (e && e instanceof It) return e;
2589
+ let e = this.renderPasses.get(Rt.passId);
2590
+ if (e && e instanceof Rt) return e;
2448
2591
  }
2449
2592
  enableSsgiPass() {
2450
- this.renderPasses.get(Dn.passId) || this.addRenderPass(new Dn({
2593
+ this.renderPasses.get(kn.passId) || this.addRenderPass(new kn({
2451
2594
  sliceCount: 2,
2452
2595
  stepCount: 12,
2453
2596
  radius: 8,
@@ -2461,23 +2604,26 @@ var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(
2461
2604
  }));
2462
2605
  }
2463
2606
  enableTraaPass() {
2464
- this.renderPasses.get(Fn.passId) || this.addRenderPass(new Fn());
2607
+ this.renderPasses.get(Ln.passId) || this.addRenderPass(new Ln());
2465
2608
  }
2466
- setQualityLevel(e) {
2467
- console.error("RoomleRenderer.setQualityLevel is part of autoquality/performance tuning which is not implemented yet for WebGPU");
2609
+ applyQualityParameters(e, t) {
2610
+ this.freezeFrames = t;
2611
+ let n = window?.devicePixelRatio ?? 1;
2612
+ this.renderer.setPixelRatio(Math.min(n, e.maxPixelRatio)), this.getSsgiPassOrUndefined()?.updatePerformanceParameters(e.ssgiPerformanceParameters), this.passNeedsReassembly = !0;
2468
2613
  }
2469
- setQualityMap(e) {
2470
- console.error("RoomleRenderer.setQualityMap is part of autoquality/performance tuning which is not implemented yet for WebGPU");
2614
+ getSsgiPassOrUndefined() {
2615
+ let e = this.renderPasses.get(kn.passId);
2616
+ if (e && e instanceof kn) return e;
2471
2617
  }
2472
2618
  setShadingType(e) {
2473
2619
  e !== ce.DEFAULT && console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
2474
2620
  }
2475
2621
  showGUI(e) {
2476
- if (this.renderer.inspector instanceof _n) return;
2622
+ if (this.renderer.inspector instanceof yn) return;
2477
2623
  let t = document.createElement("style");
2478
2624
  t.innerText = "#profiler-toggle,\n #profiler-mini-panel {\n left: 15px;\n right: auto !important;\n }", document.head.appendChild(t);
2479
- let n = new _n();
2480
- this.renderer.inspector = n, this._domHelper.element?.appendChild(n.domElement), this.addDebugGUI(n, e);
2625
+ let n = new yn();
2626
+ this.renderer.inspector = n, this._domHelper.element?.appendChild(n.domElement), this.addDebugGUI(n, e), this.qualityManager.addGUI(n, e);
2481
2627
  let r = n.createParameters("Render Pass Settings");
2482
2628
  for (let t of this.renderPasses.values()) t.addParametersToGUI(r, e);
2483
2629
  this._webGpuGroundShadowReflection.addParametersToGUI(r, e), this.addToneMappingSettings(r, e);
@@ -2515,7 +2661,7 @@ var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(
2515
2661
  }
2516
2662
  getOrCreateGUIParameters(e) {
2517
2663
  let t = this.renderer.inspector;
2518
- if (t instanceof _n) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
2664
+ if (t instanceof yn) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
2519
2665
  throw Error("Inspector GUI is not initialized. Call showGUI() before creating parameter groups.");
2520
2666
  }
2521
2667
  createAndCacheGUIParameters(e, t) {
@@ -2523,8 +2669,8 @@ var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(
2523
2669
  return this.guiParameterGroups.set(t, n), n;
2524
2670
  }
2525
2671
  };
2526
- fe([de, ue("design:type", Object)], In.prototype, "_domHelper", void 0), fe([de, ue("design:type", Object)], In.prototype, "_webGpuGroundShadowReflection", void 0);
2672
+ de([ue, le("design:type", Object)], Gn.prototype, "_domHelper", void 0), de([ue, le("design:type", Object)], Gn.prototype, "_webGpuGroundShadowReflection", void 0), de([ue, le("design:type", Object)], Gn.prototype, "_initData", void 0);
2527
2673
  //#endregion
2528
- export { In as RoomleWebGPURenderer };
2674
+ export { Gn as RoomleWebGPURenderer };
2529
2675
 
2530
- //# sourceMappingURL=roomle-webgpu-renderer-5-aG3CMs.mjs.map
2676
+ //# sourceMappingURL=roomle-webgpu-renderer-NhCn2iM-.mjs.map