@roomle/web-sdk 6.0.0-alpha.3 → 6.0.0-alpha.5

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 (69) hide show
  1. package/lib/ConfiguratorKernel.wasm +0 -0
  2. package/lib/RoomleCore.js +4 -4
  3. package/lib/RoomleCore.wasm +0 -0
  4. package/lib/RoomleToolsCore.wasm +0 -0
  5. package/lib/{api-CfHIG8XG.mjs → api-D1x-GnXP.mjs} +2 -2
  6. package/lib/{api-CfHIG8XG.mjs.map → api-D1x-GnXP.mjs.map} +1 -1
  7. package/lib/{asset-loader.worker-CE4O0JU-.mjs → asset-loader.worker-Ct8sEbaT.mjs} +1 -1
  8. package/lib/{asset-loader.worker-CE4O0JU-.mjs.map → asset-loader.worker-Ct8sEbaT.mjs.map} +1 -1
  9. package/lib/{budgeteer.sw-yR2xApHT.mjs → budgeteer.sw-C1IOfc0T.mjs} +1 -1
  10. package/lib/{budgeteer.sw-yR2xApHT.mjs.map → budgeteer.sw-C1IOfc0T.mjs.map} +1 -1
  11. package/lib/{component-raycast-helper-DmNjzxSD.mjs → component-raycast-helper-Bjf5x6Qp.mjs} +2 -2
  12. package/lib/{component-raycast-helper-DmNjzxSD.mjs.map → component-raycast-helper-Bjf5x6Qp.mjs.map} +1 -1
  13. package/lib/configurator-DAlOYY1G.mjs +2 -0
  14. package/lib/{configurator-vJ5idG1h.mjs → configurator-FnqdWPyc.mjs} +4 -4
  15. package/lib/{configurator-vJ5idG1h.mjs.map → configurator-FnqdWPyc.mjs.map} +1 -1
  16. package/lib/{continuous-drawing-helper-BPe83b9-.mjs → continuous-drawing-helper-LPDWkQn5.mjs} +1 -1
  17. package/lib/{continuous-drawing-helper-BPe83b9-.mjs.map → continuous-drawing-helper-LPDWkQn5.mjs.map} +1 -1
  18. package/lib/{glb-viewer-C2U_66OO.mjs → glb-viewer-BOC1_L14.mjs} +4 -4
  19. package/lib/{glb-viewer-C2U_66OO.mjs.map → glb-viewer-BOC1_L14.mjs.map} +1 -1
  20. package/lib/glb-viewer-b8y6FHyW.mjs +2 -0
  21. package/lib/hi-mcp-server-Bfxxay_N.mjs +5301 -0
  22. package/lib/hi-mcp-server-Bfxxay_N.mjs.map +1 -0
  23. package/lib/{highlight-coordinator-DDyo_U8P.mjs → highlight-coordinator-Dqcq3yh_.mjs} +3 -3
  24. package/lib/{highlight-coordinator-DDyo_U8P.mjs.map → highlight-coordinator-Dqcq3yh_.mjs.map} +1 -1
  25. package/lib/{homag-intelligence-CzTJI_Bo.mjs → homag-intelligence-CgictL2u.mjs} +14 -3
  26. package/lib/homag-intelligence-CgictL2u.mjs.map +1 -0
  27. package/lib/{material-viewer-1TdW2e5Q.mjs → material-viewer-BDO3436Q.mjs} +4 -4
  28. package/lib/{material-viewer-1TdW2e5Q.mjs.map → material-viewer-BDO3436Q.mjs.map} +1 -1
  29. package/lib/{packages-DbCxjl5Y.mjs → packages-CM3Y2HjP.mjs} +5 -5
  30. package/lib/packages-CM3Y2HjP.mjs.map +1 -0
  31. package/lib/{planner-BWxMYEwu.mjs → planner-Cw7BpR_J.mjs} +3 -3
  32. package/lib/{planner-BWxMYEwu.mjs.map → planner-Cw7BpR_J.mjs.map} +1 -1
  33. package/lib/planner-EIi7lAHf.mjs +2 -0
  34. package/lib/roomle-headless.d.ts +174 -10
  35. package/lib/roomle-headless.js +9 -9
  36. package/lib/roomle-renderer-nCUrLU_S.mjs.map +1 -1
  37. package/lib/{roomle-sdk-BIGMLwuJ.mjs → roomle-sdk-B3FDzb1a.mjs} +3807 -3551
  38. package/lib/roomle-sdk-B3FDzb1a.mjs.map +1 -0
  39. package/lib/roomle-sdk.d.ts +174 -10
  40. package/lib/roomle-sdk.js +7 -7
  41. package/lib/{roomle-webgpu-renderer-BQuRMtn8.mjs → roomle-webgpu-renderer-ZT__n9mA.mjs} +429 -428
  42. package/lib/{roomle-webgpu-renderer-BQuRMtn8.mjs.map → roomle-webgpu-renderer-ZT__n9mA.mjs.map} +1 -1
  43. package/lib/{scene-renderer-DdVBP89m.mjs → scene-renderer-3S4aBupw.mjs} +2 -2
  44. package/lib/{scene-renderer-DdVBP89m.mjs.map → scene-renderer-3S4aBupw.mjs.map} +1 -1
  45. package/lib/{script-loader-DOhxnpYD.mjs → script-loader-U9UqaQz5.mjs} +2 -2
  46. package/lib/{script-loader-DOhxnpYD.mjs.map → script-loader-U9UqaQz5.mjs.map} +1 -1
  47. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  48. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +48 -0
  49. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  50. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +4 -4
  51. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  52. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  53. package/lib/{stats-helper-DYmtEOGb.mjs → stats-helper-tcYuZsXn.mjs} +2 -2
  54. package/lib/{stats-helper-DYmtEOGb.mjs.map → stats-helper-tcYuZsXn.mjs.map} +1 -1
  55. package/lib/{threejs-utils-Dy-rm1a9.mjs → threejs-utils-DyIt_Zd4.mjs} +2 -4
  56. package/lib/threejs-utils-DyIt_Zd4.mjs.map +1 -0
  57. package/lib/{tools-core-DscrDxxP.mjs → tools-core-BqYt1d2R.mjs} +3 -3
  58. package/lib/{tools-core-DscrDxxP.mjs.map → tools-core-BqYt1d2R.mjs.map} +1 -1
  59. package/lib/workers-DfusgkFA.mjs +6 -0
  60. package/lib/{workers-B-AqdQMe.mjs.map → workers-DfusgkFA.mjs.map} +1 -1
  61. package/package.json +2 -2
  62. package/lib/configurator-DXd3P_DJ.mjs +0 -2
  63. package/lib/glb-viewer-DiHXOqau.mjs +0 -2
  64. package/lib/homag-intelligence-CzTJI_Bo.mjs.map +0 -1
  65. package/lib/packages-DbCxjl5Y.mjs.map +0 -1
  66. package/lib/planner-Bwo0xEWJ.mjs +0 -2
  67. package/lib/roomle-sdk-BIGMLwuJ.mjs.map +0 -1
  68. package/lib/threejs-utils-Dy-rm1a9.mjs.map +0 -1
  69. package/lib/workers-B-AqdQMe.mjs +0 -6
@@ -1,18 +1,19 @@
1
- import { $t as e, Ar as t, Ci as n, Dn as r, Ei as i, Hr as a, J as o, Kn as s, Nr as c, Pr as l, Si as u, Ti as d, Tr as f, Tt as p, V as m, Vi as h, Xr as g, Y as _, Yi as v, _i as y, an as b, bi as ee, cn as x, ct as S, fi as C, g as w, gr as T, hr as E, ht as te, jr as ne, kn as D, q as re, qi as ie, qn as ae, rt as oe, t as se, un as ce, vi as le, w as ue, wi as de, wr as fe, xi as pe, yi as me } from "./three.core-BTUCraWz.mjs";
2
- import { h as he, t as ge } from "./shading-settings-DJ4kY2Cn.mjs";
3
- import { n as _e, r as ve, t as ye } from "./decorate-CjaqqbUP.mjs";
4
- import { a as O, n as be, r as xe, t as Se } from "./roomle-renderer-nCUrLU_S.mjs";
5
- import { Dt as Ce, It as k, Jn as we, Mn as Te, Q as Ee, Sn as A, Vt as De, _r as Oe, mr as ke, un as Ae, vt as je, x as Me, yn as Ne } from "./three.webgpu-DTO8skiU.mjs";
6
- import { $ as Pe, B as j, Bt as M, C as Fe, Ct as Ie, D as N, Dt as Le, E as Re, Et as ze, Ft as Be, G as Ve, Ht as He, I as Ue, J as We, K as Ge, L as Ke, Lt as qe, M as Je, Mt as P, N as Ye, Nt as F, O as Xe, Ot as I, P as Ze, Pt as Qe, Q as $e, R as et, S as tt, T as nt, Ut as rt, V as it, Vt as L, W as R, Wt as at, X as ot, Y as st, Z as ct, _ as lt, _t as ut, a as dt, at as ft, b as pt, bt as mt, c as ht, ct as gt, d as z, dt as _t, et as vt, f as yt, ft as bt, g as xt, ht as St, i as B, it as Ct, j as wt, k as V, kt as Tt, l as Et, m as Dt, mt as Ot, n as H, nt as kt, o as At, ot as jt, p as Mt, r as Nt, rt as Pt, s as Ft, st as It, t as Lt, tt as Rt, u as zt, ut as Bt, v as Vt, vt as Ht, w as Ut, wt as Wt, x as Gt, xt as Kt, y as qt, yt as Jt, z as Yt, zt as U } from "./three.tsl-kYk-mr3-.mjs";
1
+ import { $t as e, Ar as t, Ci as n, Dn as r, Ei as i, Hr as a, J as o, Kn as s, Nr as c, Pr as l, Si as u, Ti as d, Tr as f, Tt as p, V as m, Vi as h, Xr as g, Y as _, Yi as v, _i as y, an as b, bi as ee, cn as x, ct as te, fi as S, g as C, gr as w, hr as T, ht as ne, jr as re, kn as E, q as ie, qi as ae, qn as oe, rt as se, t as ce, un as le, vi as ue, w as de, wi as fe, wr as pe, xi as me, yi as he } from "./three.core-BTUCraWz.mjs";
2
+ import { h as ge, t as _e } from "./shading-settings-DJ4kY2Cn.mjs";
3
+ import { n as ve, r as ye, t as be } from "./decorate-CjaqqbUP.mjs";
4
+ import { _ as xe } from "./common-utils-CNGLvAo_.mjs";
5
+ import { a as D, n as Se, r as Ce, t as we } from "./roomle-renderer-nCUrLU_S.mjs";
6
+ import { Dt as Te, It as O, Jn as Ee, Mn as De, Q as Oe, Sn as k, Vt as ke, _r as Ae, mr as je, un as Me, vt as Ne, x as Pe, yn as Fe } from "./three.webgpu-DTO8skiU.mjs";
7
+ import { $ as Ie, B as A, Bt as j, C as Le, Ct as Re, D as M, Dt as ze, E as Be, Et as Ve, Ft as He, G as Ue, Ht as We, I as Ge, J as Ke, K as qe, L as Je, Lt as Ye, M as Xe, Mt as N, N as Ze, Nt as P, O as Qe, Ot as F, P as $e, Pt as et, Q as tt, R as nt, S as rt, T as it, Ut as at, V as ot, Vt as I, W as L, Wt as st, X as ct, Y as lt, Z as ut, _ as dt, _t as ft, a as pt, at as mt, b as ht, bt as gt, c as _t, ct as vt, d as R, dt as yt, et as bt, f as xt, ft as St, g as Ct, ht as wt, i as z, it as Tt, j as Et, k as B, kt as Dt, l as Ot, m as kt, mt as At, n as V, nt as jt, o as Mt, ot as Nt, p as Pt, r as Ft, rt as It, s as Lt, st as Rt, t as zt, tt as Bt, u as Vt, ut as Ht, v as Ut, vt as Wt, w as Gt, wt as Kt, x as qt, xt as Jt, y as Yt, yt as Xt, z as Zt, zt as H } from "./three.tsl-kYk-mr3-.mjs";
7
8
  //#region ../../node_modules/three/examples/jsm/tsl/display/OutlineNode.js
8
- var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE__ */ new d(1, 0), Qt = /* @__PURE__ */ new d(0, 1), G, $t = class extends we {
9
+ var U = /* @__PURE__ */ new Me(), Qt = /* @__PURE__ */ new d(), $t = /* @__PURE__ */ new d(1, 0), en = /* @__PURE__ */ new d(0, 1), W, tn = class extends Ee {
9
10
  static get type() {
10
11
  return "OutlineNode";
11
12
  }
12
13
  constructor(e, t, n = {}) {
13
14
  super("vec4");
14
- let { selectedObjects: r = [], edgeThickness: i = V(1), edgeGlow: a = V(0), downSampleRatio: o = 2 } = n;
15
- this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode = ot(i), this.edgeGlowNode = ot(a), this.downSampleRatio = o, this.updateBeforeType = De.FRAME, this._renderTargetDepthBuffer = new c(), this._renderTargetDepthBuffer.depthTexture = new _(), this._renderTargetDepthBuffer.depthTexture.type = S, this._renderTargetMaskBuffer = new c(), this._renderTargetMaskDownSampleBuffer = new c(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new c(1, 1, { depthBuffer: !1 }), this._cameraNear = bt("near", "float", t), this._cameraFar = bt("far", "float", t), this._blurDirection = F(new d()), this._depthTextureUniform = I(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = I(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = I(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = I(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = I(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = I(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = M(1, 0, 0), this._hiddenEdgeColor = M(0, 1, 0), this._depthMaterial = new k(), this._depthMaterial.colorNode = Vt(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new Te(), this._depthSpriteMaterial.colorNode = Vt(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new k(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new Te(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new k(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new k(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new k(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new k(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new k(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = Ct(this, this._renderTargetComposite.texture);
15
+ let { selectedObjects: r = [], edgeThickness: i = B(1), edgeGlow: a = B(0), downSampleRatio: o = 2 } = n;
16
+ this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode = ct(i), this.edgeGlowNode = ct(a), this.downSampleRatio = o, this.updateBeforeType = ke.FRAME, this._renderTargetDepthBuffer = new c(), this._renderTargetDepthBuffer.depthTexture = new _(), this._renderTargetDepthBuffer.depthTexture.type = te, this._renderTargetMaskBuffer = new c(), this._renderTargetMaskDownSampleBuffer = new c(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new c(1, 1, { depthBuffer: !1 }), this._cameraNear = St("near", "float", t), this._cameraFar = St("far", "float", t), this._blurDirection = P(new d()), 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 = j(1, 0, 0), this._hiddenEdgeColor = j(0, 1, 0), this._depthMaterial = new O(), this._depthMaterial.colorNode = Ut(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new De(), this._depthSpriteMaterial.colorNode = Ut(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new O(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new De(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new O(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new O(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new O(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new O(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new O(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = Tt(this, this._renderTargetComposite.texture);
16
17
  }
17
18
  get visibleEdge() {
18
19
  return this.r;
@@ -31,11 +32,11 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
31
32
  updateBefore(e) {
32
33
  let { renderer: t } = e, { camera: n, scene: r } = this;
33
34
  if (this._updateSelectionCache(), this._selectionCache.size === 0) {
34
- this._lastSelectionCount > 0 && (G = A.resetRendererState(t, G), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), A.restoreRendererState(t, G), this._lastSelectionCount = 0);
35
+ this._lastSelectionCount > 0 && (W = k.resetRendererState(t, W), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), k.restoreRendererState(t, W), this._lastSelectionCount = 0);
35
36
  return;
36
37
  }
37
- this._lastSelectionCount = this._selectionCache.size, G = A.resetRendererAndSceneState(t, r, G);
38
- let i = t.getDrawingBufferSize(Xt);
38
+ this._lastSelectionCount = this._selectionCache.size, W = k.resetRendererAndSceneState(t, r, W);
39
+ let i = t.getDrawingBufferSize(Qt);
39
40
  this.setSize(i.width, i.height), t.setClearColor(16777215, 1);
40
41
  let a = r.name;
41
42
  t.setRenderTarget(this._renderTargetDepthBuffer), t.setRenderObjectFunction((e, n, r, i, a, o, s, c) => {
@@ -48,33 +49,33 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
48
49
  let a = e.isSprite ? this._prepareMaskSpriteMaterial : this._prepareMaskMaterial;
49
50
  t.renderObject(e, n, r, i, a, o, s, c);
50
51
  }
51
- }), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(G.renderObjectFunction), this._selectionCache.clear(), r.name = a, W.material = this._materialCopy, W.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), W.render(t), W.material = this._edgeDetectionMaterial, W.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Zt), W.material = this._separableBlurMaterial, W.name = "Outline [ Blur Half Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer1.texture, this._blurDirection.value.copy(Qt), t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Zt), W.material = this._separableBlurMaterial2, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer2), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer2.texture, this._blurDirection.value.copy(Qt), t.setRenderTarget(this._renderTargetEdgeBuffer2), W.render(t), W.material = this._compositeMaterial, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), W.render(t), A.restoreRendererAndSceneState(t, r, G);
52
+ }), 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($t), 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(en), t.setRenderTarget(this._renderTargetEdgeBuffer1), U.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy($t), 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(en), t.setRenderTarget(this._renderTargetEdgeBuffer2), U.render(t), U.material = this._compositeMaterial, U.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), U.render(t), k.restoreRendererAndSceneState(t, r, W);
52
53
  }
53
54
  setup() {
54
55
  let e = () => {
55
- let e = this._depthTextureUniform.sample(Ht), t;
56
- return t = this.camera.isPerspectiveCamera ? ft(e, this._cameraNear, this._cameraFar) : Pe(e, this._cameraNear, this._cameraFar), M(0, jt.z.lessThanEqual(t).select(1, 0), 1);
56
+ let e = this._depthTextureUniform.sample(Wt), t;
57
+ return t = this.camera.isPerspectiveCamera ? mt(e, this._cameraNear, this._cameraFar) : Ie(e, this._cameraNear, this._cameraFar), j(0, Nt.z.lessThanEqual(t).select(1, 0), 1);
57
58
  };
58
59
  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 = H(() => {
60
- let e = Tt(this._maskTextureDownsSampleUniform), t = U(1).div(e).toVar(), n = L(1, 0, 0, 1).mul(L(t, t)), r = qe(), 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 = U(st(i.r.sub(a.r), .5), st(o.r.sub(s.r), .5)).length();
61
- return L(Ve(Ve(i.g, a.g), Ve(o.g, s.g)).oneMinus().greaterThan(.001).select(this._visibleEdgeColor, this._hiddenEdgeColor), 1).mul(c);
60
+ let t = V(() => {
61
+ let e = Dt(this._maskTextureDownsSampleUniform), t = H(1).div(e).toVar(), n = I(1, 0, 0, 1).mul(I(t, t)), r = Ye(), 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(lt(i.r.sub(a.r), .5), lt(o.r.sub(s.r), .5)).length();
62
+ return I(Ue(Ue(i.g, a.g), Ue(o.g, s.g)).oneMinus().greaterThan(.001).select(this._visibleEdgeColor, this._hiddenEdgeColor), 1).mul(c);
62
63
  });
63
64
  this._edgeDetectionMaterial.fragmentNode = t(), this._edgeDetectionMaterial.needsUpdate = !0;
64
- let n = H(([e, t]) => V(.39894).mul(Xe(V(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = H(([e]) => {
65
- let t = Tt(this._maskTextureDownsSampleUniform), r = U(1).div(t).toVar(), i = qe(), a = e.div(2).toVar(), o = n(0, a).toVar(), s = this._blurColorTextureUniform.sample(i).mul(o).toVar(), c = this._blurDirection.mul(r).mul(e).div(4).toVar(), l = c.toVar();
66
- return dt({
67
- start: Ue(1),
68
- end: Ue(4),
65
+ let n = V(([e, t]) => B(.39894).mul(Qe(B(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = V(([e]) => {
66
+ let t = Dt(this._maskTextureDownsSampleUniform), r = H(1).div(t).toVar(), i = Ye(), 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();
67
+ return pt({
68
+ start: Ge(1),
69
+ end: Ge(4),
69
70
  type: "int",
70
71
  condition: "<="
71
72
  }, ({ i: t }) => {
72
- let r = n(e.mul(V(t)).div(4), a), u = this._blurColorTextureUniform.sample(i.add(l)), d = this._blurColorTextureUniform.sample(i.sub(l));
73
+ let r = n(e.mul(B(t)).div(4), a), u = this._blurColorTextureUniform.sample(i.add(l)), d = this._blurColorTextureUniform.sample(i.sub(l));
73
74
  s.addAssign(u.add(d).mul(r)), o.addAssign(r.mul(2)), l.addAssign(c);
74
75
  }), s.div(o);
75
76
  });
76
77
  this._separableBlurMaterial.fragmentNode = r(this.edgeThicknessNode), this._separableBlurMaterial.needsUpdate = !0, this._separableBlurMaterial2.fragmentNode = r(4), this._separableBlurMaterial2.needsUpdate = !0;
77
- let i = H(() => {
78
+ let i = V(() => {
78
79
  let e = this._edge1TextureUniform, t = this._edge2TextureUniform, n = this._maskTextureUniform, r = e.add(t.mul(this.edgeGlowNode));
79
80
  return n.r.mul(r);
80
81
  });
@@ -88,26 +89,26 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
88
89
  (e.isMesh || e.isSprite) && this._selectionCache.add(e);
89
90
  });
90
91
  }
91
- }, en = (e, t, n) => new $t(e, t, n), tn = class {}, nn = class e extends tn {
92
+ }, nn = (e, t, n) => new tn(e, t, n), rn = class {}, an = class e extends rn {
92
93
  static {
93
94
  this.passId = "OutlineRenderPass";
94
95
  }
95
96
  constructor(t) {
96
- super(), this.passId = e.passId, this.selectedObjects = t.selectedObjects, this.edgeStrength = F(t.edgeStrength), this.edgeGlow = F(t.edgeGlow), this.edgeThickness = F(t.edgeThickness), this.visibleEdgeColor = F(new ue(t.visibleEdgeColor)), this.hiddenEdgeColor = F(new ue(t.hiddenEdgeColor));
97
+ super(), this.passId = e.passId, this.selectedObjects = t.selectedObjects, this.edgeStrength = P(t.edgeStrength), this.edgeGlow = P(t.edgeGlow), this.edgeThickness = P(t.edgeThickness), this.visibleEdgeColor = P(new de(t.visibleEdgeColor)), this.hiddenEdgeColor = P(new de(t.hiddenEdgeColor));
97
98
  }
98
99
  highlightObjects(e) {
99
100
  this.selectedObjects.splice(0, this.selectedObjects.length, ...e);
100
101
  }
101
102
  setOutlineColors(e, t) {
102
- this.visibleEdgeColor.value = new ue(e), this.hiddenEdgeColor.value = new ue(t);
103
+ this.visibleEdgeColor.value = new de(e), this.hiddenEdgeColor.value = new de(t);
103
104
  }
104
105
  assemble(e, t, n, r, i) {
105
- let { visibleEdge: a, hiddenEdge: o } = en(n, r, {
106
+ let { visibleEdge: a, hiddenEdge: o } = nn(n, r, {
106
107
  selectedObjects: this.selectedObjects,
107
108
  edgeThickness: this.edgeThickness,
108
109
  edgeGlow: this.edgeGlow
109
- }), s = L(a.mul(this.visibleEdgeColor).add(o.mul(this.hiddenEdgeColor)).mul(this.edgeStrength), 0).toInspector("Outline / Composite");
110
- return i === "outline" ? L(0, 0, 0, 0).add(s) : t.add(s);
110
+ }), s = I(a.mul(this.visibleEdgeColor).add(o.mul(this.hiddenEdgeColor)).mul(this.edgeStrength), 0).toInspector("Outline / Composite");
111
+ return i === "outline" ? I(0, 0, 0, 0).add(s) : t.add(s);
111
112
  }
112
113
  addParametersToGUI(e, t) {
113
114
  let n = e.addFolder("Outline Settings");
@@ -117,21 +118,21 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
117
118
  this.hiddenEdgeColor.value.set(e), t();
118
119
  });
119
120
  }
120
- }, rn = class {
121
+ }, on = class {
121
122
  constructor(e, t) {
122
123
  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
124
  }
124
- }, an = class extends rn {
125
+ }, sn = class extends on {
125
126
  constructor(e, t, n, r) {
126
127
  let i = t.name;
127
128
  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
129
  }
129
- }, on = class extends rn {
130
+ }, cn = class extends on {
130
131
  constructor(e, t) {
131
132
  let n = t.name || (t.isComputeNode ? "Compute" : "Compute Group");
132
133
  super(e, n), this.computeNode = t, this.isComputeStats = !0;
133
134
  }
134
- }, sn = class extends Ee {
135
+ }, ln = class extends Oe {
135
136
  constructor() {
136
137
  super(), this.currentFrame = null, this.currentContext = null, this.currentRender = null, this.currentCompute = null, this.currentNodes = null, this.lastFrame = null, this.frames = [], this.framesLib = {}, this.maxFrames = 512, this._lastFinishTime = 0, this._resolveTimestampPromise = null, this._rAFId = null, this.overdraw = !1, this._overdrawMaterial = null, this.isRendererInspector = !0;
137
138
  }
@@ -150,14 +151,14 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
150
151
  let t = this.getPrimaryPass();
151
152
  if (t === null) return;
152
153
  let n = this.getRenderer();
153
- this._overdrawMaterial === null && (this._overdrawMaterial = new je({
154
- colorNode: M(.25),
154
+ this._overdrawMaterial === null && (this._overdrawMaterial = new Ne({
155
+ colorNode: j(.25),
155
156
  blending: 2,
156
157
  depthTest: !0,
157
158
  depthWrite: !0
158
159
  }));
159
- let { scene: r, camera: i } = t, a = A.resetRendererAndSceneState(n, r);
160
- n.toneMapping = 0, n.outputColorSpace = e, r.overrideMaterial = this._overdrawMaterial, n.render(r, i), A.restoreRendererAndSceneState(n, r, a);
160
+ let { scene: r, camera: i } = t, a = k.resetRendererAndSceneState(n, r);
161
+ n.toneMapping = 0, n.outputColorSpace = e, r.overrideMaterial = this._overdrawMaterial, n.render(r, i), k.restoreRendererAndSceneState(n, r, a);
161
162
  }
162
163
  _getFPS() {
163
164
  let e = 0, t = 0;
@@ -207,11 +208,11 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
207
208
  return;
208
209
  }
209
210
  if (t.backend.hasTimestamp) {
210
- if (await t.resolveTimestampsAsync(C.COMPUTE), await t.resolveTimestampsAsync(C.RENDER), t !== this.getRenderer()) {
211
+ if (await t.resolveTimestampsAsync(S.COMPUTE), await t.resolveTimestampsAsync(S.RENDER), t !== this.getRenderer()) {
211
212
  this._resolveTimestampPromise = null, e();
212
213
  return;
213
214
  }
214
- let n = t.backend.getTimestampFrames(C.COMPUTE), r = t.backend.getTimestampFrames(C.RENDER), i = [...new Set([...n, ...r])];
215
+ let n = t.backend.getTimestampFrames(S.COMPUTE), r = t.backend.getTimestampFrames(S.RENDER), i = [...new Set([...n, ...r])];
215
216
  for (let e of i) {
216
217
  let i = this.getFrameById(e);
217
218
  if (i !== null) {
@@ -263,7 +264,7 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
263
264
  beginCompute(e, t) {
264
265
  let n = this.getFrame();
265
266
  if (!n) return;
266
- let r = new on(e, t);
267
+ let r = new cn(e, t);
267
268
  r.timestamp = performance.now(), r.parent = this.getParent(), n.computes.push(r), r.parent.children.push(r), this.currentCompute = r, this.currentContext = r;
268
269
  }
269
270
  finishCompute() {
@@ -274,7 +275,7 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
274
275
  beginRender(e, t, n, r) {
275
276
  let i = this.getFrame();
276
277
  if (!i) return;
277
- let a = new an(e, t, n, r);
278
+ let a = new sn(e, t, n, r);
278
279
  a.timestamp = performance.now(), a.parent = this.getParent(), i.renders.push(a), a.parent.children.push(a), this.currentRender = a, this.currentContext = a;
279
280
  }
280
281
  finishRender() {
@@ -285,12 +286,12 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
285
286
  dispose() {
286
287
  this._rAFId !== null && (cancelAnimationFrame(this._rAFId), this._rAFId = null), this._resolveTimestampPromise = null, this._overdrawMaterial !== null && (this._overdrawMaterial.dispose(), this._overdrawMaterial = null), super.dispose();
287
288
  }
288
- }, cn = class {
289
+ }, un = class {
289
290
  static init(e, t = null) {
290
291
  let n = document.createElement("style");
291
292
  t && (n.nonce = t), n.textContent = "\n@scope (.three-inspector) {\n\n :scope {\n --profiler-background: #1e1e24f5;\n --profiler-header-background: #2a2a33aa;\n --profiler-header: #2a2a33;\n --profiler-border: #4a4a5a;\n --text-primary: #e0e0e0;\n --text-secondary: #9a9aab;\n --color-accent: #00aaff;\n --color-green: #4caf50;\n --color-yellow: #ffc107;\n --color-red: #f44336;\n --color-fps: rgb(63, 81, 181);\n --color-call: rgba(255, 185, 34, 1);\n --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n --font-mono: 'Courier New', Courier, monospace;\n\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 1000;\n overflow: hidden;\n color-scheme: dark;\n }\n\n :scope * {\n pointer-events: auto;\n }\n\n .profiler-panel, .profiler-toggle, .detached-tab-panel,\n .profiler-panel *, .profiler-toggle *, .detached-tab-panel * {\n text-transform: initial;\n line-height: normal;\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n }\n\n .profiler-toggle {\n position: absolute;\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: 1002;\n transition: all 0.2s ease-in-out;\n /*font-size: 14px;*/\n font-size: 15px;\n backdrop-filter: blur(8px);\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);\n display: flex;\n align-items: stretch;\n padding: 0;\n overflow: hidden;\n font-family: var(--font-family);\n }\n\n .profiler-toggle-graph {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 0;\n pointer-events: none;\n background: transparent;\n border: none;\n border-radius: inherit;\n opacity: 0.5;\n }\n\n .profiler-toggle.toggle-left {\n right: auto;\n left: 15px;\n border-radius: 6px 12px 12px 6px;\n flex-direction: row-reverse;\n }\n\n .profiler-toggle.toggle-left .builtin-tabs-container {\n border-right: none;\n border-left: 1px solid #262636;\n }\n\n .profiler-toggle:hover {\n border-color: var(--color-accent);\n }\n\n .profiler-toggle.panel-open .toggle-icon {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .toggle-icon {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n font-size: 20px;\n transition: background-color 0.2s;\n }\n\n .console-badge-container {\n position: absolute;\n top: 2px;\n right: 2px;\n display: flex;\n gap: 2px;\n pointer-events: none;\n }\n\n .console-badge,\n .tab-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 14px;\n height: 14px;\n padding: 0 4px;\n border-radius: 7px;\n font-size: 9px;\n font-weight: bold;\n color: #ffffff;\n line-height: 1;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n\n .tab-badge-container {\n position: absolute;\n top: 1px;\n right: 3px;\n display: flex;\n gap: 2px;\n pointer-events: none;\n }\n\n .console-badge.error,\n .tab-badge.error {\n background-color: var(--color-red);\n }\n\n .console-badge.warn,\n .tab-badge.warn {\n background-color: var(--color-yellow);\n color: #111111;\n }\n\n .profiler-toggle:hover .toggle-icon {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .profiler-toggle.panel-open:hover .toggle-icon {\n background-color: rgba(0, 170, 255, 0.3);\n }\n\n .toggle-separator {\n width: 1px;\n background-color: var(--profiler-border);\n }\n\n .toggle-text {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: baseline;\n padding: 8px 14px;\n min-width: 80px;\n justify-content: right;\n }\n\n .toggle-text .fps-label {\n font-size: 0.7em;\n margin-left: 10px;\n color: #999;\n }\n\n .builtin-tabs-container {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: stretch;\n gap: 0;\n border-right: 1px solid #262636;\n order: -1;\n }\n\n .builtin-tab-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 8px 14px;\n font-family: var(--font-family);\n font-size: 13px;\n font-weight: 600;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 32px;\n position: relative;\n }\n\n .builtin-tab-btn svg {\n width: 20px;\n height: 20px;\n stroke: currentColor;\n }\n\n .builtin-tab-btn:hover {\n background-color: rgba(255, 255, 255, 0.08);\n color: var(--color-accent);\n }\n\n .builtin-tab-btn:active {\n background-color: rgba(255, 255, 255, 0.12);\n }\n\n .builtin-tab-btn.active {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .builtin-tab-btn.active:hover {\n background-color: rgba(0, 170, 255, 0.3);\n }\n\n .profiler-mini-panel {\n position: absolute;\n top: 60px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 8px;\n color: var(--text-primary);\n z-index: 9999;\n backdrop-filter: blur(8px);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);\n font-family: var(--font-family);\n font-size: 11px;\n width: 350px;\n max-width: calc(100vw - 30px);\n min-width: 170px;\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n overflow-x: hidden;\n display: none;\n opacity: 0;\n transform: translateY(-10px) scale(0.98);\n transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), \n transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .profiler-mini-panel.toggle-left {\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-toggle.toggle-bottom {\n top: auto;\n bottom: 15px;\n }\n\n .profiler-mini-panel.toggle-bottom {\n top: auto;\n bottom: 60px;\n }\n\n .profiler-mini-panel::-webkit-scrollbar {\n width: 6px;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.15);\n border-radius: 3px;\n transition: background 0.2s;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.25);\n }\n\n .mini-panel-content {\n padding: 0;\n font-size: 11px;\n line-height: 1.5;\n font-family: var(--font-mono);\n letter-spacing: 0.3px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .mini-panel-content .profiler-content {\n display: block !important;\n background: transparent;\n }\n\n .mini-panel-content .list-scroll-wrapper {\n max-height: calc(100vh - 120px);\n overflow-y: auto;\n overflow-x: hidden;\n width: 100%;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.1);\n border-radius: 2px;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.2);\n }\n\n .mini-panel-content .parameters {\n background: transparent;\n border: none;\n box-shadow: none;\n padding: 4px;\n }\n\n @media screen and (max-width: 340px) {\n\n .mini-panel-content .parameters {\n min-width: 0 !important;\n }\n\n .mini-panel-content .list-container.parameters .list-item-row,\n .mini-panel-content .list-container.parameters .list-header {\n grid-template-columns: minmax(0, .5fr) minmax(0, 1fr) !important;\n }\n\n }\n\n .mini-panel-content .list-container.parameters {\n padding: 2px 6px 0px 6px !important;\n }\n\n .mini-panel-content .list-header {\n display: none;\n padding: 2px 4px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n\n .mini-panel-content .list-item {\n border-bottom: 1px solid rgba(74, 74, 90, 0.2);\n transition: background-color 0.15s;\n }\n\n .mini-panel-content .list-item:last-child {\n border-bottom: none;\n }\n\n .mini-panel-content .list-item:hover {\n background-color: rgba(255, 255, 255, 0.04);\n }\n\n .mini-panel-content .list-item.actionable:hover {\n background-color: rgba(255, 255, 255, 0.06);\n cursor: pointer;\n }\n\n .info-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-secondary);\n font-size: 10px;\n font-style: italic;\n margin-left: 6px;\n cursor: help;\n position: relative;\n vertical-align: middle;\n top: -1px;\n }\n\n .info-icon.active {\n background-color: var(--color-accent);\n color: white;\n }\n\n @media (hover: hover) {\n .info-icon:hover {\n background-color: var(--color-accent);\n color: white;\n }\n }\n\n .info-tooltip {\n position: fixed;\n transform: translate(-50%, -100%);\n background-color: rgba(30, 30, 36, 0.95);\n border: 1px solid var(--profiler-border);\n border-radius: 6px;\n padding: 10px 14px;\n color: var(--text-primary);\n font-size: 12px;\n width: max-content;\n max-width: 250px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s, visibility 0.2s;\n z-index: 999999;\n font-style: normal;\n font-family: var(--font-family);\n text-align: left;\n white-space: normal;\n }\n\n .info-tooltip h3 {\n margin: 0 0 6px 0;\n font-size: 13px;\n color: var(--color-accent);\n }\n\n .info-tooltip strong {\n font-weight: 600;\n color: white;\n }\n\n /* Style adjustments for lil-gui look */\n .mini-panel-content .item-row {\n padding: 3px 8px;\n min-height: 24px;\n }\n\n .mini-panel-content .list-item-row {\n padding: 1px 4px;\n gap: 8px;\n min-height: 21px;\n align-items: center;\n }\n\n .mini-panel-content input[type=\"checkbox\"] {\n width: 12px;\n height: 12px;\n }\n\n .mini-panel-content input[type=\"range\"] {\n height: 18px;\n }\n\n .mini-panel-content .value-number input,\n .mini-panel-content .value-slider input {\n background-color: rgba(0, 0, 0, 0.3);\n border: 1px solid rgba(74, 74, 90, 0.5);\n font-size: 10px;\n }\n\n .mini-panel-content .value-number input:focus,\n .mini-panel-content .value-slider input:focus {\n border-color: var(--color-accent);\n }\n\n .mini-panel-content .value-slider {\n gap: 6px;\n }\n\n /* Compact nested items */\n .mini-panel-content .list-item .list-item {\n margin-left: 8px;\n }\n\n .mini-panel-content .list-item .list-item .item-row,\n .mini-panel-content .list-item .list-item .list-item-row {\n padding: 2px 6px;\n min-height: 22px;\n }\n\n /* Compact collapsible headers */\n .mini-panel-content .collapsible .item-row,\n .mini-panel-content .list-item-row.collapsible {\n padding: 2px 8px;\n font-weight: 600;\n min-height: 16px;\n display: flex;\n align-items: center;\n line-height: 1;\n }\n\n .mini-panel-content .collapsible-icon {\n font-size: 10px;\n width: 14px;\n height: 14px;\n }\n\n .mini-panel-content .param-control input[type=\"range\"] {\n height: 12px;\n margin-top: 1px;\n padding-top: 5px;\n user-select: none;\n -webkit-user-select: none;\n outline: none;\n }\n\n .mini-panel-content .param-control input[type=\"range\"]::-webkit-slider-thumb {\n width: 14px;\n height: 14px;\n margin-top: -5px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .mini-panel-content .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 14px;\n height: 14px;\n user-select: none;\n -moz-user-select: none;\n }\n\n .mini-panel-content .list-children-container {\n padding-left: 0;\n }\n\n .mini-panel-content .param-control input[type=\"number\"] {\n flex-basis: 60px !important;\n }\n\n .mini-panel-content .param-control {\n align-items: center;\n }\n\n .mini-panel-content .param-control select {\n font-size: 11px;\n }\n\n .mini-panel-content .list-item-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .profiler-panel {\n position: absolute;\n z-index: 1001 !important;\n bottom: 0;\n left: 0;\n right: 0;\n height: 350px;\n background-color: var(--profiler-background);\n backdrop-filter: blur(8px);\n border-top: 2px solid var(--profiler-border);\n color: var(--text-primary);\n display: flex;\n flex-direction: column;\n z-index: 1000;\n /*box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);*/\n transform: translateY(100%);\n transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.3s ease-out, width 0.3s ease-out;\n font-family: var(--font-mono);\n }\n\n .profiler-panel.resizing,\n .profiler-panel.dragging {\n transition: none;\n }\n\n .profiler-panel.visible {\n transform: translateY(0);\n }\n\n .profiler-panel.maximized {\n height: 100%;\n z-index: 10000 !important;\n }\n\n /* Position-specific styles */\n .profiler-panel.position-top {\n bottom: auto;\n top: 0;\n border-top: none;\n border-bottom: 2px solid var(--profiler-border);\n transform: translateY(-100%);\n }\n\n .profiler-panel.position-top.visible {\n transform: translateY(0);\n }\n\n .profiler-panel.position-bottom {\n /* Default position - already defined above */\n }\n\n .profiler-panel.position-left {\n top: 0;\n bottom: 0;\n left: 0;\n right: auto;\n width: 350px;\n height: 100%;\n border-top: none;\n border-right: 2px solid var(--profiler-border);\n transform: translateX(-100%);\n }\n\n .profiler-panel.position-left.visible {\n transform: translateX(0);\n }\n\n .profiler-panel.position-right {\n top: 0;\n bottom: 0;\n left: auto;\n right: 0;\n width: 350px;\n height: 100%;\n border-top: none;\n border-left: 2px solid var(--profiler-border);\n transform: translateX(100%);\n }\n\n .profiler-panel.position-right.visible {\n transform: translateX(0);\n }\n\n .profiler-panel.position-floating {\n border: 2px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);\n transform: none !important;\n overflow: hidden;\n }\n\n .profiler-panel.position-floating.visible {\n transform: none !important;\n }\n\n .profiler-panel.position-floating .profiler-header {\n border-radius: 6px 6px 0 0;\n }\n\n .profiler-panel.position-floating .panel-resizer {\n bottom: 0;\n right: 0;\n top: auto;\n left: auto;\n width: 16px;\n height: 16px;\n cursor: nwse-resize;\n border-radius: 0 0 6px 0;\n }\n\n .profiler-panel.position-floating .panel-resizer::after {\n content: '';\n position: absolute;\n right: 2px;\n bottom: 2px;\n width: 10px;\n height: 10px;\n background: linear-gradient(135deg, transparent 0%, transparent 45%, var(--profiler-border) 45%, var(--profiler-border) 55%, transparent 55%);\n }\n\n\n .panel-resizer {\n position: absolute;\n top: -2px;\n left: 0;\n width: 100%;\n height: 5px;\n cursor: ns-resize;\n z-index: 1001;\n touch-action: none;\n }\n\n .profiler-panel.position-top .panel-resizer {\n top: auto;\n bottom: -2px;\n }\n\n .profiler-panel.position-left .panel-resizer {\n top: 0;\n left: auto;\n right: -2px;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n }\n\n .profiler-panel.position-right .panel-resizer {\n top: 0;\n left: -2px;\n right: auto;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n }\n\n .profiler-header {\n display: flex;\n background-color: var(--profiler-header-background);\n border-bottom: 1px solid var(--profiler-border);\n flex-shrink: 0;\n justify-content: space-between;\n align-items: stretch;\n\n overflow-x: auto;\n overflow-y: hidden;\n width: calc(100% - 120px);\n height: 32px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .profiler-panel.has-horizontal-scroll .profiler-header {\n height: 38px;\n }\n\n /* Adjust header width based on panel position */\n .profiler-panel.position-right .profiler-header,\n .profiler-panel.position-left .profiler-header {\n width: calc(100% - 120px);\n }\n\n .profiler-panel.position-bottom .profiler-header,\n .profiler-panel.position-top .profiler-header {\n width: calc(100% - 120px);\n }\n\n /* Adjust header width when position toggle button is hidden (mobile) */\n .profiler-panel.hide-position-toggle .profiler-header {\n width: calc(100% - 80px);\n }\n\n /* Adjust header width when maximized (floating position toggle button is hidden) */\n .profiler-panel.maximized .profiler-header {\n width: calc(100% - 80px);\n }\n\n /* ===== RULES FOR WHEN THERE ARE NO TABS ===== */\n\n /* Horizontal mode (bottom/top) without tabs */\n .profiler-panel.position-bottom.no-tabs:not(.maximized),\n .profiler-panel.position-top.no-tabs:not(.maximized) {\n height: 32px !important;\n min-height: 32px !important;\n }\n\n .profiler-panel.position-bottom.no-tabs .profiler-header,\n .profiler-panel.position-top.no-tabs .profiler-header {\n width: 100%;\n height: 32px;\n border-bottom: none;\n }\n\n .profiler-panel.position-bottom.no-tabs .profiler-content-wrapper,\n .profiler-panel.position-top.no-tabs .profiler-content-wrapper {\n display: none;\n }\n\n .profiler-panel.position-bottom.no-tabs .panel-resizer,\n .profiler-panel.position-top.no-tabs .panel-resizer {\n display: none;\n }\n\n /* Vertical mode (right/left) without tabs */\n .profiler-panel.position-right.no-tabs:not(.maximized),\n .profiler-panel.position-left.no-tabs:not(.maximized) {\n width: 40px !important;\n min-width: 40px !important;\n }\n\n /* Vertical layout for header when no tabs */\n .profiler-panel.position-right.no-tabs .profiler-header,\n .profiler-panel.position-left.no-tabs .profiler-header {\n width: 100%;\n flex-direction: column;\n height: 100%;\n border-bottom: none;\n }\n\n /* Vertical layout for controls when no tabs */\n .profiler-panel.position-right.no-tabs .profiler-controls,\n .profiler-panel.position-left.no-tabs .profiler-controls {\n position: static;\n flex-direction: column-reverse;\n justify-content: flex-end;\n width: 100%;\n height: 100%;\n border-bottom: none;\n border-left: none;\n background: transparent;\n }\n\n .profiler-panel.position-right.no-tabs .profiler-controls button,\n .profiler-panel.position-left.no-tabs .profiler-controls button {\n width: 100%;\n height: 40px;\n border-left: none;\n border-top: none;\n border-bottom: 1px solid var(--profiler-border);\n }\n\n .profiler-panel.position-right.no-tabs .profiler-content-wrapper,\n .profiler-panel.position-left.no-tabs .profiler-content-wrapper {\n display: none;\n }\n\n .profiler-panel.position-right.no-tabs .profiler-tabs,\n .profiler-panel.position-left.no-tabs .profiler-tabs {\n display: none;\n padding-left: 2px;\n }\n\n .profiler-panel.position-right.no-tabs .panel-resizer,\n .profiler-panel.position-left.no-tabs .panel-resizer {\n display: none;\n }\n\n /* Hide position toggle on mobile without tabs */\n .profiler-panel.hide-position-toggle.position-right.no-tabs:not(.maximized),\n .profiler-panel.hide-position-toggle.position-left.no-tabs:not(.maximized) {\n width: 40px !important;\n min-width: 40px !important;\n }\n\n /* Hide drag indicator on mobile devices */\n .profiler-panel.is-mobile .tab-btn.active::before {\n display: none;\n }\n\n .profiler-header::-webkit-scrollbar,\n .profiler-tabs::-webkit-scrollbar,\n .profiler-content::-webkit-scrollbar,\n .detached-tab-content::-webkit-scrollbar,\n .console-log::-webkit-scrollbar,\n .timelineTrack::-webkit-scrollbar,\n .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n }\n\n .profiler-header::-webkit-scrollbar-track,\n .profiler-tabs::-webkit-scrollbar-track,\n .profiler-content::-webkit-scrollbar-track,\n .detached-tab-content::-webkit-scrollbar-track,\n .console-log::-webkit-scrollbar-track,\n .timelineTrack::-webkit-scrollbar-track,\n .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .profiler-header::-webkit-scrollbar-thumb,\n .profiler-tabs::-webkit-scrollbar-thumb,\n .profiler-content::-webkit-scrollbar-thumb,\n .detached-tab-content::-webkit-scrollbar-thumb,\n .console-log::-webkit-scrollbar-thumb,\n .timelineTrack::-webkit-scrollbar-thumb,\n .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background-color: rgba(255, 255, 255, 0.15);\n border-radius: 2px;\n }\n\n .profiler-header::-webkit-scrollbar-thumb:hover,\n .profiler-tabs::-webkit-scrollbar-thumb:hover,\n .profiler-content::-webkit-scrollbar-thumb:hover,\n .detached-tab-content::-webkit-scrollbar-thumb:hover,\n .console-log::-webkit-scrollbar-thumb:hover,\n .timelineTrack::-webkit-scrollbar-thumb:hover,\n .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background-color: rgba(255, 255, 255, 0.3);\n }\n\n .profiler-header::-webkit-scrollbar-corner,\n .profiler-tabs::-webkit-scrollbar-corner,\n .profiler-content::-webkit-scrollbar-corner,\n .detached-tab-content::-webkit-scrollbar-corner,\n .console-log::-webkit-scrollbar-corner,\n .timelineTrack::-webkit-scrollbar-corner,\n .list-scroll-wrapper::-webkit-scrollbar-corner {\n background: transparent;\n }\n\n .profiler-header,\n .profiler-tabs,\n .profiler-content,\n .detached-tab-content,\n .console-log,\n .timelineTrack,\n .list-scroll-wrapper {\n scrollbar-width: thin;\n scrollbar-color: rgba(255, 255, 255, 0.15) transparent;\n }\n\n .profiler-panel.dragging .profiler-header {\n cursor: grabbing !important;\n }\n\n .profiler-panel.dragging {\n opacity: 0.8;\n }\n\n .profiler-tabs {\n display: flex;\n cursor: grab;\n position: relative;\n margin-left: 2px;\n }\n\n .profiler-tabs:active {\n cursor: grabbing;\n }\n\n\n .profiler-controls {\n display: flex;\n position: absolute;\n right: 0;\n top: 0;\n height: 32px;\n background: var(--profiler-header-background);\n border-bottom: 1px solid var(--profiler-border);\n }\n\n .profiler-panel.has-horizontal-scroll .profiler-controls {\n height: 38px;\n }\n\n .tab-btn {\n position: relative;\n background: transparent;\n border: none;\n /*border-right: 1px solid var(--profiler-border);*/\n color: var(--text-secondary);\n padding: 0 15px 2px 15px;\n height: 100%;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n align-items: center;\n font-family: var(--font-family);\n font-weight: 600;\n font-size: 13px;\n user-select: none;\n transition: opacity 0.2s, transform 0.2s;\n touch-action: pan-x;\n white-space: nowrap;\n }\n\n .tab-btn.active {\n border-bottom: 2px solid var(--color-accent);\n color: white;\n }\n\n .tab-btn.active::before {\n content: '';\n position: absolute;\n left: 2px;\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n height: 14px;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='14' viewBox='0 0 8 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='3' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='2' cy='7' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='2' cy='11' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='3' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='7' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='11' r='1' fill='%234a4a5a'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0.6;\n }\n\n .tab-btn.no-detach.active::before {\n display: none;\n }\n\n .floating-btn,\n .maximize-btn,\n .hide-panel-btn {\n background: transparent;\n border: none;\n border-left: 1px solid var(--profiler-border);\n color: var(--text-secondary);\n width: 40px;\n height: 100%;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n /* Disable transitions in vertical mode to avoid broken animations */\n .profiler-panel.position-right .floating-btn,\n .profiler-panel.position-right .maximize-btn,\n .profiler-panel.position-right .hide-panel-btn,\n .profiler-panel.position-left .floating-btn,\n .profiler-panel.position-left .maximize-btn,\n .profiler-panel.position-left .hide-panel-btn {\n transition: background-color 0.2s, color 0.2s;\n }\n\n .floating-btn:hover,\n .maximize-btn:hover,\n .hide-panel-btn:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-primary);\n }\n\n /* Hide maximize button when there are no tabs */\n .profiler-panel.position-right.no-tabs .maximize-btn,\n .profiler-panel.position-left.no-tabs .maximize-btn,\n .profiler-panel.position-bottom.no-tabs .maximize-btn,\n .profiler-panel.position-top.no-tabs .maximize-btn {\n display: none !important;\n }\n\n /* Hide floating button when maximized */\n .profiler-panel.maximized .floating-btn {\n display: none !important;\n }\n\n .profiler-content-wrapper {\n flex-grow: 1;\n overflow: hidden;\n position: relative;\n }\n\n .profiler-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n font-size: 13px;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s, visibility 0.2s;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .profiler-content.active {\n visibility: visible;\n opacity: 1;\n }\n\n .profiler-content {\n overflow: auto; /* make sure scrollbars can appear */\n }\n\n\n .list-item-row {\n display: grid;\n grid-template-columns: var(--list-grid-template, none);\n align-items: center;\n padding: 4px 8px;\n border-radius: 3px;\n transition: background-color 0.2s;\n gap: 10px;\n border-bottom: none;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .parameters .list-item-row {\n min-height: 23px;\n }\n\n .mini-panel-content .parameters .list-item-row {\n min-height: 21px;\n }\n\n .list-item-wrapper {\n margin-top: 2px;\n margin-bottom: 2px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-wrapper:has(> .list-item-row .graph-container) {\n margin-left: -1.5em;\n }\n\n .list-item-wrapper:first-child {\n /*margin-top: 0;*/\n }\n\n .list-item-wrapper:not(.header-wrapper):nth-child(odd) > .list-item-row {\n background-color: rgba(0,0,0,0.1);\n }\n\n .list-item-wrapper.header-wrapper>.list-item-row {\n color: var(--color-accent);\n background-color: rgba(0, 170, 255, 0.1);\n }\n\n .list-item-wrapper.header-wrapper>.list-item-row>.list-item-cell:first-child {\n font-weight: 600;\n }\n\n .list-item-row.collapsible,\n .list-item-row.actionable {\n cursor: pointer;\n }\n\n .list-item-row.collapsible {\n background-color: rgba(0, 170, 255, 0.15) !important;\n min-height: 23px;\n }\n\n .list-item-row.collapsible.alert,\n .list-item-row.alert {\n background-color: rgba(244, 67, 54, 0.1) !important;\n }\n\n @media (hover: hover) {\n\n .list-item-row:hover:not(.collapsible):not(.no-hover),\n .list-item-row:hover:not(.no-hover),\n .list-item-row.actionable:hover,\n .list-item-row.collapsible.actionable:hover {\n background-color: rgba(255, 255, 255, 0.05) !important;\n }\n\n .list-item-row.collapsible:hover {\n background-color: rgba(0, 170, 255, 0.25) !important;\n }\n\n }\n\n .list-item-cell {\n white-space: pre;\n display: flex;\n align-items: center;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-cell:not(:first-child) {\n justify-content: flex-end;\n font-weight: 600;\n }\n\n .list-header {\n display: grid;\n grid-template-columns: var(--list-grid-template, none);\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 display: none !important;\n }\n\n .item-toggler {\n display: inline-block;\n margin-right: 0.8em;\n text-align: left;\n }\n\n .list-item-row.open .item-toggler::before {\n content: '-';\n }\n\n .list-item-row:not(.open) .item-toggler::before {\n content: '+';\n }\n\n .list-item-cell .value.good {\n color: var(--color-green);\n }\n\n .list-item-cell .value.warn {\n color: var(--color-yellow);\n }\n\n .list-item-cell .value.bad {\n color: var(--color-red);\n }\n\n .list-scroll-wrapper {\n width: max-content;\n min-width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 100%;\n }\n\n .list-container.parameters .list-item-row:not(.collapsible) {\n }\n\n .graph-container {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 0;\n position: relative;\n }\n\n .graph-svg, .graph-canvas {\n width: 0;\n min-width: 100%;\n height: 80px;\n background-color: var(--profiler-header);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n display: block;\n }\n\n .graph-path {\n stroke-width: 2;\n fill-opacity: 0.4;\n }\n\n .console-buttons-group {\n display: flex;\n gap: 20px;\n }\n\n .console-filter-input {\n background-color: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 10px 2px 10px;\n font-family: var(--font-mono);\n flex-grow: 1;\n max-width: 300px;\n border-radius: 15px;\n }\n\n .console-filter-input:focus {\n outline: none;\n border-color: var(--text-secondary);\n }\n\n .console-copy-button {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: color 0.2s, background-color 0.2s;\n }\n\n .console-copy-button:hover {\n color: var(--text-primary);\n background-color: var(--profiler-hover);\n }\n\n .console-copy-button.copied {\n color: var(--color-green);\n }\n\n .console-log {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px;\n overflow-y: auto;\n flex-grow: 1;\n user-select: text;\n -webkit-user-select: text;\n }\n\n .log-message {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n padding: 3px 5px;\n border-radius: 3px;\n line-height: 1.5 !important;\n }\n\n .log-count-badge {\n display: inline-block;\n text-align: center;\n min-width: 14px;\n height: 14px;\n border-radius: 7px;\n padding: 0 3px;\n font-size: 9px;\n font-weight: bold;\n line-height: 14px;\n box-sizing: border-box;\n margin-top: 0;\n flex-shrink: 0;\n }\n\n .log-icon {\n display: inline-block;\n text-align: center;\n width: 14px;\n height: 14px;\n font-size: 11px;\n line-height: 14px;\n margin-top: 0;\n flex-shrink: 0;\n }\n\n .log-body {\n flex-grow: 1;\n white-space: pre-wrap;\n word-break: break-all;\n }\n\n .log-message.info .log-count-badge {\n background-color: rgba(255, 255, 255, 0.12);\n border: 1px solid rgba(255, 255, 255, 0.2);\n color: var(--text-secondary);\n }\n\n .log-message.warn .log-count-badge {\n background-color: rgba(255, 193, 7, 0.18);\n border: 1px solid rgba(255, 193, 7, 0.35);\n color: var(--color-yellow);\n }\n\n .log-message.error .log-count-badge {\n background-color: rgba(244, 67, 54, 0.18);\n border: 1px solid rgba(244, 67, 54, 0.35);\n color: #ff8a80;\n }\n\n .log-message.hidden {\n display: none;\n }\n\n .log-message.info {\n color: var(--text-primary);\n }\n\n .log-message.warn {\n color: var(--color-yellow);\n }\n\n .log-message.error {\n color: #f9dedc;\n background-color: rgba(244, 67, 54, 0.1);\n }\n\n .log-prefix {\n color: var(--text-secondary);\n margin-right: 8px;\n }\n\n .log-code {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 3px;\n padding: 1px 4px;\n }\n\n .thumbnail-container {\n display: flex;\n align-items: center;\n }\n\n .thumbnail-svg {\n width: 40px;\n height: 22.5px;\n flex-shrink: 0;\n margin-right: 8px;\n }\n\n .param-control {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n width: 100%;\n }\n\n .param-control input,\n .param-control select,\n .param-control button {\n background-color: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 6px;\n padding-bottom: 2px;\n font-family: var(--font-mono);\n width: 100%;\n box-sizing: border-box;\n color-scheme: dark;\n }\n\n .param-control input:focus {\n outline: none;\n border-color: var(--color-accent);\n }\n\n .param-control select {\n padding-top: 3px;\n padding-bottom: 1px;\n }\n\n .param-control input[type=\"number\"] {\n cursor: ns-resize;\n }\n\n .param-control input[type=\"color\"] {\n padding: 2px;\n }\n\n .param-control button {\n cursor: pointer;\n transition: background-color 0.2s;\n }\n\n .param-control button:hover {\n background-color: var(--profiler-header);\n }\n\n .param-control-vector {\n display: flex;\n gap: 5px;\n }\n\n .custom-checkbox {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n gap: 8px;\n will-change: transform;\n font-size: 12px;\n }\n\n .custom-checkbox input {\n display: none;\n }\n\n .custom-checkbox .checkmark {\n width: 14px;\n height: 14px;\n border: 1px solid var(--color-accent);\n border-radius: 3px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n transition: background-color 0.2s, border-color 0.2s;\n }\n\n .custom-checkbox .checkbox-text {\n font-size: 12px;\n margin-top: 1px;\n color: inherit;\n }\n\n .custom-checkbox .checkmark::after {\n content: '';\n width: 6px;\n height: 6px;\n background-color: var(--color-accent);\n border-radius: 1px;\n display: block;\n transform: scale(0);\n transition: transform 0.2s;\n }\n\n .list-container .custom-checkbox .checkmark {\n width: 13px;\n height: 13px;\n }\n\n .list-container .custom-checkbox .checkmark::after {\n width: 7px;\n height: 7px;\n }\n\n .custom-checkbox input:checked+.checkmark {\n border-color: var(--color-accent);\n }\n\n .custom-checkbox input:checked+.checkmark::after {\n transform: scale(1);\n }\n\n .param-control input[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n outline: none;\n padding: 0px;\n padding-top: 8px;\n }\n\n .param-control input[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n background: var(--profiler-background);\n border: 1px solid var(--color-accent);\n border-radius: 3px;\n cursor: pointer;\n margin-top: -8px;\n }\n\n .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 18px;\n height: 18px;\n background: var(--profiler-background);\n border: 2px solid var(--color-accent);\n border-radius: 3px;\n cursor: pointer;\n }\n\n .param-control input[type=\"range\"]::-moz-range-track {\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n }\n\n /* Override .param-control styles for mini-panel-content */\n .mini-panel-content input,\n .mini-panel-content select,\n .mini-panel-content button {\n padding: 2px 4px;\n height: 21px;\n line-height: 1.4;\n padding-top: 4px;\n }\n\n .mini-panel-content .param-control input,\n .mini-panel-content .param-control select,\n .mini-panel-content .param-control button {\n background-color: #1e1e24c2;\n line-height: 1.0;\n }\n\n .mini-panel-content .param-control select {\n padding: 2px 2px;\n padding-top: 3px;\n }\n\n .mini-panel-content .param-control input[type=\"number\"]::-webkit-outer-spin-button,\n .mini-panel-content .param-control input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .mini-panel-content .param-control input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n .mini-panel-content .list-item-cell span {\n position: relative;\n top: 1px;\n margin-left: 2px;\n }\n\n @media screen and (max-width: 340px) {\n\n .mini-panel-content .list-item-cell:first-child {\n display: flex;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n width: 100%;\n }\n\n .mini-panel-content .list-item-cell:first-child .value {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1 1 0%;\n min-width: 0;\n }\n\n .mini-panel-content .list-item-cell:first-child .info-icon {\n flex-shrink: 0;\n }\n\n }\n\n .mini-panel-content .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n margin-bottom: 2px;\n will-change: transform;\n }\n\n .mini-panel-content .list-container.parameters .list-item-row:not(.collapsible) {\n margin-bottom: 2px;\n }\n\n .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:first-child:has(> .list-item-row:not(.collapsible)) {\n margin-top: 2px;\n }\n\n .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:last-child:has(> .list-item-row:not(.collapsible)) {\n margin-bottom: 4px;\n }\n\n @media screen and (max-width: 450px) and (orientation: portrait) {\n\n .console-filter-input {\n max-width: 100px;\n }\n\n }\n\n /* Touch device optimizations */\n @media (hover: none) and (pointer: coarse) {\n\n .panel-resizer {\n top: -10px !important;\n height: 20px !important;\n }\n\n .profiler-panel.position-top .panel-resizer {\n top: auto !important;\n bottom: -10px !important;\n height: 20px !important;\n }\n\n .profiler-panel.position-left .panel-resizer {\n right: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .profiler-panel.position-right .panel-resizer {\n left: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .detached-tab-resizer-top,\n .detached-tab-resizer-bottom {\n height: 10px !important;\n }\n\n .detached-tab-resizer-left,\n .detached-tab-resizer-right {\n width: 10px !important;\n }\n\n }\n\n .drag-preview-indicator {\n position: absolute;\n background-color: rgba(0, 170, 255, 0.2);\n border: 2px dashed var(--color-accent);\n z-index: 999;\n pointer-events: none;\n transition: all 0.2s ease-out;\n }\n\n /* Detached Tab Windows */\n .detached-tab-panel {\n position: absolute;\n width: 500px;\n height: 400px;\n background: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);\n z-index: 1002;\n display: flex;\n flex-direction: column;\n backdrop-filter: blur(10px);\n overflow: hidden;\n opacity: 1;\n visibility: visible;\n transition: opacity 0.2s, visibility 0.2s;\n font-family: var(--font-mono);\n font-size: 13px;\n }\n\n\n .detached-tab-header {\n background: var(--profiler-header-background);\n padding: 0 3px 0 10px;\n font-family: var(--font-family);\n font-size: 13px;\n color: var(--text-primary);\n font-weight: 600;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--profiler-border);\n cursor: grab;\n user-select: none;\n height: 32px;\n flex-shrink: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n touch-action: none;\n }\n\n .detached-tab-header:active {\n cursor: grabbing;\n }\n\n .detached-header-controls {\n display: flex;\n gap: 5px;\n }\n\n .detached-reattach-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n font-family: var(--font-family);\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n .detached-reattach-btn:hover {\n background: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .detached-tab-content {\n flex: 1;\n overflow: hidden;\n position: relative;\n background: var(--profiler-background);\n }\n\n\n .detached-tab-content .profiler-content {\n display: flex !important;\n flex-direction: column !important;\n height: 100%;\n visibility: visible !important;\n opacity: 1 !important;\n position: relative !important;\n }\n\n .detached-tab-content .profiler-content > * {\n font-family: var(--font-mono);\n color: var(--text-primary);\n }\n\n .detached-tab-resizer {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 20px;\n height: 20px;\n cursor: nwse-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer::after {\n content: '';\n position: absolute;\n bottom: 2px;\n right: 2px;\n width: 12px;\n height: 12px;\n border-right: 2px solid var(--profiler-border);\n border-bottom: 2px solid var(--profiler-border);\n border-bottom-right-radius: 6px;\n opacity: 0.5;\n }\n\n .detached-tab-resizer:hover::after {\n opacity: 1;\n border-color: var(--color-accent);\n }\n\n /* Edge resizers */\n .detached-tab-resizer-top {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-right {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-bottom {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-left {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n }\n\n /* Input number spin buttons - hide arrows */\n /* Chrome, Safari, Edge, Opera */\n .profiler-panel input[type=\"number\"]::-webkit-outer-spin-button,\n .profiler-panel input[type=\"number\"]::-webkit-inner-spin-button,\n .detached-tab-content input[type=\"number\"]::-webkit-outer-spin-button,\n .detached-tab-content input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n .profiler-panel input[type=\"number\"],\n .detached-tab-content input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n .panel-action-btn {\n background: transparent;\n color: var(--text-primary);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: 12px;\n transition: background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .panel-action-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .node-canvas-wrapper {\n touch-action: none;\n }\n\n .node-canvas-wrapper .node-canvas-detach-btn {\n position: absolute;\n top: 5px;\n right: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-detach-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .node-canvas-wrapper .node-canvas-fullscreen-btn {\n position: absolute;\n bottom: 5px;\n right: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-fullscreen-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .profiler-panel.maximized .node-canvas-fullscreen-btn {\n display: none;\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 32px;\n padding: 4px 6px;\n border-bottom: 1px solid var(--profiler-border);\n background: var(--profiler-header-background);\n flex-shrink: 0;\n box-sizing: border-box;\n gap: 16px;\n }\n\n .toolbar span {\n color: var(--text-secondary);\n font-size: 12px;\n font-weight: 600;\n }\n\n .toolbar .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n border-radius: 4px;\n }\n\n .viewer-content .toolbar {\n justify-content: flex-end;\n }\n\n .viewer-back-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n padding: 4px 8px;\n border-radius: 4px;\n margin-right: auto;\n transition: color 0.2s, background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .viewer-back-btn:hover {\n color: var(--text-primary);\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n select {\n color-scheme: dark;\n }\n\n select option,\n option {\n background-color: #1e1e24;\n color: var(--text-primary);\n }\n\n .select {\n background: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 16px 2px 6px;\n font-family: var(--font-mono);\n font-size: 12px;\n outline: none;\n cursor: pointer;\n color-scheme: dark;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0e0e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right 5px center;\n background-size: 10px;\n }\n\n .select:focus {\n border-color: var(--color-accent);\n }\n\n .full-viewer-container {\n display: none;\n flex-grow: 1;\n width: 100%;\n height: 100%;\n overflow: hidden;\n position: relative;\n touch-action: none;\n }\n\n .node-canvas-wrapper .node-canvas-split-btn {\n position: absolute;\n top: 5px;\n left: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-split-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .node-canvas-wrapper .node-canvas-split-btn.active,\n .node-canvas-wrapper .node-canvas-fullscreen-btn.active {\n background-color: var(--color-accent) !important;\n border-color: var(--color-accent) !important;\n color: white !important;\n }\n\n .split-screen-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none !important;\n z-index: 999;\n touch-action: none;\n overflow: hidden;\n }\n\n .split-screen-line {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 1px;\n left: 50%;\n background-color: transparent;\n cursor: ew-resize;\n pointer-events: auto !important;\n z-index: 10;\n touch-action: none;\n transition: background-color 0.15s ease-out;\n }\n\n .split-screen-line:hover,\n .split-screen-line:active,\n .split-screen-line.active {\n background-color: var(--color-accent);\n }\n\n .split-screen-line::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -12px;\n width: 25px;\n background: transparent;\n cursor: ew-resize;\n }\n\n .split-screen-line::after {\n content: '';\n position: absolute;\n top: -1px;\n bottom: -1px;\n left: -5px;\n width: 11px;\n pointer-events: none;\n background-image:\n url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 -1 L5.5 7 L11.5 -1 Z' fill='rgba(30,30,36,0.85)' stroke='%234a4a5a' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E\"),\n url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 8 L5.5 0 L11.5 8 Z' fill='rgba(30,30,36,0.85)' stroke='%234a4a5a' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E\");\n background-position: top center, bottom center;\n background-repeat: no-repeat;\n opacity: 1;\n transition: opacity 0.15s ease-out;\n }\n\n .split-screen-line:hover::after,\n .split-screen-line:active::after,\n .split-screen-line.active::after {\n opacity: 1;\n background-image:\n url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 -1 L5.5 7 L11.5 -1 Z' fill='%2300aaff' stroke='%2300aaff' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E\"),\n url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 8 L5.5 0 L11.5 8 Z' fill='%2300aaff' stroke='%2300aaff' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E\");\n }\n\n /* Grid Mode styles for List component */\n .list-scroll-wrapper:has(> .list-container.grid-mode) {\n width: 100% !important;\n }\n\n .list-container.grid-mode {\n min-width: 0 !important;\n width: 100% !important;\n box-sizing: border-box;\n }\n\n .list-container.grid-mode .list-header {\n display: none !important;\n }\n\n .list-container.grid-mode .list-children-container {\n display: flex;\n flex-wrap: wrap;\n gap: 15px;\n padding-left: 0 !important;\n margin-top: 10px;\n margin-bottom: 15px;\n width: 100%;\n box-sizing: border-box;\n }\n\n .list-container.grid-mode .list-children-container > .list-item-wrapper {\n display: inline-block;\n width: 160px;\n margin: 0;\n }\n\n .list-container.grid-mode .list-children-container > .list-item-wrapper > .list-item-row {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n /*background-color: var(--profiler-header);\n border: 1px solid var(--profiler-border);*/\n border-radius: 6px;\n padding: 8px;\n gap: 8px;\n width: 100%;\n box-sizing: border-box;\n grid-template-columns: none !important;\n }\n\n .list-container.grid-mode .list-children-container > .list-item-wrapper > .list-item-row > .list-item-cell:first-child {\n width: 140px;\n height: 140px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n }\n\n .list-container.grid-mode .list-children-container > .list-item-wrapper > .list-item-row > .list-item-cell:not(:first-child) {\n width: 100%;\n text-align: center !important;\n font-size: 11px;\n font-weight: 500;\n color: var(--text-primary);\n white-space: normal;\n word-break: break-all;\n justify-content: center !important;\n }\n\n /* Timeline Info & Details */\n .timeline-detail-block {\n font-size: 11px;\n margin-left: 8px;\n color: var(--text-secondary);\n opacity: 1;\n }\n\n .timeline-detail-key,\n .timeline-detail-sep,\n .timeline-call-count {\n opacity: 0.5;\n }\n\n .timeline-detail-value {\n color: var(--text-secondary);\n opacity: 1;\n }\n\n .timeline-info-group {\n display: inline-flex;\n align-items: center;\n margin-left: 12px;\n flex-shrink: 0;\n }\n\n .timeline-info-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-right: 6px;\n flex-shrink: 0;\n }\n\n .timeline-info-dot.fps {\n background-color: var(--color-fps);\n }\n\n .timeline-info-dot.call {\n background-color: var(--color-call);\n }\n\n .timeline-info-dot.red {\n background-color: var(--color-red);\n }\n\n}\n", e.appendChild(n);
292
293
  }
293
- }, ln = class {
294
+ }, dn = class {
294
295
  constructor(e = 512) {
295
296
  this.maxPoints = e, this.lines = {}, this.limit = 0, this.limitIndex = 0, this.domElement = document.createElement("canvas"), this.domElement.setAttribute("class", "graph-canvas"), this.ctx = this.domElement.getContext("2d"), this.width = 0, this.height = 0, this.devicePixelRatio = window.devicePixelRatio || 1;
296
297
  }
@@ -361,9 +362,9 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
361
362
  };
362
363
  }
363
364
  dispose() {}
364
- }, un = class extends oe {
365
+ }, fn = class extends se {
365
366
  constructor(e, t = {}) {
366
- super(), this.inspector = e, this.nonce = t.nonce ?? e?.nonce ?? null, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, this.horizontalAlign = "right", this.verticalAlign = "top", this.setupShell(), this.setupResizing(), cn.init(this.domElement, this.nonce), this.updateWidgetPosition(), this.setupWindowResizeListener(), this.setupOrientationListener(), this.checkHeaderScroll(), this.panel.addEventListener("transitionend", (e) => {
367
+ super(), this.inspector = e, this.nonce = t.nonce ?? e?.nonce ?? null, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, this.horizontalAlign = "right", this.verticalAlign = "top", this.setupShell(), this.setupResizing(), un.init(this.domElement, this.nonce), this.updateWidgetPosition(), this.setupWindowResizeListener(), this.setupOrientationListener(), this.checkHeaderScroll(), this.panel.addEventListener("transitionend", (e) => {
367
368
  e.target === this.panel && (e.propertyName === "width" || e.propertyName === "height" || e.propertyName === "transform") && this.checkHeaderScroll();
368
369
  });
369
370
  }
@@ -436,7 +437,7 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
436
437
  let i = document.createElement("button");
437
438
  i.classList.add("hide-panel-btn"), i.textContent = "-", i.onclick = () => this.togglePanel(), r.append(this.floatingBtn, this.maximizeBtn, i), n.append(this.tabsContainer, r), this.contentWrapper = document.createElement("div"), this.contentWrapper.className = "profiler-content-wrapper";
438
439
  let a = document.createElement("div");
439
- a.className = "panel-resizer", this.panel.append(a, n, this.contentWrapper), this.domElement.append(this.toggleButton, this.miniPanel, this.panel), this.panel.classList.add(`position-${this.position}`), this.position === "right" && (this.toggleButton.classList.add("position-right"), this.miniPanel.classList.add("position-right")), this.toggleGraph = new ln(80), this.toggleGraph.addLine("fps", "#4c4c6bff"), this.toggleGraph.domElement.className = "profiler-toggle-graph", this.toggleButton.appendChild(this.toggleGraph.domElement);
440
+ a.className = "panel-resizer", this.panel.append(a, n, this.contentWrapper), this.domElement.append(this.toggleButton, this.miniPanel, this.panel), this.panel.classList.add(`position-${this.position}`), this.position === "right" && (this.toggleButton.classList.add("position-right"), this.miniPanel.classList.add("position-right")), this.toggleGraph = new dn(80), this.toggleGraph.addLine("fps", "#4c4c6bff"), this.toggleGraph.domElement.className = "profiler-toggle-graph", this.toggleButton.appendChild(this.toggleGraph.domElement);
440
441
  }
441
442
  setupResizing() {
442
443
  let e = this.panel.querySelector(".panel-resizer");
@@ -736,7 +737,7 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
736
737
  });
737
738
  });
738
739
  try {
739
- Gn("layout", e);
740
+ qn("layout", e);
740
741
  } catch (e) {
741
742
  console.warn("Failed to save profiler layout:", e);
742
743
  }
@@ -744,7 +745,7 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
744
745
  loadLayout() {
745
746
  this.isLoadingLayout = !0;
746
747
  try {
747
- let e = Wn("layout");
748
+ let e = Kn("layout");
748
749
  if (Object.keys(e).length === 0) return;
749
750
  if (e.detachedTabs && e.detachedTabs.length > 0) {
750
751
  let t = window.innerWidth, n = window.innerHeight;
@@ -822,7 +823,7 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
822
823
  for (let e of this.detachedWindows) e.panel.remove();
823
824
  this.toggleGraph.dispose();
824
825
  }
825
- }, dn = class extends oe {
826
+ }, pn = class extends se {
826
827
  constructor(e, t = {}) {
827
828
  super(), this.id = e.toLowerCase().replace(/\s+/g, "-"), this.button = document.createElement("button"), this.button.className = "tab-btn", this.button.textContent = e, this.content = document.createElement("div"), this.content.className = "profiler-content", this.content.classList.add(`${this.id}-content`), this._isActive = !1, this.isVisible = !0, this.isDetached = !1, this.detachedWindow = null, this.allowDetach = t.allowDetach === void 0 ? !0 : t.allowDetach, this.builtin = t.builtin === void 0 ? !1 : t.builtin, this.icon = t.icon || null, this.builtinButton = null, this.miniContent = null, this.profiler = null, this.onVisibilityChange = null;
828
829
  }
@@ -863,7 +864,7 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
863
864
  }
864
865
  }
865
866
  dispose() {}
866
- }, fn = class {
867
+ }, mn = class {
867
868
  constructor(...e) {
868
869
  this.headers = e, this.children = [], this.domElement = document.createElement("div"), this.domElement.className = "list-container", this.domElement.style.padding = "5px 10px 10px 10px", this.id = `list-${Math.random().toString(36).slice(2, 11)}`, this.domElement.dataset.listId = this.id;
869
870
  let t = document.createElement("div");
@@ -885,7 +886,7 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
885
886
  let t = this.children.indexOf(e);
886
887
  return t !== -1 && (this.children.splice(t, 1), this.domElement.removeChild(e.domElement), e.parent = null), this;
887
888
  }
888
- }, K = class {
889
+ }, G = class {
889
890
  constructor(...e) {
890
891
  this.children = [], this.isOpen = !0, this.isCollapsible = !1, 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.forEach((e, t) => {
891
892
  let n = document.createElement("div");
@@ -936,14 +937,14 @@ var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE_
936
937
  };
937
938
  //#endregion
938
939
  //#region ../../node_modules/three/examples/jsm/inspector/ui/utils.js
939
- function q() {
940
+ function K() {
940
941
  let e = document.createElement("span");
941
942
  return e.className = "value", e;
942
943
  }
943
- function J(e, t) {
944
+ function q(e, t) {
944
945
  e && e.textContent !== t && (e.textContent = t);
945
946
  }
946
- function pn(e) {
947
+ function hn(e) {
947
948
  let t = e.lastIndexOf("/");
948
949
  return t === -1 ? {
949
950
  path: "",
@@ -953,10 +954,10 @@ function pn(e) {
953
954
  name: e.substring(t + 1).trim()
954
955
  };
955
956
  }
956
- function mn(e) {
957
+ function gn(e) {
957
958
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
958
959
  }
959
- function Y(e, t = 2) {
960
+ function J(e, t = 2) {
960
961
  if (e === 0) return "0 Bytes";
961
962
  let n = 1024, r = t < 0 ? 0 : t, i = [
962
963
  "Bytes",
@@ -971,7 +972,7 @@ function Y(e, t = 2) {
971
972
  ], a = Math.floor(Math.log(e) / Math.log(n));
972
973
  return parseFloat((e / n ** +a).toFixed(r)) + " " + i[a];
973
974
  }
974
- function hn(e, t) {
975
+ function _n(e, t) {
975
976
  let n = e.querySelector(".info-icon");
976
977
  if (!n) n = document.createElement("span"), n.className = "info-icon", n.textContent = "i", e.appendChild(n);
977
978
  else {
@@ -1001,36 +1002,36 @@ function hn(e, t) {
1001
1002
  }
1002
1003
  //#endregion
1003
1004
  //#region ../../node_modules/three/examples/jsm/inspector/tabs/Performance.js
1004
- var gn = class extends dn {
1005
+ var vn = class extends pn {
1005
1006
  constructor(e = {}) {
1006
1007
  super("Performance", e);
1007
- let t = new fn("Name", "CPU", "GPU", "Total");
1008
+ let t = new mn("Name", "CPU", "GPU", "Total");
1008
1009
  t.setGridStyle("minmax(200px, 2fr) 80px 80px 80px"), t.domElement.style.minWidth = "600px";
1009
1010
  let n = document.createElement("div");
1010
1011
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
1011
1012
  let r = document.createElement("div");
1012
1013
  r.className = "graph-container";
1013
- let i = new ln();
1014
- i.addLine("fps", "var( --color-fps )"), i.addLine("cpu", "var( --color-yellow )"), i.addLine("gpu", "var( --color-green )"), r.append(i.domElement), this.graphFpsCounter = q();
1015
- let a = new K("Graph Stats", q(), q(), this.graphFpsCounter);
1014
+ let i = new dn();
1015
+ i.addLine("fps", "var( --color-fps )"), i.addLine("cpu", "var( --color-yellow )"), i.addLine("gpu", "var( --color-green )"), r.append(i.domElement), this.graphFpsCounter = K();
1016
+ let a = new G("Graph Stats", K(), K(), this.graphFpsCounter);
1016
1017
  t.add(a);
1017
- let o = new K(r);
1018
+ let o = new G(r);
1018
1019
  o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o);
1019
- let s = new K("Frame Stats", q(), q(), q());
1020
+ let s = new G("Frame Stats", K(), K(), K());
1020
1021
  t.add(s);
1021
- let c = new K("Miscellaneous & Idle", q(), q(), q());
1022
+ let c = new G("Miscellaneous & Idle", K(), K(), K());
1022
1023
  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();
1023
1024
  }
1024
1025
  resolveStats(e, t) {
1025
1026
  let n = e.getStatsData(t.cid), r = n.item;
1026
- 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;
1027
+ if (r === void 0) r = new G(K(), K(), K(), K()), 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;
1027
1028
  else {
1028
1029
  r.userData.name = t.name, this.notInUse.has(t.cid) && (r.domElement.firstElementChild.classList.remove("alert"), this.notInUse.delete(t.cid));
1029
1030
  let e = t.parent.children.indexOf(t);
1030
1031
  (r.parent === null || r.parent.children.indexOf(r) !== e) && this.currentItem.add(r, e);
1031
1032
  }
1032
1033
  let i = r.userData.name;
1033
- 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));
1034
+ t.isComputeStats && (i += " [ Compute ]"), q(r.data[0], i), q(r.data[1], n.cpu.toFixed(2)), q(r.data[2], t.gpuNotAvailable === !0 ? "-" : n.gpu.toFixed(2)), q(r.data[3], n.total.toFixed(2));
1034
1035
  let a = this.currentItem;
1035
1036
  this.currentItem = r;
1036
1037
  for (let n of t.children) this.resolveStats(e, n);
@@ -1054,7 +1055,7 @@ var gn = class extends dn {
1054
1055
  let { item: t, time: n } = this.notInUse.get(e), r = performance.now(), i = 5 - Math.floor((r - n) / 1e3);
1055
1056
  if (i >= 0) {
1056
1057
  let e = "*".repeat(Math.max(0, i));
1057
- J(t.domElement.querySelector(".list-item-cell .value"), t.userData.name + " (not in use) " + e);
1058
+ q(t.domElement.querySelector(".list-item-cell .value"), t.userData.name + " (not in use) " + e);
1058
1059
  } else t.domElement.firstElementChild.classList.remove("alert"), t.parent.remove(t), this.notInUse.delete(e);
1059
1060
  }
1060
1061
  updateText(e, t) {
@@ -1063,23 +1064,23 @@ var gn = class extends dn {
1063
1064
  for (let n of t.children) this.resolveStats(e, n);
1064
1065
  for (let [e, t] of n) this.frameItems.has(e) || (this.addNotInUse(e, t), n.delete(e));
1065
1066
  for (let e of this.notInUse.keys()) this.updateNotInUse(e);
1066
- J(this.graphFpsCounter, e.fps.toFixed() + " FPS"), J(this.frameStats.data[1], t.cpu.toFixed(2)), J(this.frameStats.data[2], e.getRenderer().backend.hasTimestamp ? t.gpu.toFixed(2) : "-"), J(this.frameStats.data[3], t.total.toFixed(2)), J(this.miscellaneous.data[1], t.miscellaneous.toFixed(2)), J(this.miscellaneous.data[2], "-"), J(this.miscellaneous.data[3], t.miscellaneous.toFixed(2)), this.currentItem = null;
1067
+ q(this.graphFpsCounter, e.fps.toFixed() + " FPS"), q(this.frameStats.data[1], t.cpu.toFixed(2)), q(this.frameStats.data[2], e.getRenderer().backend.hasTimestamp ? t.gpu.toFixed(2) : "-"), q(this.frameStats.data[3], t.total.toFixed(2)), q(this.miscellaneous.data[1], t.miscellaneous.toFixed(2)), q(this.miscellaneous.data[2], "-"), q(this.miscellaneous.data[3], t.miscellaneous.toFixed(2)), this.currentItem = null;
1067
1068
  }
1068
- }, _n = class extends dn {
1069
+ }, yn = class extends pn {
1069
1070
  constructor(e = {}) {
1070
1071
  super("Memory", e);
1071
- let t = new fn("Name", "Count", "Size");
1072
+ let t = new mn("Name", "Count", "Size");
1072
1073
  t.setGridStyle("minmax(200px, 2fr) 60px 100px"), t.domElement.style.minWidth = "300px";
1073
1074
  let n = document.createElement("div");
1074
1075
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
1075
1076
  let r = document.createElement("div");
1076
1077
  r.className = "graph-container";
1077
- let i = new ln();
1078
+ let i = new dn();
1078
1079
  i.addLine("total", "var( --color-yellow )"), r.append(i.domElement);
1079
- let a = new K("Graph Stats", "", "");
1080
+ let a = new G("Graph Stats", "", "");
1080
1081
  t.add(a);
1081
- let o = new K(r);
1082
- 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.uniformBuffers = new K("Uniform Buffers", q(), q()), this.memoryStats.add(this.uniformBuffers), this.graph = i;
1082
+ let o = new G(r);
1083
+ o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o), this.memoryStats = new G("Renderer Info", "", K()), this.memoryStats.domElement.firstChild.classList.add("no-hover"), t.add(this.memoryStats), this.attributes = new G("Attributes", K(), K()), this.memoryStats.add(this.attributes), this.geometries = new G("Geometries", K(), "N/A"), this.memoryStats.add(this.geometries), this.indexAttributes = new G("Index Attributes", K(), K()), this.memoryStats.add(this.indexAttributes), this.indirectStorageAttributes = new G("Indirect Storage Attributes", K(), K()), this.memoryStats.add(this.indirectStorageAttributes), this.programs = new G("Programs", K(), K()), this.memoryStats.add(this.programs), this.readbackBuffers = new G("Readback Buffers", K(), K()), this.memoryStats.add(this.readbackBuffers), this.renderTargets = new G("Render Targets", K(), "N/A"), this.memoryStats.add(this.renderTargets), this.storageAttributes = new G("Storage Attributes", K(), K()), this.memoryStats.add(this.storageAttributes), this.textures = new G("Textures", K(), K()), this.memoryStats.add(this.textures), this.uniformBuffers = new G("Uniform Buffers", K(), K()), this.memoryStats.add(this.uniformBuffers), this.graph = i;
1083
1084
  }
1084
1085
  updateGraph(e) {
1085
1086
  let t = e.getRenderer().info.memory;
@@ -1087,9 +1088,9 @@ var gn = class extends dn {
1087
1088
  }
1088
1089
  updateText(e) {
1089
1090
  let t = e.getRenderer().info.memory;
1090
- J(this.memoryStats.data[2], Y(t.total)), J(this.attributes.data[1], t.attributes.toString()), J(this.attributes.data[2], Y(t.attributesSize)), J(this.geometries.data[1], t.geometries.toString()), J(this.indexAttributes.data[1], t.indexAttributes.toString()), J(this.indexAttributes.data[2], Y(t.indexAttributesSize)), J(this.indirectStorageAttributes.data[1], t.indirectStorageAttributes.toString()), J(this.indirectStorageAttributes.data[2], Y(t.indirectStorageAttributesSize)), J(this.programs.data[1], t.programs.toString()), J(this.programs.data[2], Y(t.programsSize)), J(this.readbackBuffers.data[1], t.readbackBuffers.toString()), J(this.readbackBuffers.data[2], Y(t.readbackBuffersSize)), J(this.renderTargets.data[1], t.renderTargets.toString()), J(this.storageAttributes.data[1], t.storageAttributes.toString()), J(this.storageAttributes.data[2], Y(t.storageAttributesSize)), J(this.textures.data[1], t.textures.toString()), J(this.textures.data[2], Y(t.texturesSize)), J(this.uniformBuffers.data[1], t.uniformBuffers.toString()), J(this.uniformBuffers.data[2], Y(t.uniformBuffersSize));
1091
+ q(this.memoryStats.data[2], J(t.total)), q(this.attributes.data[1], t.attributes.toString()), q(this.attributes.data[2], J(t.attributesSize)), q(this.geometries.data[1], t.geometries.toString()), q(this.indexAttributes.data[1], t.indexAttributes.toString()), q(this.indexAttributes.data[2], J(t.indexAttributesSize)), q(this.indirectStorageAttributes.data[1], t.indirectStorageAttributes.toString()), q(this.indirectStorageAttributes.data[2], J(t.indirectStorageAttributesSize)), q(this.programs.data[1], t.programs.toString()), q(this.programs.data[2], J(t.programsSize)), q(this.readbackBuffers.data[1], t.readbackBuffers.toString()), q(this.readbackBuffers.data[2], J(t.readbackBuffersSize)), q(this.renderTargets.data[1], t.renderTargets.toString()), q(this.storageAttributes.data[1], t.storageAttributes.toString()), q(this.storageAttributes.data[2], J(t.storageAttributesSize)), q(this.textures.data[1], t.textures.toString()), q(this.textures.data[2], J(t.texturesSize)), q(this.uniformBuffers.data[1], t.uniformBuffers.toString()), q(this.uniformBuffers.data[2], J(t.uniformBuffersSize));
1091
1092
  }
1092
- }, vn = class extends dn {
1093
+ }, bn = class extends pn {
1093
1094
  constructor(e = {}) {
1094
1095
  super("Console", e), this.filters = {
1095
1096
  info: !0,
@@ -1198,7 +1199,7 @@ var gn = class extends dn {
1198
1199
  }
1199
1200
  this.logContainer.scrollTop = this.logContainer.scrollHeight, this.isActive || (e === "error" ? (this.unreadErrors++, this.updateBadges()) : e === "warn" && (this.unreadWarns++, this.updateBadges()));
1200
1201
  }
1201
- }, X = class extends oe {
1202
+ }, Y = class extends se {
1202
1203
  constructor() {
1203
1204
  super(), this.domElement = document.createElement("div"), this.domElement.className = "param-control", this._onChangeFunction = null, this._changeTimeout = null, this._debounceTime = 0, this.addEventListener("change", (e) => {
1204
1205
  clearTimeout(this._changeTimeout), this._changeTimeout = setTimeout(() => {
@@ -1230,7 +1231,7 @@ var gn = class extends dn {
1230
1231
  hide() {
1231
1232
  return this.dispatchEvent({ type: "hide" }), this;
1232
1233
  }
1233
- }, yn = class extends X {
1234
+ }, xn = class extends Y {
1234
1235
  constructor({ value: e = 0, step: t = .1, min: n = -Infinity, max: r = Infinity }) {
1235
1236
  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();
1236
1237
  }
@@ -1261,7 +1262,7 @@ var gn = class extends dn {
1261
1262
  getValue() {
1262
1263
  return parseFloat(this.input.value);
1263
1264
  }
1264
- }, bn = class extends X {
1265
+ }, Sn = class extends Y {
1265
1266
  constructor({ value: e = !1 }) {
1266
1267
  super();
1267
1268
  let t = document.createElement("label");
@@ -1279,10 +1280,10 @@ var gn = class extends dn {
1279
1280
  getValue() {
1280
1281
  return this.checkbox.checked;
1281
1282
  }
1282
- }, xn = class extends X {
1283
+ }, Cn = class extends Y {
1283
1284
  constructor({ value: e = 0, min: t = 0, max: n = 1, step: r = .01 }) {
1284
1285
  super(), this.slider = document.createElement("input"), this.slider.type = "range", this.slider.min = t, this.slider.max = n, this.slider.step = r;
1285
- let i = new yn({
1286
+ let i = new xn({
1286
1287
  value: e,
1287
1288
  min: t,
1288
1289
  max: n,
@@ -1303,7 +1304,7 @@ var gn = class extends dn {
1303
1304
  step(e) {
1304
1305
  return this.slider.step = e, this.numberInput.step = e, this.slider.value = parseFloat(this.numberInput.value), this;
1305
1306
  }
1306
- }, Sn = class extends X {
1307
+ }, wn = class extends Y {
1307
1308
  constructor({ options: e = [], value: t = "" }) {
1308
1309
  super();
1309
1310
  let n = document.createElement("select"), r = (e, r) => {
@@ -1326,7 +1327,7 @@ var gn = class extends dn {
1326
1327
  let e = this.options;
1327
1328
  return Array.isArray(e) ? e[this.select.selectedIndex] : e[this.select.value];
1328
1329
  }
1329
- }, Cn = class extends X {
1330
+ }, Tn = class extends Y {
1330
1331
  constructor({ value: e = "#ffffff" }) {
1331
1332
  super();
1332
1333
  let t = document.createElement("input");
@@ -1346,13 +1347,13 @@ var gn = class extends dn {
1346
1347
  let e = this._value;
1347
1348
  return typeof e == "string" && (e = parseInt(e.slice(1), 16)), e;
1348
1349
  }
1349
- }, wn = class extends X {
1350
+ }, En = class extends Y {
1350
1351
  constructor({ text: e = "Button", value: t = () => {} }) {
1351
1352
  super();
1352
1353
  let n = document.createElement("button");
1353
1354
  n.textContent = e, n.onclick = t, this.domElement.appendChild(n);
1354
1355
  }
1355
- }, Tn = class extends X {
1356
+ }, Dn = class extends Y {
1356
1357
  constructor({ value: e = "" }) {
1357
1358
  super();
1358
1359
  let t = document.createElement("input");
@@ -1366,9 +1367,9 @@ var gn = class extends dn {
1366
1367
  getValue() {
1367
1368
  return this.input.value;
1368
1369
  }
1369
- }, En = class e {
1370
+ }, On = class e {
1370
1371
  constructor(e, t) {
1371
- this.parameters = e, this.paramList = new K(t), this.paramList.setCollapsible(!0), this.objects = [];
1372
+ this.parameters = e, this.paramList = new G(t), this.paramList.setCollapsible(!0), this.objects = [];
1372
1373
  }
1373
1374
  close() {
1374
1375
  return this.paramList.close(), this;
@@ -1387,7 +1388,7 @@ var gn = class extends dn {
1387
1388
  return typeof n[0] == "object" ? i = this.addSelect(e, t, n[0]) : r === "number" ? i = n.length >= 2 ? this.addSlider(e, t, ...n) : this.addNumber(e, t, ...n) : r === "boolean" ? i = this.addBoolean(e, t) : r === "string" ? i = this.addString(e, t) : r === "function" && (i = this.addButton(e, t, ...n)), i;
1388
1389
  }
1389
1390
  _addInfo(e, t) {
1390
- e.info = (n) => (hn(t, n), e);
1391
+ e.info = (n) => (_n(t, n), e);
1391
1392
  }
1392
1393
  _addParameter(e, t, n, r) {
1393
1394
  n.name = (e) => (r.data[0].childNodes.length > 0 && r.data[0].firstChild.nodeType === 3 ? r.data[0].firstChild.textContent = e : r.data[0].insertBefore(document.createTextNode(e), r.data[0].firstChild), n), this._addInfo(n, r.data[0]), n.listen = () => {
@@ -1407,13 +1408,13 @@ var gn = class extends dn {
1407
1408
  }), n.addEventListener("show", () => r.show()), n.addEventListener("hide", () => r.hide());
1408
1409
  }
1409
1410
  addString(e, t) {
1410
- let n = e[t], r = new Tn({ value: n });
1411
+ let n = e[t], r = new Dn({ value: n });
1411
1412
  r.addEventListener("change", ({ value: n }) => {
1412
1413
  e[t] = n;
1413
1414
  });
1414
- let i = q();
1415
+ let i = K();
1415
1416
  i.textContent = t;
1416
- let a = new K(i, r.domElement);
1417
+ let a = new G(i, r.domElement);
1417
1418
  return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
1418
1419
  }
1419
1420
  addFolder(t) {
@@ -1421,13 +1422,13 @@ var gn = class extends dn {
1421
1422
  return this.paramList.add(n.paramList), n;
1422
1423
  }
1423
1424
  addBoolean(e, t) {
1424
- let n = e[t], r = new bn({ value: n });
1425
+ let n = e[t], r = new Sn({ value: n });
1425
1426
  r.addEventListener("change", ({ value: n }) => {
1426
1427
  e[t] = n;
1427
1428
  });
1428
- let i = q();
1429
+ let i = K();
1429
1430
  i.textContent = t;
1430
- let a = new K(i, r.domElement);
1431
+ let a = new G(i, r.domElement);
1431
1432
  this.paramList.add(a);
1432
1433
  let o = a.domElement.firstChild;
1433
1434
  return o.classList.add("actionable"), o.addEventListener("click", (e) => {
@@ -1437,30 +1438,30 @@ var gn = class extends dn {
1437
1438
  }), this._addParameter(e, t, r, a), r;
1438
1439
  }
1439
1440
  addSelect(e, t, n) {
1440
- let r = e[t], i = new Sn({
1441
+ let r = e[t], i = new wn({
1441
1442
  options: n,
1442
1443
  value: r
1443
1444
  });
1444
1445
  i.addEventListener("change", ({ value: n }) => {
1445
1446
  e[t] = n;
1446
1447
  });
1447
- let a = q();
1448
+ let a = K();
1448
1449
  a.textContent = t;
1449
- let o = new K(a, i.domElement);
1450
+ let o = new G(a, i.domElement);
1450
1451
  return this.paramList.add(o), o.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, i, o), i;
1451
1452
  }
1452
1453
  addColor(e, t) {
1453
- let n = e[t], r = new Cn({ value: n });
1454
+ let n = e[t], r = new Tn({ value: n });
1454
1455
  r.addEventListener("change", ({ value: n }) => {
1455
1456
  e[t] = n;
1456
1457
  });
1457
- let i = q();
1458
+ let i = K();
1458
1459
  i.textContent = t;
1459
- let a = new K(i, r.domElement);
1460
+ let a = new G(i, r.domElement);
1460
1461
  return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
1461
1462
  }
1462
1463
  addSlider(e, t, n = 0, r = 1, i = .01) {
1463
- let a = e[t], o = new xn({
1464
+ let a = e[t], o = new Cn({
1464
1465
  value: a,
1465
1466
  min: n,
1466
1467
  max: r,
@@ -1469,13 +1470,13 @@ var gn = class extends dn {
1469
1470
  o.addEventListener("change", ({ value: n }) => {
1470
1471
  e[t] = n;
1471
1472
  });
1472
- let s = q();
1473
+ let s = K();
1473
1474
  s.textContent = t;
1474
- let c = new K(s, o.domElement);
1475
+ let c = new G(s, o.domElement);
1475
1476
  return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
1476
1477
  }
1477
1478
  addNumber(e, t, ...n) {
1478
- let r = e[t], [i, a] = n, o = new yn({
1479
+ let r = e[t], [i, a] = n, o = new xn({
1479
1480
  value: r,
1480
1481
  min: i,
1481
1482
  max: a
@@ -1483,101 +1484,101 @@ var gn = class extends dn {
1483
1484
  o.addEventListener("change", ({ value: n }) => {
1484
1485
  e[t] = n;
1485
1486
  });
1486
- let s = q();
1487
+ let s = K();
1487
1488
  s.textContent = t;
1488
- let c = new K(s, o.domElement);
1489
+ let c = new G(s, o.domElement);
1489
1490
  return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
1490
1491
  }
1491
1492
  addButton(e, t) {
1492
- let n = e[t], r = new wn({
1493
+ let n = e[t], r = new En({
1493
1494
  text: t,
1494
1495
  value: n
1495
1496
  });
1496
1497
  r.addEventListener("change", ({ value: n }) => {
1497
1498
  e[t] = n;
1498
1499
  });
1499
- let i = new K(r.domElement);
1500
+ let i = new G(r.domElement);
1500
1501
  return i.itemRow.childNodes[0].style.gridColumn = "1 / -1", this.paramList.add(i), i.domElement.firstChild.classList.add("actionable"), r.name = (e) => {
1501
1502
  let t = r.domElement.childNodes[0];
1502
1503
  return t.childNodes.length > 0 && t.firstChild.nodeType === 3 ? t.firstChild.textContent = e : t.insertBefore(document.createTextNode(e), t.firstChild), r;
1503
1504
  }, this._addInfo(r, r.domElement.childNodes[0]), this._registerParameter(e, t, r, i), r;
1504
1505
  }
1505
- }, Dn = class extends dn {
1506
+ }, kn = class extends pn {
1506
1507
  constructor(e = {}) {
1507
1508
  super(e.name || "Parameters", e);
1508
- let t = new fn("Property", "Value");
1509
+ let t = new mn("Property", "Value");
1509
1510
  t.domElement.classList.add("parameters"), t.setGridStyle(".5fr 1fr"), t.domElement.style.minWidth = "300px";
1510
1511
  let n = document.createElement("div");
1511
1512
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n), this.paramList = t, this.groups = [];
1512
1513
  }
1513
1514
  createGroup(e) {
1514
- let t = new En(this, e);
1515
+ let t = new On(this, e);
1515
1516
  return this.paramList.add(t.paramList), this.groups.push(t), t;
1516
1517
  }
1517
- }, On = [{
1518
+ }, An = [{
1518
1519
  name: "Color Grading",
1519
1520
  url: "../extensions/color-grading/ColorGrading.js"
1520
1521
  }, {
1521
1522
  name: "TSL Graph",
1522
1523
  url: "../extensions/tsl-graph/TSLGraphEditor.js"
1523
- }], kn = Oe.prototype.init;
1524
- function An(e) {
1525
- e ? Oe.prototype.init = async function() {
1524
+ }], jn = Ae.prototype.init;
1525
+ function Mn(e) {
1526
+ e ? Ae.prototype.init = async function() {
1526
1527
  if (this.backend.isWebGLBackend !== !0) {
1527
1528
  let e = this.backend.parameters;
1528
- this.backend = new ke(e);
1529
+ this.backend = new je(e);
1529
1530
  }
1530
- return kn.call(this);
1531
- } : Oe.prototype.init = kn;
1531
+ return jn.call(this);
1532
+ } : Ae.prototype.init = jn;
1532
1533
  }
1533
- var Z = null;
1534
- function jn() {
1535
- if (Z !== null) return Z;
1536
- let e = Wn("settings");
1537
- return Z = {
1534
+ var X = null;
1535
+ function Nn() {
1536
+ if (X !== null) return X;
1537
+ let e = Kn("settings");
1538
+ return X = {
1538
1539
  forceWebGL: e.forceWebGL === void 0 ? !1 : e.forceWebGL,
1539
1540
  captureStackTrace: e.captureStackTrace === void 0 ? !1 : e.captureStackTrace,
1540
1541
  activeExtensions: e.activeExtensions === void 0 ? {} : e.activeExtensions,
1541
1542
  storage: e.storage === void 0 ? "url" : e.storage
1542
- }, Z.forceWebGL && An(!0), Z.captureStackTrace && (Ce.captureStackTrace = !0), Z;
1543
+ }, X.forceWebGL && Mn(!0), X.captureStackTrace && (Te.captureStackTrace = !0), X;
1543
1544
  }
1544
- function Mn() {
1545
- Gn("settings", {
1546
- forceWebGL: Z.forceWebGL,
1547
- captureStackTrace: Z.captureStackTrace,
1548
- activeExtensions: Z.activeExtensions,
1549
- storage: Z.storage
1545
+ function Pn() {
1546
+ qn("settings", {
1547
+ forceWebGL: X.forceWebGL,
1548
+ captureStackTrace: X.captureStackTrace,
1549
+ activeExtensions: X.activeExtensions,
1550
+ storage: X.storage
1550
1551
  });
1551
1552
  }
1552
- jn();
1553
- var Nn = class extends Dn {
1553
+ Nn();
1554
+ var Fn = class extends kn {
1554
1555
  constructor() {
1555
1556
  super({ name: "Settings" }), this.extensions = {};
1556
- let e = jn(), t = this.createGroup("Renderer");
1557
+ let e = Nn(), t = this.createGroup("Renderer");
1557
1558
  t.add(e, "forceWebGL").name("Force WebGL").onChange((e) => {
1558
- An(e), Mn(), location.reload();
1559
+ Mn(e), Pn(), location.reload();
1559
1560
  }), t.add(e, "captureStackTrace").name("Capture Stack Trace").onChange((e) => {
1560
- Ce.captureStackTrace = e, Mn(), location.reload();
1561
+ Te.captureStackTrace = e, Pn(), location.reload();
1561
1562
  }), this.createGroup("Render Modes").add({ overdraw: !1 }, "overdraw").name("Overdraw").onChange((e) => {
1562
1563
  this.inspector.overdraw = e;
1563
1564
  }).info("Shows how many times each pixel is shaded.");
1564
1565
  }
1565
1566
  init() {
1566
- let e = this.createGroup("Extensions"), t = this.createGroup("Storage"), n = jn();
1567
+ let e = this.createGroup("Extensions"), t = this.createGroup("Storage"), n = Nn();
1567
1568
  t.add(n, "storage", {
1568
1569
  "URL Session": "url",
1569
1570
  "Keep across Origin": "origin"
1570
1571
  }).name("Save Settings").onChange(() => {
1571
- Mn();
1572
+ Pn();
1572
1573
  }).info("\nDefines how the **Inspector** preferences and states are stored in the browser.\n\n**URL Session**\nSaves state based on the exact URL. It will reset the settings whenever the URL changes.\n\n**Keep across Origin**\nShares the same state across any page within the current origin."), t.add({ clear: () => {
1573
1574
  localStorage.removeItem("threejs-inspector"), location.reload();
1574
1575
  } }, "clear").name("Clear Settings"), this._getExtensions().then((t) => {
1575
1576
  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) => {
1576
- this.setActiveExtension(n.name, e), e ? Z.activeExtensions[n.name] = {
1577
+ this.setActiveExtension(n.name, e), e ? X.activeExtensions[n.name] = {
1577
1578
  name: n.name,
1578
1579
  url: n.url
1579
- } : delete Z.activeExtensions[n.name], this._updateExtensionUI(n), Mn();
1580
- }), Z.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
1580
+ } : delete X.activeExtensions[n.name], this._updateExtensionUI(n), Pn();
1581
+ }), X.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
1581
1582
  });
1582
1583
  }
1583
1584
  async setActiveExtension(e, t) {
@@ -1585,7 +1586,7 @@ var Nn = class extends Dn {
1585
1586
  n && (t ? await this._loadExtension(r, n) : await this._unloadExtension(r, n));
1586
1587
  }
1587
1588
  _updateExtensionUI(e) {
1588
- 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");
1589
+ e.active && X.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");
1589
1590
  }
1590
1591
  async _unloadExtension(e, t) {
1591
1592
  t.active !== !1 && (e.removeTab(t.tab), t.active = !1, t.loaded = !1, t.tab = null, this._updateExtensionUI(t), this.dispatchEvent({
@@ -1604,17 +1605,17 @@ var Nn = class extends Dn {
1604
1605
  });
1605
1606
  }
1606
1607
  async _getExtensions() {
1607
- return On;
1608
+ return An;
1608
1609
  }
1609
- }, Pn = /* @__PURE__ */ new d(), Fn = "<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\"><line x1=\"12\" y1=\"1\" x2=\"12\" y2=\"23\"></line><polyline points=\"5 8 1 12 5 16\"></polyline><polyline points=\"19 8 23 12 19 16\"></polyline></svg>", In = "<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=\"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3\"/></svg>", Ln = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg>", Rn = /* @__PURE__ */ H(([e, t, n]) => {
1610
- let r = F(0);
1611
- Et(() => {
1610
+ }, In = /* @__PURE__ */ new d(), Ln = "<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\"><line x1=\"12\" y1=\"1\" x2=\"12\" y2=\"23\"></line><polyline points=\"5 8 1 12 5 16\"></polyline><polyline points=\"19 8 23 12 19 16\"></polyline></svg>", Rn = "<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=\"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3\"/></svg>", zn = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg>", Bn = /* @__PURE__ */ V(([e, t, n]) => {
1611
+ let r = P(0);
1612
+ Ot(() => {
1612
1613
  let { width: e, height: n } = t.value;
1613
1614
  r.value = e / n;
1614
1615
  });
1615
- let i = n.div(r), a = e.sub(.5), o = U(a.x.mul(i), a.y).add(.5), s = U(a.x, a.y.div(i)).add(.5), c = n.greaterThan(r).select(o, s);
1616
- return M(c, Wt(0, c.x).mul(Wt(c.x, 1)).mul(Wt(0, c.y)).mul(Wt(c.y, 1)));
1617
- }), zn = class extends dn {
1616
+ let i = n.div(r), a = e.sub(.5), o = H(a.x.mul(i), a.y).add(.5), s = H(a.x, a.y.div(i)).add(.5), c = n.greaterThan(r).select(o, s);
1617
+ return j(c, Kt(0, c.x).mul(Kt(c.x, 1)).mul(Kt(0, c.y)).mul(Kt(c.y, 1)));
1618
+ }), Vn = class extends pn {
1618
1619
  constructor(e = {}) {
1619
1620
  super("Viewer", e), this.content.style.overflow = "hidden", this.maximizedByFullscreenButton = !1;
1620
1621
  let t = document.createElement("div");
@@ -1627,13 +1628,13 @@ var Nn = class extends Dn {
1627
1628
  i.className = "select", i.style.width = "200px";
1628
1629
  let a = document.createElement("option");
1629
1630
  a.value = "list", a.textContent = "List", i.appendChild(a), t.appendChild(i);
1630
- let o = new fn("Viewer", "Name");
1631
+ let o = new mn("Viewer", "Name");
1631
1632
  o.setGridStyle("150px minmax(200px, 2fr)"), o.domElement.style.minWidth = "400px", this.nodeList = o, this.content.appendChild(t);
1632
1633
  let s = document.createElement("div");
1633
1634
  s.className = "list-scroll-wrapper", s.style.flexGrow = "1", s.style.overflowY = "auto", s.style.minHeight = "0", s.appendChild(o.domElement), this.content.appendChild(s);
1634
1635
  let c = document.createElement("div");
1635
1636
  c.className = "full-viewer-container", c.style.touchAction = "none", this.content.appendChild(c);
1636
- let l = new K("User Defined");
1637
+ let l = new G("User Defined");
1637
1638
  l.setCollapsible(!0), o.add(l), this.itemLibrary = /* @__PURE__ */ new Map(), this.folderLibrary = /* @__PURE__ */ new Map(), this.canvasNodes = /* @__PURE__ */ new Map(), this.currentDataList = [], this.nodes = l, this.scrollWrapper = s, this.fullViewerContainer = c, this.select = i, this.backBtn = n, this.activeFullNodeId = null, this.pendingRestoreView = !0, this.splitActive = !1, this.splitCanvasData = null, this.splitOverlay = null, this.splitLine = null, this.splitQuad = null, this.splitMaterial = null, this.splitUniforms = null, this.splitCanvas = null, this.splitCanvasTarget = null, n.addEventListener("click", () => {
1638
1639
  this.splitActive && this.stopSplitMode(), i.value = "list", this.showListView(), this.maximizedByFullscreenButton &&= (this.profiler && this.profiler.panel.classList.contains("maximized") && this.profiler.toggleMaximize(), !1), this.saveLastView();
1639
1640
  }), i.addEventListener("change", () => {
@@ -1649,7 +1650,7 @@ var Nn = class extends Dn {
1649
1650
  }
1650
1651
  getFolder(e) {
1651
1652
  let t = this.folderLibrary.get(e);
1652
- return t === void 0 && (t = new K(e), t.setCollapsible(!0), this.folderLibrary.set(e, t), this.nodeList.add(t)), t;
1653
+ return t === void 0 && (t = new G(e), t.setCollapsible(!0), this.folderLibrary.set(e, t), this.nodeList.add(t)), t;
1653
1654
  }
1654
1655
  hide() {
1655
1656
  super.hide(), this.maximizedByFullscreenButton = !1, this.isDraggingThumbnail = !1, this.activeSourceCanvas = null, this.activePointerIds.clear(), this.splitActive && this.stopSplitMode();
@@ -1664,13 +1665,13 @@ var Nn = class extends Dn {
1664
1665
  t.stopPropagation(), this.splitActive && this.stopSplitMode(), this.select.value = e.id, this.showNodeView(e.id), this.saveLastView();
1665
1666
  };
1666
1667
  let o = document.createElement("button");
1667
- o.className = "node-canvas-fullscreen-btn", o.title = "Fullscreen view", o.innerHTML = In, o.onclick = (t) => {
1668
+ o.className = "node-canvas-fullscreen-btn", o.title = "Fullscreen view", o.innerHTML = Rn, o.onclick = (t) => {
1668
1669
  t.stopPropagation(), this.splitActive && this.splitCanvasData === e && this.splitFullscreen ? this.stopSplitMode() : (this.splitFullscreen = !0, this.startSplitMode(e));
1669
1670
  };
1670
1671
  let s = document.createElement("button");
1671
- s.className = "node-canvas-split-btn", s.title = "Interactive split screen", s.innerHTML = Fn, s.onclick = (t) => {
1672
+ s.className = "node-canvas-split-btn", s.title = "Interactive split screen", s.innerHTML = Ln, s.onclick = (t) => {
1672
1673
  t.stopPropagation(), this.splitActive && this.splitCanvasData === e && !this.splitFullscreen ? this.stopSplitMode() : (this.splitFullscreen = !1, this.startSplitMode(e));
1673
- }, i.appendChild(r), i.appendChild(a), i.appendChild(o), i.appendChild(s), this.setupEventForwarding(r), e.domElement = r, e.wrapperElement = i, e.splitBtn = s, e.fullscreenBtn = o, t = new K(i, n), t.itemRow.children[1].style["justify-content"] = "flex-start", this.itemLibrary.set(e.id, t);
1674
+ }, i.appendChild(r), i.appendChild(a), i.appendChild(o), i.appendChild(s), this.setupEventForwarding(r), e.domElement = r, e.wrapperElement = i, e.splitBtn = s, e.fullscreenBtn = o, t = new G(i, n), t.itemRow.children[1].style["justify-content"] = "flex-start", this.itemLibrary.set(e.id, t);
1674
1675
  }
1675
1676
  return t;
1676
1677
  }
@@ -1762,7 +1763,7 @@ var Nn = class extends Dn {
1762
1763
  startSplitMode(e) {
1763
1764
  this.profiler && this.profiler.panel.classList.contains("visible") && this.profiler.togglePanel(), this.splitActive = !0, this.splitCanvasData = e, this.splitX = .5;
1764
1765
  let t = this.inspector.getRenderer(), n = t.domElement, r = n.getBoundingClientRect(), i = document.fullscreenElement || this.profiler.domElement, a = i.getBoundingClientRect(), o = r.left - a.left, s = r.top - a.top;
1765
- if (this.splitCanvas || (this.splitCanvas = document.createElement("canvas"), this.splitCanvas.style.position = "absolute", this.splitCanvas.style.pointerEvents = "none", this.splitCanvas.style.zIndex = "998", this.splitCanvasTarget = new Me(this.splitCanvas), this.splitCanvasTarget.setPixelRatio(window.devicePixelRatio)), this.splitCanvas.style.left = `${o}px`, this.splitCanvas.style.top = `${s}px`, this.splitCanvas.style.width = `${r.width}px`, this.splitCanvas.style.height = `${r.height}px`, this.splitCanvasTarget.setSize(r.width, r.height), t.backend.delete(this.splitCanvasTarget), i.appendChild(this.splitCanvas), this.splitFullscreen) this.splitOverlay && this.splitOverlay.parentElement && this.splitOverlay.parentElement.removeChild(this.splitOverlay);
1766
+ if (this.splitCanvas || (this.splitCanvas = document.createElement("canvas"), this.splitCanvas.style.position = "absolute", this.splitCanvas.style.pointerEvents = "none", this.splitCanvas.style.zIndex = "998", this.splitCanvasTarget = new Pe(this.splitCanvas), this.splitCanvasTarget.setPixelRatio(window.devicePixelRatio)), this.splitCanvas.style.left = `${o}px`, this.splitCanvas.style.top = `${s}px`, this.splitCanvas.style.width = `${r.width}px`, this.splitCanvas.style.height = `${r.height}px`, this.splitCanvasTarget.setSize(r.width, r.height), t.backend.delete(this.splitCanvasTarget), i.appendChild(this.splitCanvas), this.splitFullscreen) this.splitOverlay && this.splitOverlay.parentElement && this.splitOverlay.parentElement.removeChild(this.splitOverlay);
1766
1767
  else {
1767
1768
  if (!this.splitOverlay) {
1768
1769
  let e = document.createElement("div");
@@ -1783,32 +1784,32 @@ var Nn = class extends Dn {
1783
1784
  this.splitOverlay.style.left = `${o}px`, this.splitOverlay.style.top = `${s}px`, this.splitOverlay.style.width = `${r.width}px`, this.splitOverlay.style.height = `${r.height}px`, this.splitLine.style.left = "50%", i.appendChild(this.splitOverlay);
1784
1785
  }
1785
1786
  this.splitUniforms ||= {
1786
- splitX: F(.5),
1787
- viewportWidth: F(r.width)
1787
+ splitX: P(.5),
1788
+ viewportWidth: P(r.width)
1788
1789
  }, this.splitUniforms.splitX.value = .5, this.splitUniforms.viewportWidth.value = r.width;
1789
- let c = Ot(L(M(e.node.context({ getUV: () => Ht })), 1), 0, t.outputColorSpace).context({ inspector: !0 }), l;
1790
- l = this.splitFullscreen ? c : H(() => (Ht.x.lessThan(this.splitUniforms.splitX).discard(), c))(), this.splitMaterial && this.splitMaterial.dispose(), this.splitMaterial = new k(), this.splitMaterial.outputNode = l, this.splitMaterial.depthTest = !1, this.splitMaterial.depthWrite = !1, this.splitQuad ? this.splitQuad.material = this.splitMaterial : this.splitQuad = new Ae(this.splitMaterial), this.updateSplitButtonsState();
1790
+ let c = At(I(j(e.node.context({ getUV: () => Wt })), 1), 0, t.outputColorSpace).context({ inspector: !0 }), l;
1791
+ l = this.splitFullscreen ? c : V(() => (Wt.x.lessThan(this.splitUniforms.splitX).discard(), c))(), this.splitMaterial && this.splitMaterial.dispose(), this.splitMaterial = new O(), this.splitMaterial.outputNode = l, this.splitMaterial.depthTest = !1, this.splitMaterial.depthWrite = !1, this.splitQuad ? this.splitQuad.material = this.splitMaterial : this.splitQuad = new Me(this.splitMaterial), this.updateSplitButtonsState();
1791
1792
  }
1792
1793
  stopSplitMode() {
1793
1794
  this.splitActive = !1, this.splitCanvasData = null, this.splitFullscreen = !1, this.splitOverlay && this.splitOverlay.parentElement && this.splitOverlay.parentElement.removeChild(this.splitOverlay), this.splitCanvas && this.splitCanvas.parentElement && this.splitCanvas.parentElement.removeChild(this.splitCanvas), this.updateSplitButtonsState();
1794
1795
  }
1795
1796
  updateSplitButtonsState() {
1796
1797
  this.splitActive ? this.backBtn.style.display = "" : this.select.value === "list" ? this.backBtn.style.display = "none" : this.backBtn.style.display = "";
1797
- for (let e of this.canvasNodes.values()) !e.splitBtn || !e.fullscreenBtn || (this.splitActive && this.splitCanvasData === e ? this.splitFullscreen ? (e.fullscreenBtn.classList.add("active"), e.fullscreenBtn.innerHTML = Ln, e.fullscreenBtn.title = "Exit Fullscreen", e.splitBtn.classList.remove("active"), e.splitBtn.innerHTML = Fn, e.splitBtn.title = "Interactive split screen") : (e.splitBtn.classList.add("active"), e.splitBtn.innerHTML = Ln, e.splitBtn.title = "Exit Split Screen", e.fullscreenBtn.classList.remove("active"), e.fullscreenBtn.innerHTML = In, e.fullscreenBtn.title = "Fullscreen view") : (e.splitBtn.classList.remove("active"), e.splitBtn.innerHTML = Fn, e.splitBtn.title = "Interactive split screen", e.fullscreenBtn.classList.remove("active"), e.fullscreenBtn.innerHTML = In, e.fullscreenBtn.title = "Fullscreen view"));
1798
+ for (let e of this.canvasNodes.values()) !e.splitBtn || !e.fullscreenBtn || (this.splitActive && this.splitCanvasData === e ? this.splitFullscreen ? (e.fullscreenBtn.classList.add("active"), e.fullscreenBtn.innerHTML = zn, e.fullscreenBtn.title = "Exit Fullscreen", e.splitBtn.classList.remove("active"), e.splitBtn.innerHTML = Ln, e.splitBtn.title = "Interactive split screen") : (e.splitBtn.classList.add("active"), e.splitBtn.innerHTML = zn, e.splitBtn.title = "Exit Split Screen", e.fullscreenBtn.classList.remove("active"), e.fullscreenBtn.innerHTML = Rn, e.fullscreenBtn.title = "Fullscreen view") : (e.splitBtn.classList.remove("active"), e.splitBtn.innerHTML = Ln, e.splitBtn.title = "Interactive split screen", e.fullscreenBtn.classList.remove("active"), e.fullscreenBtn.innerHTML = Rn, e.fullscreenBtn.title = "Fullscreen view"));
1798
1799
  }
1799
1800
  getCanvasDataByNode(e, t) {
1800
1801
  let n = this.canvasNodes.get(t);
1801
1802
  if (n === void 0) {
1802
- let r = new Me(document.createElement("canvas"));
1803
+ let r = new Pe(document.createElement("canvas"));
1803
1804
  r.setPixelRatio(window.devicePixelRatio), r.setSize(140, 140);
1804
- let i = t.id, { path: a, name: o } = pn(mn(t.getName() || "(unnamed)")), s = F(1), c = V(1), l = L(M(t.context({ getUV: (e) => {
1805
- let t = Rn(Ht, e, s), n = t.xy;
1805
+ let i = t.id, { path: a, name: o } = hn(gn(t.getName() || "(unnamed)")), s = P(1), c = B(1), l = I(j(t.context({ getUV: (e) => {
1806
+ let t = Bn(Wt, e, s), n = t.xy;
1806
1807
  return c.assign(t.z), n;
1807
1808
  } })), 1).mul(c);
1808
- l = Ot(l, 0, e.outputColorSpace), l = l.context({ inspector: !0 });
1809
- let u = new k();
1809
+ l = At(l, 0, e.outputColorSpace), l = l.context({ inspector: !0 });
1810
+ let u = new O();
1810
1811
  u.outputNode = l;
1811
- let d = new Ae(u);
1812
+ let d = new Me(u);
1812
1813
  d.name = "Viewer - " + o, n = {
1813
1814
  id: i,
1814
1815
  name: o,
@@ -1829,8 +1830,8 @@ var Nn = class extends Dn {
1829
1830
  if (t.width <= 0 || t.height <= 0) return;
1830
1831
  let r = document.fullscreenElement || this.profiler.domElement, i = r.getBoundingClientRect(), a = t.left - i.left, o = t.top - i.top;
1831
1832
  this.splitCanvas.parentElement !== r && r.appendChild(this.splitCanvas), this.splitOverlay && !this.splitFullscreen && this.splitOverlay.parentElement !== r && r.appendChild(this.splitOverlay), this.splitCanvas.style.left = `${a}px`, this.splitCanvas.style.top = `${o}px`, this.splitCanvas.style.width = `${t.width}px`, this.splitCanvas.style.height = `${t.height}px`, this.splitOverlay && !this.splitFullscreen && (this.splitOverlay.style.left = `${a}px`, this.splitOverlay.style.top = `${o}px`, this.splitOverlay.style.width = `${t.width}px`, this.splitOverlay.style.height = `${t.height}px`), (this.splitCanvasTarget.width !== t.width || this.splitCanvasTarget.height !== t.height) && (this.splitCanvasTarget.setSize(t.width, t.height), this.splitUniforms && this.splitUniforms.viewportWidth && (this.splitUniforms.viewportWidth.value = t.width), n.backend.delete(this.splitCanvasTarget));
1832
- let s = n.getCanvasTarget(), c = n.getClearColor(new ue()), l = n.getClearAlpha(), u = A.resetRendererState(n);
1833
- n.toneMapping = 0, n.outputColorSpace = e, n.setCanvasTarget(this.splitCanvasTarget), n.setClearColor(0, 0), this.splitQuad.render(n), n.setCanvasTarget(s), n.setClearColor(c, l), A.restoreRendererState(n, u);
1833
+ let s = n.getCanvasTarget(), c = n.getClearColor(new de()), l = n.getClearAlpha(), u = k.resetRendererState(n);
1834
+ n.toneMapping = 0, n.outputColorSpace = e, n.setCanvasTarget(this.splitCanvasTarget), n.setClearColor(0, 0), this.splitQuad.render(n), n.setCanvasTarget(s), n.setClearColor(c, l), k.restoreRendererState(n, u);
1834
1835
  }
1835
1836
  let r = t.getNodes();
1836
1837
  if (r.length > 0) {
@@ -1854,7 +1855,7 @@ var Nn = class extends Dn {
1854
1855
  }
1855
1856
  let t = !1;
1856
1857
  if (this.pendingRestoreView) {
1857
- let e = Wn("viewerLastView");
1858
+ let e = Kn("viewerLastView");
1858
1859
  if (e !== "list") {
1859
1860
  for (let n = 0; n < this.select.options.length; n++) if (this.select.options[n].textContent === e) {
1860
1861
  this.select.selectedIndex = n;
@@ -1892,7 +1893,7 @@ var Nn = class extends Dn {
1892
1893
  let e = this.getFolder(a);
1893
1894
  s[a] === void 0 && (s[a] = 0), (e.parent === null || r.parent !== e || e.children.indexOf(r) !== s[a]) && e.add(r), s[a]++;
1894
1895
  } else r.parent || this.nodes.add(r);
1895
- let o = [], c = i.getDrawingBufferSize(Pn);
1896
+ let o = [], c = i.getDrawingBufferSize(In);
1896
1897
  t.node.traverse((e) => {
1897
1898
  if (e.isRTTNode && e.autoResize === !0) {
1898
1899
  let t = e.width, n = e.height;
@@ -1903,8 +1904,8 @@ var Nn = class extends Dn {
1903
1904
  });
1904
1905
  }
1905
1906
  });
1906
- let l = A.resetRendererState(n);
1907
- n.toneMapping = 0, n.outputColorSpace = e, n.setCanvasTarget(t.canvasTarget), t.canvasAspect && (t.canvasAspect.value = t.canvasTarget.domElement.width / t.canvasTarget.domElement.height), t.quad.render(n), n.setCanvasTarget(i), A.restoreRendererState(n, l);
1907
+ let l = k.resetRendererState(n);
1908
+ n.toneMapping = 0, n.outputColorSpace = e, n.setCanvasTarget(t.canvasTarget), t.canvasAspect && (t.canvasAspect.value = t.canvasTarget.domElement.width / t.canvasTarget.domElement.height), t.quad.render(n), n.setCanvasTarget(i), k.restoreRendererState(n, l);
1908
1909
  for (let e of o) e.node.width = e.oldWidth, e.node.height = e.oldHeight;
1909
1910
  }
1910
1911
  this.currentDataList = i;
@@ -1913,10 +1914,10 @@ var Nn = class extends Dn {
1913
1914
  super.setActive(e);
1914
1915
  }
1915
1916
  saveLastView() {
1916
- if (this.select.value === "list") Gn("viewerLastView", "list");
1917
+ if (this.select.value === "list") qn("viewerLastView", "list");
1917
1918
  else {
1918
1919
  let e = this.select.options[this.select.selectedIndex];
1919
- e && Gn("viewerLastView", e.textContent);
1920
+ e && qn("viewerLastView", e.textContent);
1920
1921
  }
1921
1922
  }
1922
1923
  dispose() {
@@ -1924,9 +1925,9 @@ var Nn = class extends Dn {
1924
1925
  for (let e of this.canvasNodes.values()) e.canvasTarget.dispose(), e.material.dispose();
1925
1926
  this.canvasNodes.clear(), super.dispose();
1926
1927
  }
1927
- }, Bn = 500, Vn = 60, Hn = class extends dn {
1928
+ }, Hn = 500, Un = 60, Wn = class extends pn {
1928
1929
  constructor(e = {}) {
1929
- super("Timeline", e), this.content.style.overflow = "hidden", this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.activeBlocks = /* @__PURE__ */ new Map(), this.domPool = [], this.originalBackend = null, this.originalMethods = /* @__PURE__ */ new Map(), this.renderer = null, this.graph = new ln(Bn), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )"), this.buildHeader(), this.buildUI(), window.addEventListener("resize", () => {
1930
+ super("Timeline", e), this.content.style.overflow = "hidden", this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.activeBlocks = /* @__PURE__ */ new Map(), this.domPool = [], this.originalBackend = null, this.originalMethods = /* @__PURE__ */ new Map(), this.renderer = null, this.graph = new dn(Hn), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )"), this.buildHeader(), this.buildUI(), window.addEventListener("resize", () => {
1930
1931
  this.isActive && !this.isRecording && this.frames.length > 0 && this.renderSlider();
1931
1932
  });
1932
1933
  }
@@ -1949,8 +1950,8 @@ var Nn = class extends Dn {
1949
1950
  r.value = "counts", r.textContent = "Count", this.viewModeSelect.appendChild(r), this.viewModeSelect.value = this.isHierarchicalView ? "hierarchy" : "counts", this.viewModeSelect.addEventListener("change", () => {
1950
1951
  this.isHierarchicalView = this.viewModeSelect.value === "hierarchy", this.selectedFrameIndex !== void 0 && this.selectedFrameIndex !== -1 && this.selectFrame(this.selectedFrameIndex);
1951
1952
  }), 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", () => {
1952
- let e = Wn("timeline");
1953
- e.recording = !0, Gn("timeline", e), window.location.reload();
1953
+ let e = Kn("timeline");
1954
+ e.recording = !0, qn("timeline", e), window.location.reload();
1954
1955
  }), 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());
1955
1956
  let i = document.createElement("div");
1956
1957
  i.className = "console-buttons-group", i.appendChild(this.recordButton), i.appendChild(this.recordRefreshButton), i.appendChild(this.exportButton), i.appendChild(t);
@@ -2034,8 +2035,8 @@ var Nn = class extends Dn {
2034
2035
  }
2035
2036
  setRenderer(e) {
2036
2037
  this.renderer = e;
2037
- let t = Wn("timeline");
2038
- t.recording && (t.recording = !1, Gn("timeline", t), this.toggleRecording());
2038
+ let t = Kn("timeline");
2039
+ t.recording && (t.recording = !1, qn("timeline", t), this.toggleRecording());
2039
2040
  }
2040
2041
  toggleRecording() {
2041
2042
  if (!this.renderer) {
@@ -2065,7 +2066,7 @@ var Nn = class extends Dn {
2065
2066
  for (let t = 0; t < n.length; t++) n[t] *= e;
2066
2067
  }
2067
2068
  }
2068
- let t = this.baseTriangles > 0 ? e / this.baseTriangles * Vn : 0;
2069
+ let t = this.baseTriangles > 0 ? e / this.baseTriangles * Un : 0;
2069
2070
  this.graph.addPoint("calls", this.currentFrame.calls.length), this.graph.addPoint("fps", this.currentFrame.fps), this.graph.addPoint("triangles", t), this.graph.update();
2070
2071
  }
2071
2072
  this.currentFrame = {
@@ -2073,7 +2074,7 @@ var Nn = class extends Dn {
2073
2074
  calls: [],
2074
2075
  fps: 0,
2075
2076
  triangles: 0
2076
- }, this.frames.push(this.currentFrame), this.frames.length > Bn && this.frames.shift();
2077
+ }, this.frames.push(this.currentFrame), this.frames.length > Hn && this.frames.shift();
2077
2078
  }
2078
2079
  let a = {
2079
2080
  method: n,
@@ -2101,34 +2102,34 @@ var Nn = class extends Dn {
2101
2102
  getRenderTargetDetails(e) {
2102
2103
  let r = e.textures, i = [], a = (e) => {
2103
2104
  switch (e.type) {
2104
- case w:
2105
+ case C:
2105
2106
  case y: return "8";
2106
2107
  case g:
2107
- case de:
2108
- case te:
2108
+ case fe:
2109
+ case ne:
2109
2110
  case u:
2110
2111
  case n: return "16";
2111
2112
  case p:
2112
- case pe:
2113
- case S:
2114
2113
  case me:
2114
+ case te:
2115
+ case he:
2115
2116
  case ee:
2116
- case le: return "32";
2117
+ case ue: return "32";
2117
2118
  default: return "?";
2118
2119
  }
2119
2120
  }, c = (e) => {
2120
2121
  switch (e.format) {
2121
- case se: return "a";
2122
+ case ce: return "a";
2122
2123
  case t:
2123
- case ne: return "r";
2124
- case fe:
2124
+ case re: return "r";
2125
+ case pe:
2125
2126
  case f: return "rg";
2126
- case E:
2127
- case T: return "rgb";
2128
- case re: return "depth";
2127
+ case T:
2128
+ case w: return "rgb";
2129
+ case ie: return "depth";
2129
2130
  case o: return "depth-stencil";
2130
2131
  case s:
2131
- case ae:
2132
+ case oe:
2132
2133
  default: return "rgba";
2133
2134
  }
2134
2135
  };
@@ -2339,7 +2340,7 @@ var Nn = class extends Dn {
2339
2340
  r > t && (t = r);
2340
2341
  }
2341
2342
  for (let n = 0; n < e.length; n++) {
2342
- let r = e[n].triangles || 0, i = t > 0 ? r / t * Vn : 0;
2343
+ let r = e[n].triangles || 0, i = t > 0 ? r / t * Un : 0;
2343
2344
  this.graph.addPoint("calls", e[n].calls.length), this.graph.addPoint("fps", e[n].fps || 0), this.graph.addPoint("triangles", i);
2344
2345
  }
2345
2346
  this.graph.update(), this.playhead.style.display = "block";
@@ -2394,7 +2395,7 @@ var Nn = class extends Dn {
2394
2395
  if (a.textContent = r.method, t.titleSpan.appendChild(a), r.details) {
2395
2396
  let e = `### ${r.method}\n`;
2396
2397
  for (let t in r.details) r.details[t] !== void 0 && (e += `**${t}**: ${r.details[t]}\n`);
2397
- let n = hn(t.titleSpan, e);
2398
+ let n = _n(t.titleSpan, e);
2398
2399
  n.style.flexShrink = "0", n.style.marginLeft = "6px", n.style.display = "inline-flex", n.style.verticalAlign = "middle";
2399
2400
  }
2400
2401
  let o = document.createElement("span"), s = r.formatedDetails ? r.formatedDetails : "";
@@ -2472,29 +2473,29 @@ var Nn = class extends Dn {
2472
2473
  getColorForMethod(e) {
2473
2474
  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)";
2474
2475
  }
2475
- }, Un = class extends sn {
2476
+ }, Gn = class extends ln {
2476
2477
  constructor(e = {}) {
2477
2478
  super();
2478
2479
  let { nonce: t = null } = e;
2479
2480
  this.nonce = t;
2480
- let n = new un(this, e);
2481
+ let n = new fn(this, e);
2481
2482
  n.addEventListener("resize", (e) => this.dispatchEvent(e)), n.addEventListener("orientationchange", (e) => this.dispatchEvent(e)), n.addEventListener("layoutchange", (e) => this.dispatchEvent(e));
2482
- let r = new Dn({
2483
+ let r = new kn({
2483
2484
  builtin: !0,
2484
2485
  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>"
2485
2486
  });
2486
2487
  r.hide(), n.addTab(r);
2487
- let i = new zn();
2488
+ let i = new Vn();
2488
2489
  i.hide(), n.addTab(i);
2489
- let a = new gn();
2490
+ let a = new vn();
2490
2491
  n.addTab(a);
2491
- let o = new _n();
2492
+ let o = new yn();
2492
2493
  n.addTab(o);
2493
- let s = new Hn();
2494
+ let s = new Wn();
2494
2495
  n.addTab(s);
2495
- let c = new vn();
2496
+ let c = new bn();
2496
2497
  n.addTab(c);
2497
- let l = new Nn();
2498
+ let l = new Fn();
2498
2499
  n.addTab(l), n.loadLayout(), n.activeTabId || n.setActiveTab(a.id), this.statsData = /* @__PURE__ */ new Map(), this.profiler = n, this.performance = a, this.memory = o, this.console = c, this.parameters = r, this.viewer = i, this.timeline = s, this.settings = l, this.once = {}, this.extensionsData = /* @__PURE__ */ new WeakMap(), this.previousConsoleFunction = null, this._domObserver = null, this.displayCycle = {
2499
2500
  text: {
2500
2501
  needsUpdate: !1,
@@ -2578,7 +2579,7 @@ var Nn = class extends Dn {
2578
2579
  setRenderer(e) {
2579
2580
  if (super.setRenderer(e), e !== null) {
2580
2581
  let t = h();
2581
- this.previousConsoleFunction = t, ie((e, n, ...r) => {
2582
+ this.previousConsoleFunction = t, ae((e, n, ...r) => {
2582
2583
  t && t(e, n, ...r), this.resolveConsole(e, n, ...r);
2583
2584
  }), this.isAvailable && ((async () => {
2584
2585
  e.hasInitialized() === !1 && await e.init(), e.backend.trackTimestamp = !0, e.hasFeature("timestamp-query") !== !0 && this.console.addMessage("error", "THREE.Inspector: GPU Timestamp Queries not available.");
@@ -2592,7 +2593,7 @@ var Nn = class extends Dn {
2592
2593
  subtree: !0
2593
2594
  })) : e.domElement.parentElement.appendChild(n));
2594
2595
  })(), this.timeline.setRenderer(e));
2595
- } else this.previousConsoleFunction &&= (ie(this.previousConsoleFunction), void 0), this._domObserver !== null && (this._domObserver.disconnect(), this._domObserver = null), this.profiler.dispose(), this.statsData.clear(), super.dispose();
2596
+ } else this.previousConsoleFunction &&= (ae(this.previousConsoleFunction), void 0), this._domObserver !== null && (this._domObserver.disconnect(), this._domObserver = null), this.profiler.dispose(), this.statsData.clear(), super.dispose();
2596
2597
  return this;
2597
2598
  }
2598
2599
  createParameters(e) {
@@ -2638,7 +2639,7 @@ var Nn = class extends Dn {
2638
2639
  let n = this.getStatsData(t.cid);
2639
2640
  e.cpu += n.cpu, e.gpu += n.gpu, e.total += n.total;
2640
2641
  }
2641
- e.deltaTime = e.startTime - t.startTime, e.miscellaneous = e.deltaTime - e.total, e.miscellaneous < 0 && (e.miscellaneous = 0), this.updateCycle(this.displayCycle.text), this.updateCycle(this.displayCycle.graph), this.updateCycle(this.displayCycle.toggleGraph), this.displayCycle.text.needsUpdate && (J(this.profiler.toggleButton.querySelector(".fps-counter"), this.fps.toFixed()), this.performance.updateText(this, e), this.memory.updateText(this)), this.displayCycle.toggleGraph.needsUpdate && this.profiler.toggleGraph && (this.profiler.toggleGraph.addPoint("fps", this.fps), this.profiler.toggleGraph.update()), this.displayCycle.graph.needsUpdate && (this.performance.updateGraph(this, e), this.memory.updateGraph(this)), this.displayCycle.text.needsUpdate = !1, this.displayCycle.graph.needsUpdate = !1, this.displayCycle.toggleGraph.needsUpdate = !1;
2642
+ e.deltaTime = e.startTime - t.startTime, e.miscellaneous = e.deltaTime - e.total, e.miscellaneous < 0 && (e.miscellaneous = 0), this.updateCycle(this.displayCycle.text), this.updateCycle(this.displayCycle.graph), this.updateCycle(this.displayCycle.toggleGraph), this.displayCycle.text.needsUpdate && (q(this.profiler.toggleButton.querySelector(".fps-counter"), this.fps.toFixed()), this.performance.updateText(this, e), this.memory.updateText(this)), this.displayCycle.toggleGraph.needsUpdate && this.profiler.toggleGraph && (this.profiler.toggleGraph.addPoint("fps", this.fps), this.profiler.toggleGraph.update()), this.displayCycle.graph.needsUpdate && (this.performance.updateGraph(this, e), this.memory.updateGraph(this)), this.displayCycle.text.needsUpdate = !1, this.displayCycle.graph.needsUpdate = !1, this.displayCycle.toggleGraph.needsUpdate = !1;
2642
2643
  }
2643
2644
  }
2644
2645
  updateCycle(e) {
@@ -2648,41 +2649,41 @@ var Nn = class extends Dn {
2648
2649
  super.dispose(), this.setRenderer(null);
2649
2650
  }
2650
2651
  };
2651
- function Wn(e) {
2652
+ function Kn(e) {
2652
2653
  let t = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
2653
2654
  return t.version !== "186" || t.settings && t.settings.storage === "url" && t.settings.url !== location.href ? (localStorage.removeItem("threejs-inspector"), {}) : t[e] || {};
2654
2655
  }
2655
- function Gn(e, t) {
2656
+ function qn(e, t) {
2656
2657
  let n = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
2657
2658
  t === null ? delete n[e] : n[e] = t, n.settings = n.settings || {}, n.settings.url = n.settings.url || location.href, n.settings.storage = n.settings.storage || "url", n.version = "186", localStorage.setItem("threejs-inspector", JSON.stringify(n));
2658
2659
  }
2659
2660
  //#endregion
2660
2661
  //#region ../../node_modules/three/examples/jsm/tsl/display/SSGINode.js
2661
- var Kn = /* @__PURE__ */ new Ae(), qn = /* @__PURE__ */ new d(), Jn = [
2662
+ var Jn = /* @__PURE__ */ new Me(), Yn = /* @__PURE__ */ new d(), Xn = [
2662
2663
  60,
2663
2664
  300,
2664
2665
  180,
2665
2666
  240,
2666
2667
  120,
2667
2668
  0
2668
- ], Yn = [
2669
+ ], Zn = [
2669
2670
  0,
2670
2671
  .5,
2671
2672
  .25,
2672
2673
  .75
2673
- ], Xn, Zn = class extends we {
2674
+ ], Qn, $n = class extends Ee {
2674
2675
  static get type() {
2675
2676
  return "SSGINode";
2676
2677
  }
2677
2678
  constructor(e, n, r, i) {
2678
- super("vec4"), this.beautyNode = e, this.depthNode = n, this.normalNode = r, this.updateBeforeType = At.FRAME, this.sliceCount = F(1, "uint"), this.stepCount = F(12, "uint"), this.aoIntensity = F(1, "float"), this.giIntensity = F(10, "float"), this.radius = F(12, "float"), this.useScreenSpaceSampling = F(!0, "bool"), this.expFactor = F(2, "float"), this.thickness = F(1, "float"), this.useLinearThickness = F(!1, "bool"), this.backfaceLighting = F(0, "float"), this.useTemporalFiltering = !0, this._resolution = F(new d()), this._halfProjScale = F(1), this._temporalDirection = F(0), this._temporalOffset = F(0), this._cameraProjectionMatrix = F(i.projectionMatrix), this._cameraProjectionMatrixInverse = F(i.projectionMatrixInverse), this._cameraNear = bt("near", "float", i), this._cameraFar = bt("far", "float", i), this._camera = i, this._ssgiRenderTarget = new c(1, 1, {
2679
+ super("vec4"), this.beautyNode = e, this.depthNode = n, this.normalNode = r, this.updateBeforeType = Mt.FRAME, this.sliceCount = P(1, "uint"), this.stepCount = P(12, "uint"), this.aoIntensity = P(1, "float"), this.giIntensity = P(10, "float"), this.radius = P(12, "float"), this.useScreenSpaceSampling = P(!0, "bool"), this.expFactor = P(2, "float"), this.thickness = P(1, "float"), this.useLinearThickness = P(!1, "bool"), this.backfaceLighting = P(0, "float"), this.useTemporalFiltering = !0, this._resolution = P(new d()), this._halfProjScale = P(1), this._temporalDirection = P(0), this._temporalOffset = P(0), this._cameraProjectionMatrix = P(i.projectionMatrix), this._cameraProjectionMatrixInverse = P(i.projectionMatrixInverse), this._cameraNear = St("near", "float", i), this._cameraFar = St("far", "float", i), this._camera = i, this._ssgiRenderTarget = new c(1, 1, {
2679
2680
  depthBuffer: !1,
2680
2681
  count: 2
2681
2682
  });
2682
2683
  let a = this._ssgiRenderTarget.textures[0];
2683
2684
  a.name = "SSGI.AO", a.type = y, a.format = t;
2684
2685
  let o = this._ssgiRenderTarget.textures[1];
2685
- o.name = "SSGI.GI", o.type = le, o.format = E, this._material = new k(), this._material.name = "SSGI", this._aoNode = Ct(this, this._ssgiRenderTarget.textures[0]), this._giNode = Ct(this, this._ssgiRenderTarget.textures[1]);
2686
+ o.name = "SSGI.GI", o.type = ue, o.format = T, this._material = new O(), this._material.name = "SSGI", this._aoNode = Tt(this, this._ssgiRenderTarget.textures[0]), this._giNode = Tt(this, this._ssgiRenderTarget.textures[1]);
2686
2687
  }
2687
2688
  getAONode() {
2688
2689
  return this._aoNode;
@@ -2695,30 +2696,30 @@ var Kn = /* @__PURE__ */ new Ae(), qn = /* @__PURE__ */ new d(), Jn = [
2695
2696
  }
2696
2697
  updateBefore(e) {
2697
2698
  let { renderer: t } = e;
2698
- Xn = A.resetRendererState(t, Xn);
2699
- let n = t.getDrawingBufferSize(qn);
2699
+ Qn = k.resetRendererState(t, Qn);
2700
+ let n = t.getDrawingBufferSize(Yn);
2700
2701
  if (this.setSize(n.width, n.height), this.useTemporalFiltering === !0) {
2701
2702
  let t = e.frameId;
2702
- this._temporalDirection.value = Jn[t % 6] / 360, this._temporalOffset.value = Yn[t % 4];
2703
+ this._temporalDirection.value = Xn[t % 6] / 360, this._temporalOffset.value = Zn[t % 4];
2703
2704
  } else this._temporalDirection.value = 1, this._temporalOffset.value = 1;
2704
- Kn.material = this._material, Kn.name = "SSGI", t.setClearColor(16777215, 1), t.setRenderTarget(this._ssgiRenderTarget), Kn.render(t), A.restoreRendererState(t, Xn);
2705
+ Jn.material = this._material, Jn.name = "SSGI", t.setClearColor(16777215, 1), t.setRenderTarget(this._ssgiRenderTarget), Jn.render(t), k.restoreRendererState(t, Qn);
2705
2706
  }
2706
2707
  setup(e) {
2707
2708
  let t = e.renderer;
2708
2709
  t.backend.isWebGPUBackend === !0 && t.hasFeature("rg11b10ufloat-renderable") === !1 && console.error("THREE.SSGINode: The device does not support the \"rg11b10ufloat-renderable\" feature which is required for SSGI.");
2709
- let n = qe(), r = P(32), i = P(0), a = (t) => {
2710
+ let n = Ye(), r = N(32), i = N(0), a = (t) => {
2710
2711
  let n = this.depthNode.sample(t).r;
2711
- return e.renderer.logarithmicDepthBuffer === !0 ? at(Yt(n, this._cameraNear, this._cameraFar), this._cameraNear, this._cameraFar) : n;
2712
- }, o = (e) => this.normalNode === null ? Ye(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), s = (e) => this.beautyNode.sample(e), c = H(([e]) => V(.25).mul(Le(e.y, e.x).bitAnd(3))).setLayout({
2712
+ return e.renderer.logarithmicDepthBuffer === !0 ? st(Zt(n, this._cameraNear, this._cameraFar), this._cameraNear, this._cameraFar) : n;
2713
+ }, o = (e) => this.normalNode === null ? Ze(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), s = (e) => this.beautyNode.sample(e), c = V(([e]) => B(.25).mul(ze(e.y, e.x).bitAnd(3))).setLayout({
2713
2714
  name: "spatialOffsets",
2714
2715
  type: "float",
2715
2716
  inputs: [{
2716
2717
  name: "position",
2717
2718
  type: "vec2"
2718
2719
  }]
2719
- }), l = H(([e]) => {
2720
- let t = z(e).mul(V(-.156583)).add(Nt);
2721
- return t.mulAssign(Ie(z(e).oneMinus())), U(e.x.greaterThanEqual(0).select(t.x, zt.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, zt.sub(t.y)));
2720
+ }), l = V(([e]) => {
2721
+ let t = R(e).mul(B(-.156583)).add(Ft);
2722
+ return t.mulAssign(Re(R(e).oneMinus())), H(e.x.greaterThanEqual(0).select(t.x, Vt.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, Vt.sub(t.y)));
2722
2723
  }).setLayout({
2723
2724
  name: "GTAOFastAcos",
2724
2725
  type: "vec2",
@@ -2726,104 +2727,104 @@ var Kn = /* @__PURE__ */ new Ae(), qn = /* @__PURE__ */ new d(), Jn = [
2726
2727
  name: "value",
2727
2728
  type: "vec2"
2728
2729
  }]
2729
- }), u = H(([e, t, n, c, u, d, f, p, m, h]) => {
2730
- let g = this.stepCount.toConst(), _ = this.expFactor.toConst(), v = this.thickness.toConst(), y = this.backfaceLighting.toConst(), b = e.select(U(1, -1), U(-1, 1)), ee = e.select(1, -1), x = M(0);
2731
- return dt({
2732
- start: P(0),
2730
+ }), u = V(([e, t, n, c, u, d, f, p, m, h]) => {
2731
+ let g = this.stepCount.toConst(), _ = this.expFactor.toConst(), v = this.thickness.toConst(), y = this.backfaceLighting.toConst(), b = e.select(H(1, -1), H(-1, 1)), ee = e.select(1, -1), x = j(0);
2732
+ return pt({
2733
+ start: N(0),
2733
2734
  end: g,
2734
2735
  type: "uint",
2735
2736
  condition: "<"
2736
2737
  }, ({ i: g }) => {
2737
- let S = gt(z(st(t, V(g).add(d)).div(n)), _).mul(n).toConst(), C = u.mul(R(S, V(g).add(1))).toConst(), w = f.add(C.mul(b)).toConst();
2738
- B(w.x.lessThanEqual(0).or(w.y.lessThanEqual(0)).or(w.x.greaterThanEqual(1)).or(w.y.greaterThanEqual(1)), () => {
2739
- Lt();
2738
+ let te = vt(R(lt(t, B(g).add(d)).div(n)), _).mul(n).toConst(), S = u.mul(L(te, B(g).add(1))).toConst(), C = f.add(S.mul(b)).toConst();
2739
+ z(C.x.lessThanEqual(0).or(C.y.lessThanEqual(0)).or(C.x.greaterThanEqual(1)).or(C.y.greaterThanEqual(1)), () => {
2740
+ zt();
2740
2741
  });
2741
- let T = Ze(w, a(w), this._cameraProjectionMatrixInverse).toConst(), E = T.sub(c).normalize().toConst(), te = this.useLinearThickness.select(T.z.negate().div(this._cameraFar).clamp().mul(100), V(1)), ne = $e(T.sub(te.mul(p).mul(v)).sub(c)), D = U(N(E, p), N(ne, p));
2742
- D = l(lt(D, -1, 1)), D = lt(Re(st(ee, D.negate()).sub(h.sub(Nt)), zt)), D = e.select(D.yx, D.xy);
2743
- let re = D.x.toConst(), ie = D.y.toConst(), ae = P(D.mul(V(r))).toConst(), oe = P(xt(ie.sub(re).mul(V(r)))).toConst(), se = oe.greaterThan(P(0)).select(P(Jt(P(4294967295), P(32).sub(r).add(r.sub(oe)))), P(0)).toConst().shiftLeft(ae);
2744
- se = se.bitAnd(i.bitNot()), i.assign(i.bitOr(se));
2745
- let ce = tt(se);
2746
- B(ce.greaterThan(0), () => {
2747
- let e = s(w);
2748
- B(j(e).greaterThan(.001), () => {
2749
- let t = $e(E), n = lt(N(m, t));
2750
- B(n.greaterThan(.001), () => {
2751
- let i = o(w), a = N(i, t.negate()), s = mt(a).lessThan(0).select(z(a).mul(y), z(a));
2752
- a = y.greaterThan(0).and(N(i, p).greaterThan(0)).select(s, lt(a)), x.rgb.addAssign(V(ce).div(V(r)).mul(e).mul(n).mul(a));
2742
+ let w = $e(C, a(C), this._cameraProjectionMatrixInverse).toConst(), T = w.sub(c).normalize().toConst(), ne = this.useLinearThickness.select(w.z.negate().div(this._cameraFar).clamp().mul(100), B(1)), re = tt(w.sub(ne.mul(p).mul(v)).sub(c)), E = H(M(T, p), M(re, p));
2743
+ E = l(dt(E, -1, 1)), E = dt(Be(lt(ee, E.negate()).sub(h.sub(Ft)), Vt)), E = e.select(E.yx, E.xy);
2744
+ let ie = E.x.toConst(), ae = E.y.toConst(), oe = N(E.mul(B(r))).toConst(), se = N(Ct(ae.sub(ie).mul(B(r)))).toConst(), ce = se.greaterThan(N(0)).select(N(Xt(N(4294967295), N(32).sub(r).add(r.sub(se)))), N(0)).toConst().shiftLeft(oe);
2745
+ ce = ce.bitAnd(i.bitNot()), i.assign(i.bitOr(ce));
2746
+ let le = rt(ce);
2747
+ z(le.greaterThan(0), () => {
2748
+ let e = s(C);
2749
+ z(A(e).greaterThan(.001), () => {
2750
+ let t = tt(T), n = dt(M(m, t));
2751
+ z(n.greaterThan(.001), () => {
2752
+ let i = o(C), a = M(i, t.negate()), s = gt(a).lessThan(0).select(R(a).mul(y), R(a));
2753
+ a = y.greaterThan(0).and(M(i, p).greaterThan(0)).select(s, dt(a)), x.rgb.addAssign(B(le).div(B(r)).mul(e).mul(n).mul(a));
2753
2754
  });
2754
2755
  });
2755
2756
  });
2756
2757
  }), x;
2757
- }), d = Bt("float"), f = Bt("vec3"), p = Rt(d, f), m = H(() => {
2758
+ }), d = Ht("float"), f = Ht("vec3"), p = Bt(d, f), m = V(() => {
2758
2759
  let e = a(n).toVar();
2759
2760
  e.greaterThanEqual(1).discard();
2760
- let t = Ze(n, e, this._cameraProjectionMatrixInverse).toVar(), s = o(n).toVar(), l = $e(t.xyz.negate()).toVar(), p = c(ut), m = Ke(ut), h = this._temporalDirection.mul(.02), g = Je(p.add(this._temporalOffset)).add(_t(n.add(h).mul(2).sub(1))), _ = V(0), v = M(0), y = this.sliceCount.toConst(), b = this.stepCount.toConst(), ee = this.aoIntensity.toConst(), x = this.giIntensity.toConst(), S = this.radius.toConst(), C = V(0).toVar();
2761
- B(this.useScreenSpaceSampling, () => {
2762
- C.assign(S.mul(this._resolution.x.div(2)).div(V(16)));
2761
+ let t = $e(n, e, this._cameraProjectionMatrixInverse).toVar(), s = o(n).toVar(), l = tt(t.xyz.negate()).toVar(), p = c(ft), m = Je(ft), h = this._temporalDirection.mul(.02), g = Xe(p.add(this._temporalOffset)).add(yt(n.add(h).mul(2).sub(1))), _ = B(0), v = j(0), y = this.sliceCount.toConst(), b = this.stepCount.toConst(), ee = this.aoIntensity.toConst(), x = this.giIntensity.toConst(), te = this.radius.toConst(), S = B(0).toVar();
2762
+ z(this.useScreenSpaceSampling, () => {
2763
+ S.assign(te.mul(this._resolution.x.div(2)).div(B(16)));
2763
2764
  }).Else(() => {
2764
- C.assign(R(S.mul(this._halfProjScale).div(t.z.negate()), V(b)));
2765
- }), C.divAssign(V(b).add(1));
2766
- let w = R(1, V(b.sub(1))).mul(C).toConst();
2767
- dt({
2768
- start: P(0),
2765
+ S.assign(L(te.mul(this._halfProjScale).div(t.z.negate()), B(b)));
2766
+ }), S.divAssign(B(b).add(1));
2767
+ let C = L(1, B(b.sub(1))).mul(S).toConst();
2768
+ pt({
2769
+ start: N(0),
2769
2770
  end: y,
2770
2771
  type: "uint",
2771
2772
  condition: "<"
2772
2773
  }, ({ i: e }) => {
2773
- let a = st(V(e).add(m).add(this._temporalDirection), zt.div(V(y))).toConst(), o = M(U(Gt(a), Kt(a)), 0).toConst(), c = o.xy.mul(V(1).div(this._resolution)).toConst(), d = $e(Fe(o, l)).toConst(), f = Fe(l, d).toConst(), p = s.sub(d.mul(N(s, d))).toConst(), h = lt(N($e(p).toConst(), l), -1, 1).toConst(), b = mt(N(p, f)).negate().mul(yt(h)).toConst();
2774
- i.assign(0), v.addAssign(u(Dt(!0), C, w, t, c, g, n, l, s, b)), v.addAssign(u(Dt(!1), C, w, t, c, g, n, l, s, b)), _.addAssign(V(tt(i)).div(V(r)));
2775
- }), _.divAssign(V(y)), _.assign(gt(_.clamp().oneMinus(), ee).clamp()), v.divAssign(V(y)), v.mulAssign(x);
2776
- let T = V(7).toConst(), E = j(v), te = E.greaterThan(T).select(T.div(E), V(1));
2777
- return v.mulAssign(te), d.assign(_), f.assign(v), L(0);
2774
+ let a = lt(B(e).add(m).add(this._temporalDirection), Vt.div(B(y))).toConst(), o = j(H(qt(a), Jt(a)), 0).toConst(), c = o.xy.mul(B(1).div(this._resolution)).toConst(), d = tt(Le(o, l)).toConst(), f = Le(l, d).toConst(), p = s.sub(d.mul(M(s, d))).toConst(), h = dt(M(tt(p).toConst(), l), -1, 1).toConst(), b = gt(M(p, f)).negate().mul(xt(h)).toConst();
2775
+ i.assign(0), v.addAssign(u(kt(!0), S, C, t, c, g, n, l, s, b)), v.addAssign(u(kt(!1), S, C, t, c, g, n, l, s, b)), _.addAssign(B(rt(i)).div(B(r)));
2776
+ }), _.divAssign(B(y)), _.assign(vt(_.clamp().oneMinus(), ee).clamp()), v.divAssign(B(y)), v.mulAssign(x);
2777
+ let w = B(7).toConst(), T = A(v), ne = T.greaterThan(w).select(w.div(T), B(1));
2778
+ return v.mulAssign(ne), d.assign(_), f.assign(v), I(0);
2778
2779
  });
2779
- return this._material.contextNode = qt(e.getSharedContext()), this._material.colorNode = m(), this._material.outputNode = p, this._material.needsUpdate = !0, this._aoNode;
2780
+ return this._material.contextNode = Yt(e.getSharedContext()), this._material.colorNode = m(), this._material.outputNode = p, this._material.needsUpdate = !0, this._aoNode;
2780
2781
  }
2781
2782
  dispose() {
2782
2783
  super.dispose(), this._ssgiRenderTarget.dispose(), this._material.dispose();
2783
2784
  }
2784
- }, Qn = (e, t, n, r) => new Zn(pt(e), t, n, r), $n = class extends we {
2785
+ }, er = (e, t, n, r) => new $n(ht(e), t, n, r), tr = class extends Ee {
2785
2786
  static get type() {
2786
2787
  return "DenoiseNode";
2787
2788
  }
2788
2789
  constructor(e, t, n, r) {
2789
- super("vec4"), this.textureNode = e, this.depthNode = t, this.normalNode = n, this._noiseTexture = tr(), this.noiseNode = I(this._noiseTexture), this.lumaPhi = F(5), this.depthPhi = F(5), this.normalPhi = F(5), this.radius = F(5), this.index = F(0), this.updateBeforeType = At.FRAME, this._resolution = F(new d()), this._sampleVectors = Qe(er(16, 2, 1)), this._cameraProjectionMatrixInverse = F(r.projectionMatrixInverse);
2790
+ super("vec4"), this.textureNode = e, this.depthNode = t, this.normalNode = n, this._noiseTexture = rr(), this.noiseNode = F(this._noiseTexture), this.lumaPhi = P(5), this.depthPhi = P(5), this.normalPhi = P(5), this.radius = P(5), this.index = P(0), this.updateBeforeType = Mt.FRAME, this._resolution = P(new d()), this._sampleVectors = et(nr(16, 2, 1)), this._cameraProjectionMatrixInverse = P(r.projectionMatrixInverse);
2790
2791
  }
2791
2792
  updateBefore() {
2792
2793
  let e = this.textureNode.value;
2793
2794
  this._resolution.value.set(e.image.width, e.image.height);
2794
2795
  }
2795
2796
  setup() {
2796
- let e = qe(), t = (e) => this.textureNode.sample(e), n = (e) => this.depthNode.sample(e).x, r = (e) => this.normalNode === null ? Ye(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), i = (e) => this.noiseNode.sample(e), a = H(([e, i, a, o]) => {
2797
- let s = t(o).toVar(), c = n(o).toVar(), l = r(o).toVar(), u = s.rgb, d = Ze(o, c, this._cameraProjectionMatrixInverse).toVar(), f = gt(R(N(i, l).toVar(), 0), this.normalPhi).toVar(), p = z(j(u).sub(j(e))).toVar(), m = R(V(1).sub(p.div(this.lumaPhi)), 0).toVar(), h = z(N(a.sub(d), i)).toVar(), g = R(V(1).sub(h.div(this.depthPhi)), 0), _ = m.mul(g).mul(f);
2798
- return L(u.mul(_), _);
2799
- }), o = H(([e]) => {
2800
- let o = n(e).toVar(), s = r(e).toVar(), c = t(e).toVar(), l = Bt("vec4");
2801
- return B(o.greaterThanEqual(1).or(N(s, s).equal(0)), () => {
2797
+ let e = Ye(), t = (e) => this.textureNode.sample(e), n = (e) => this.depthNode.sample(e).x, r = (e) => this.normalNode === null ? Ze(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), i = (e) => this.noiseNode.sample(e), a = V(([e, i, a, o]) => {
2798
+ let s = t(o).toVar(), c = n(o).toVar(), l = r(o).toVar(), u = s.rgb, d = $e(o, c, this._cameraProjectionMatrixInverse).toVar(), f = vt(L(M(i, l).toVar(), 0), this.normalPhi).toVar(), p = R(A(u).sub(A(e))).toVar(), m = L(B(1).sub(p.div(this.lumaPhi)), 0).toVar(), h = R(M(a.sub(d), i)).toVar(), g = L(B(1).sub(h.div(this.depthPhi)), 0), _ = m.mul(g).mul(f);
2799
+ return I(u.mul(_), _);
2800
+ }), o = V(([e]) => {
2801
+ let o = n(e).toVar(), s = r(e).toVar(), c = t(e).toVar(), l = Ht("vec4");
2802
+ return z(o.greaterThanEqual(1).or(M(s, s).equal(0)), () => {
2802
2803
  l.assign(c);
2803
2804
  }).Else(() => {
2804
- let t = M(c.rgb), n = Ze(e, o, this._cameraProjectionMatrixInverse).toConst(), r = Tt(this.noiseNode, 0), u = U(e.x, e.y.oneMinus());
2805
+ let t = j(c.rgb), n = $e(e, o, this._cameraProjectionMatrixInverse).toConst(), r = Dt(this.noiseNode, 0), u = H(e.x, e.y.oneMinus());
2805
2806
  u = u.mul(this._resolution.div(r));
2806
- let d = i(u).toVar(), f = U(Kt(d.element(this.index.mod(4).mul(2).mul(zt))), Gt(d.element(this.index.mod(4).mul(2).mul(zt)))), p = it(f.x, f.y.negate(), f.x, f.y), m = V(1).toVar(), h = M(c.rgb).toVar();
2807
- dt({
2808
- start: Ue(0),
2809
- end: Ue(16),
2807
+ let d = i(u).toVar(), f = H(Jt(d.element(this.index.mod(4).mul(2).mul(Vt))), qt(d.element(this.index.mod(4).mul(2).mul(Vt)))), p = ot(f.x, f.y.negate(), f.x, f.y), m = B(1).toVar(), h = j(c.rgb).toVar();
2808
+ pt({
2809
+ start: Ge(0),
2810
+ end: Ge(16),
2810
2811
  type: "int",
2811
2812
  condition: "<"
2812
2813
  }, ({ i: r }) => {
2813
- let i = this._sampleVectors.element(r), o = p.mul(i.xy.mul(V(1).add(i.z.mul(this.radius.sub(1))))).div(this._resolution), c = a(t, s, n, e.add(o));
2814
+ let i = this._sampleVectors.element(r), o = p.mul(i.xy.mul(B(1).add(i.z.mul(this.radius.sub(1))))).div(this._resolution), c = a(t, s, n, e.add(o));
2814
2815
  h.addAssign(c.xyz), m.addAssign(c.w);
2815
- }), B(m.greaterThan(V(0)), () => {
2816
+ }), z(m.greaterThan(B(0)), () => {
2816
2817
  h.divAssign(m);
2817
- }), l.assign(L(h, c.a));
2818
+ }), l.assign(I(h, c.a));
2818
2819
  }), l;
2819
2820
  });
2820
- return H(() => o(e))();
2821
+ return V(() => o(e))();
2821
2822
  }
2822
2823
  dispose() {
2823
2824
  super.dispose(), this._noiseTexture.dispose();
2824
2825
  }
2825
2826
  };
2826
- function er(e, t, n) {
2827
+ function nr(e, t, n) {
2827
2828
  let r = [];
2828
2829
  for (let a = 0; a < e; a++) {
2829
2830
  let o = 2 * Math.PI * t * a / e, s = (a / (e - 1)) ** n;
@@ -2831,8 +2832,8 @@ function er(e, t, n) {
2831
2832
  }
2832
2833
  return r;
2833
2834
  }
2834
- function tr(e = 64) {
2835
- let t = new he(), n = e * e * 4, r = new Uint8Array(n);
2835
+ function rr(e = 64) {
2836
+ let t = new ge(), n = e * e * 4, r = new Uint8Array(n);
2836
2837
  for (let n = 0; n < e; n++) for (let i = 0; i < e; i++) {
2837
2838
  let a = n, o = i;
2838
2839
  r[(n * e + i) * 4] = (t.noise(a, o) * .5 + .5) * 255, r[(n * e + i) * 4 + 1] = (t.noise(a + e, o) * .5 + .5) * 255, r[(n * e + i) * 4 + 2] = (t.noise(a, o + e) * .5 + .5) * 255, r[(n * e + i) * 4 + 3] = (t.noise(a + e, o + e) * .5 + .5) * 255;
@@ -2840,12 +2841,12 @@ function tr(e = 64) {
2840
2841
  let i = new m(r, e, e);
2841
2842
  return i.wrapS = l, i.wrapT = l, i.needsUpdate = !0, i;
2842
2843
  }
2843
- var nr = (e, t, n, r) => new $n(pt(e), ot(t), ot(n), r), rr = class e extends tn {
2844
+ var ir = (e, t, n, r) => new tr(ht(e), ct(t), ct(n), r), ar = class e extends rn {
2844
2845
  static {
2845
2846
  this.passId = "SsgiRenderPass";
2846
2847
  }
2847
2848
  constructor(t) {
2848
- super(), this.passId = e.passId, this.sliceCount = F(t.sliceCount, "uint"), this.stepCount = F(t.stepCount, "uint"), this.radius = F(t.radius), this.expFactor = F(t.expFactor), this.thickness = F(t.thickness), this.backfaceLighting = F(t.backfaceLighting), this.aoIntensity = F(t.aoIntensity), this.giIntensity = F(t.giIntensity), this.useLinearThickness = F(t.useLinearThickness), this.useScreenSpaceSampling = F(t.useScreenSpaceSampling), this.giDenoiseRadius = F(t.giDenoiseRadius), this.aoDenoiseRadius = F(t.aoDenoiseRadius), this.useTemporalFiltering = t.useTemporalFiltering;
2849
+ super(), this.passId = e.passId, this.sliceCount = P(t.sliceCount, "uint"), this.stepCount = P(t.stepCount, "uint"), this.radius = P(t.radius), this.expFactor = P(t.expFactor), this.thickness = P(t.thickness), this.backfaceLighting = P(t.backfaceLighting), this.aoIntensity = P(t.aoIntensity), this.giIntensity = P(t.giIntensity), this.useLinearThickness = P(t.useLinearThickness), this.useScreenSpaceSampling = P(t.useScreenSpaceSampling), this.giDenoiseRadius = P(t.giDenoiseRadius), this.aoDenoiseRadius = P(t.aoDenoiseRadius), this.useTemporalFiltering = t.useTemporalFiltering;
2849
2850
  }
2850
2851
  updatePerformanceParameters(e) {
2851
2852
  this.sliceCount.value = e.sliceCount, this.stepCount.value = e.stepCount;
@@ -2855,19 +2856,19 @@ var nr = (e, t, n, r) => new $n(pt(e), ot(t), ot(n), r), rr = class e extends tn
2855
2856
  n.add(this.sliceCount, "value", 1, 4, 1).name("slice count").onChange(() => t()), n.add(this.stepCount, "value", 1, 32, 1).name("step count").onChange(() => t()), n.add(this.radius, "value", 1, 25).name("radius").onChange(() => t()), n.add(this.expFactor, "value", 1, 3).name("exp factor").onChange(() => t()), n.add(this.thickness, "value", .01, 10).name("thickness").onChange(() => t()), n.add(this.backfaceLighting, "value", 0, 1).name("backface lighting").onChange(() => t()), n.add(this.aoIntensity, "value", 0, 4).name("AO intensity").onChange(() => t()), n.add(this.giIntensity, "value", 0, 100).name("GI intensity").onChange(() => t()), n.add(this.useLinearThickness, "value").name("use linear thickness").onChange(() => t()), n.add(this.useScreenSpaceSampling, "value").name("use screen-space sampling").onChange(() => t()), n.add(this.aoDenoiseRadius, "value", 0, 20).name("AO denoise radius").onChange(() => t()), n.add(this.giDenoiseRadius, "value", 0, 20).name("GI denoise radius").onChange(() => t());
2856
2857
  }
2857
2858
  assemble(e, t, n, r, i) {
2858
- if (!(r instanceof D) || this.sliceCount.value === 0 || this.stepCount.value === 0) return t;
2859
- let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), l = St((e) => Be(c.sample(e))), u = Qn(a, s, l, r);
2859
+ if (!(r instanceof E) || this.sliceCount.value === 0 || this.stepCount.value === 0) return t;
2860
+ let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), l = wt((e) => He(c.sample(e))), u = er(a, s, l, r);
2860
2861
  u.sliceCount = this.sliceCount, u.stepCount = this.stepCount, u.radius = this.radius, u.expFactor = this.expFactor, u.thickness = this.thickness, u.backfaceLighting = this.backfaceLighting, u.aoIntensity = this.aoIntensity, u.giIntensity = this.giIntensity, u.useLinearThickness = this.useLinearThickness, u.useScreenSpaceSampling = this.useScreenSpaceSampling, u.useTemporalFiltering = this.useTemporalFiltering;
2861
- let d = u.getGINode().toInspector("SSGI / GI"), f = u.getAONode().toInspector("SSGI / AO"), p = nr(d, s, l, r).toInspector("SSGI / GI Denoised");
2862
+ let d = u.getGINode().toInspector("SSGI / GI"), f = u.getAONode().toInspector("SSGI / AO"), p = ir(d, s, l, r).toInspector("SSGI / GI Denoised");
2862
2863
  p.radius = this.giDenoiseRadius;
2863
- let m = nr(f, s, l, r).toInspector("SSGI / AO Denoised");
2864
+ let m = ir(f, s, l, r).toInspector("SSGI / AO Denoised");
2864
2865
  m.radius = this.aoDenoiseRadius;
2865
- let h = L(Mt(a.rgb.mul(m.r), o.rgb.mul(p.rgb)), a.a);
2866
- return h.name = "Ssgi Composite", i === "ao only" ? L(M(f.r), 1) : i === "gi only" ? L(d.rgb, 1) : i === "denoised ao only" ? L(M(m.r), 1) : i === "denoised gi only" ? L(p.rgb, 1) : i === "without denoise" ? L(Mt(a.rgb.mul(f.r), o.rgb.mul(d.rgb)), a.a) : h;
2866
+ let h = I(Pt(a.rgb.mul(m.r), o.rgb.mul(p.rgb)), a.a);
2867
+ return h.name = "Ssgi Composite", i === "ao only" ? I(j(f.r), 1) : i === "gi only" ? I(d.rgb, 1) : i === "denoised ao only" ? I(j(m.r), 1) : i === "denoised gi only" ? I(p.rgb, 1) : i === "without denoise" ? I(Pt(a.rgb.mul(f.r), o.rgb.mul(d.rgb)), a.a) : h;
2867
2868
  }
2868
- }, ir = H(([e, t, n, r]) => {
2869
- let i = r.rgb.add(n.rgb).mul(.5).toConst(), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7).toConst(), o = t.sub(L(i, e.a)).toConst(), s = o.xyz.div(a).toConst().abs().toConst(), c = R(s.x, s.y, s.z).toConst();
2870
- return c.greaterThan(1).select(L(i, e.a).add(o.div(c)), t);
2869
+ }, or = V(([e, t, n, r]) => {
2870
+ let i = r.rgb.add(n.rgb).mul(.5).toConst(), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7).toConst(), o = t.sub(I(i, e.a)).toConst(), s = o.xyz.div(a).toConst().abs().toConst(), c = L(s.x, s.y, s.z).toConst();
2871
+ return c.greaterThan(1).select(I(i, e.a).add(o.div(c)), t);
2871
2872
  }).setLayout({
2872
2873
  name: "clipAABB",
2873
2874
  type: "vec4",
@@ -2889,9 +2890,9 @@ var nr = (e, t, n, r) => new $n(pt(e), ot(t), ot(n), r), rr = class e extends tn
2889
2890
  type: "vec4"
2890
2891
  }
2891
2892
  ]
2892
- }), ar = H(([e, t, n]) => {
2893
- let r = e.mul(V(1).div(R(e.r, e.g, e.b).add(1))).toConst(), i = t.mul(V(1).div(R(t.r, t.g, t.b).add(1))).toConst(), a = j(r.rgb).toConst(), o = j(i.rgb).toConst(), s = n.div(a.add(1)).toConst(), c = n.oneMinus().div(o.add(1)).toConst();
2894
- return Mt(e.mul(s), t.mul(c)).div(R(s.add(c), 1e-5));
2893
+ }), sr = V(([e, t, n]) => {
2894
+ let r = e.mul(B(1).div(L(e.r, e.g, e.b).add(1))).toConst(), i = t.mul(B(1).div(L(t.r, t.g, t.b).add(1))).toConst(), a = A(r.rgb).toConst(), o = A(i.rgb).toConst(), s = n.div(a.add(1)).toConst(), c = n.oneMinus().div(o.add(1)).toConst();
2895
+ return Pt(e.mul(s), t.mul(c)).div(L(s.add(c), 1e-5));
2895
2896
  }).setLayout({
2896
2897
  name: "flickerReduction",
2897
2898
  type: "vec4",
@@ -2909,54 +2910,54 @@ var nr = (e, t, n, r) => new $n(pt(e), ot(t), ot(n), r), rr = class e extends tn
2909
2910
  type: "float"
2910
2911
  }
2911
2912
  ]
2912
- }), or = H(([e, t, n], r) => {
2913
- let i = V(2).toVar(), a = U(0).toVar(), o = V(-1).toVar();
2913
+ }), cr = V(([e, t, n], r) => {
2914
+ let i = B(2).toVar(), a = H(0).toVar(), o = B(-1).toVar();
2914
2915
  for (let s = -1; s <= 1; ++s) for (let c = -1; c <= 1; ++c) {
2915
- let l = t.add(U(s, c)).toVar(), u = e.load(l).r;
2916
- r.renderer.reversedDepthBuffer && (u = u.oneMinus()), r.renderer.logarithmicDepthBuffer && (u = ur(u, n)), u = u.toVar(), B(u.lessThan(i), () => {
2916
+ let l = t.add(H(s, c)).toVar(), u = e.load(l).r;
2917
+ r.renderer.reversedDepthBuffer && (u = u.oneMinus()), r.renderer.logarithmicDepthBuffer && (u = fr(u, n)), u = u.toVar(), z(u.lessThan(i), () => {
2917
2918
  i.assign(u), a.assign(l);
2918
- }), B(u.greaterThan(o), () => {
2919
+ }), z(u.greaterThan(o), () => {
2919
2920
  o.assign(u);
2920
2921
  });
2921
2922
  }
2922
- return lr(i, a, o);
2923
- }), sr = H(([e, t, n, r, i, a, o], s) => {
2923
+ return dr(i, a, o);
2924
+ }), lr = V(([e, t, n, r, i, a, o], s) => {
2924
2925
  let c = e.sample(t).r;
2925
- s.renderer.logarithmicDepthBuffer && (c = ur(c, a));
2926
- let l = Ze(t, c, n), u = r.mul(L(l, 1)).xyz, d = i.mul(L(u, 1)).z;
2927
- return o.isOrthographicCamera ? rt(d, a.x, a.y) : at(d, a.x, a.y);
2926
+ s.renderer.logarithmicDepthBuffer && (c = fr(c, a));
2927
+ let l = $e(t, c, n), u = r.mul(I(l, 1)).xyz, d = i.mul(I(u, 1)).z;
2928
+ return o.isOrthographicCamera ? at(d, a.x, a.y) : st(d, a.x, a.y);
2928
2929
  });
2929
- function cr(e) {
2930
- return Array.from({ length: e }, (e, t) => [dr(t + 1, 2), dr(t + 1, 3)]);
2930
+ function ur(e) {
2931
+ return Array.from({ length: e }, (e, t) => [pr(t + 1, 2), pr(t + 1, 3)]);
2931
2932
  }
2932
- var lr = ze({
2933
+ var dr = Ve({
2933
2934
  closestDepth: "float",
2934
2935
  closestPositionTexel: "vec2",
2935
2936
  farthestDepth: "float"
2936
- }), ur = (e, t) => {
2937
+ }), fr = (e, t) => {
2937
2938
  let { x: n, y: r } = t;
2938
- return at(Yt(e, n, r), n, r);
2939
+ return st(Zt(e, n, r), n, r);
2939
2940
  };
2940
- function dr(e, t) {
2941
+ function pr(e, t) {
2941
2942
  let n = 1, r = 0;
2942
2943
  for (; e > 0;) n /= t, r += e % t * n, e = Math.floor(e / t);
2943
2944
  return r;
2944
2945
  }
2945
2946
  //#endregion
2946
2947
  //#region ../../node_modules/three/examples/jsm/tsl/display/TRAANode.js
2947
- var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class extends we {
2948
+ var mr = /* @__PURE__ */ new Me(), hr = /* @__PURE__ */ new d(), gr, _r = class extends Ee {
2948
2949
  static get type() {
2949
2950
  return "TRAANode";
2950
2951
  }
2951
2952
  constructor(e, t, n, r) {
2952
- super("vec4"), this.isTRAANode = !0, this.updateBeforeType = De.FRAME, this.beautyNode = e, this.depthNode = t, this.velocityNode = n, this.camera = r, this.depthThreshold = 5e-4, this.edgeDepthDiff = .001, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = F(new d()), this._historyRenderTarget = new c(1, 1, {
2953
+ super("vec4"), this.isTRAANode = !0, this.updateBeforeType = ke.FRAME, this.beautyNode = e, this.depthNode = t, this.velocityNode = n, this.camera = r, this.depthThreshold = 5e-4, this.edgeDepthDiff = .001, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = P(new d()), this._historyRenderTarget = new c(1, 1, {
2953
2954
  depthBuffer: !1,
2954
- type: te,
2955
+ type: ne,
2955
2956
  depthTexture: new _()
2956
2957
  }), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new c(1, 1, {
2957
2958
  depthBuffer: !1,
2958
- type: te
2959
- }), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new k(), this._resolveMaterial.name = "TRAA.resolve", this._textureNode = Ct(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new x(), this._cameraNearFar = F(new d()), this._cameraWorldMatrix = F(new x()), this._cameraWorldMatrixInverse = F(new x()), this._cameraProjectionMatrixInverse = F(new x()), this._previousCameraWorldMatrix = F(new x()), this._previousCameraProjectionMatrixInverse = F(new x()), this._previousDepthNode = I(new _(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
2959
+ type: ne
2960
+ }), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new O(), this._resolveMaterial.name = "TRAA.resolve", this._textureNode = Tt(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new x(), this._cameraNearFar = P(new d()), this._cameraWorldMatrix = P(new x()), this._cameraWorldMatrixInverse = P(new x()), this._cameraProjectionMatrixInverse = P(new x()), this._previousCameraWorldMatrix = P(new x()), this._previousCameraProjectionMatrixInverse = P(new x()), this._previousDepthNode = F(new _(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
2960
2961
  }
2961
2962
  getTextureNode() {
2962
2963
  return this._textureNode;
@@ -2973,34 +2974,34 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
2973
2974
  offsetY: 0,
2974
2975
  width: e,
2975
2976
  height: t
2976
- }, r = gr[this._jitterIndex];
2977
+ }, r = vr[this._jitterIndex];
2977
2978
  this.camera.setViewOffset(n.fullWidth, n.fullHeight, n.offsetX + r[0] - .5, n.offsetY + r[1] - .5, n.width, n.height);
2978
2979
  }
2979
2980
  clearViewOffset() {
2980
- this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= gr.length;
2981
+ this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= vr.length;
2981
2982
  }
2982
2983
  updateBefore(e) {
2983
2984
  let { renderer: t } = e;
2984
2985
  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);
2985
2986
  let n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, r = n.texture.width, i = n.texture.height;
2986
- this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), mr = A.resetRendererState(t, mr);
2987
+ this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), gr = k.resetRendererState(t, gr);
2987
2988
  let a = this._historyRenderTarget.width !== r || this._historyRenderTarget.height !== i;
2988
- 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), fr.material = this._resolveMaterial, fr.name = "TRAA", fr.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
2989
- let o = t.getDrawingBufferSize(pr);
2989
+ 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), mr.material = this._resolveMaterial, mr.name = "TRAA", mr.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
2990
+ let o = t.getDrawingBufferSize(hr);
2990
2991
  if (this._historyRenderTarget.height === o.height && this._historyRenderTarget.width === o.width) {
2991
2992
  let e = this.depthNode.value;
2992
2993
  t.copyTextureToTexture(e, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
2993
2994
  }
2994
- A.restoreRendererState(t, mr);
2995
+ k.restoreRendererState(t, gr);
2995
2996
  }
2996
2997
  setup(e) {
2997
- e.renderPipeline && !e.context.renderPipelineState.viewOffsetOwner && (e.context.renderPipelineState.viewOffsetOwner = this, this._needsPostProcessingSync = !0, ht(() => {
2998
- let t = e.renderer.getDrawingBufferSize(pr);
2998
+ e.renderPipeline && !e.context.renderPipelineState.viewOffsetOwner && (e.context.renderPipelineState.viewOffsetOwner = this, this._needsPostProcessingSync = !0, _t(() => {
2999
+ let t = e.renderer.getDrawingBufferSize(hr);
2999
3000
  this.setViewOffset(t.width, t.height);
3000
- }), Ft(() => {
3001
+ }), Lt(() => {
3001
3002
  this.clearViewOffset();
3002
- })), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = S), e.context.velocity === void 0 ? this._velocityNode = He : this._velocityNode = e.context.velocity;
3003
- let t = H(([e, t, n, r]) => {
3003
+ })), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = te), e.context.velocity === void 0 ? this._velocityNode = We : this._velocityNode = e.context.velocity;
3004
+ let t = V(([e, t, n, r]) => {
3004
3005
  let i = [
3005
3006
  [-1, -1],
3006
3007
  [-1, 1],
@@ -3012,13 +3013,13 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3012
3013
  [-1, 0]
3013
3014
  ], a = t.toVar(), o = t.pow2().toVar();
3014
3015
  for (let [t, n] of i) {
3015
- let r = this.beautyNode.offset(et(t, n)).load(e).max(0);
3016
+ let r = this.beautyNode.offset(nt(t, n)).load(e).max(0);
3016
3017
  a.addAssign(r), o.addAssign(r.pow2());
3017
3018
  }
3018
- let s = V(i.length + 1), c = a.div(s), l = o.div(s).sub(c.pow2()).max(0).sqrt().mul(r), u = c.sub(l), d = c.add(l);
3019
- return ir(c.clamp(u, d), n, u, d);
3020
- }), n = H(([e, t]) => {
3021
- let n = e.mul(t).fract().abs(), r = R(n, n.oneMinus());
3019
+ let s = B(i.length + 1), c = a.div(s), l = o.div(s).sub(c.pow2()).max(0).sqrt().mul(r), u = c.sub(l), d = c.add(l);
3020
+ return or(c.clamp(u, d), n, u, d);
3021
+ }), n = V(([e, t]) => {
3022
+ let n = e.mul(t).fract().abs(), r = L(n, n.oneMinus());
3022
3023
  return r.x.mul(r.y).oneMinus().div(.75);
3023
3024
  }).setLayout({
3024
3025
  name: "subpixelCorrection",
@@ -3030,16 +3031,16 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3030
3031
  name: "textureSize",
3031
3032
  type: "ivec2"
3032
3033
  }]
3033
- }), r = I(this._historyRenderTarget.texture), i = H(() => {
3034
- let e = qe(), i = this.beautyNode.size(), a = e.mul(i), o = or(this.depthNode, a, this._cameraNearFar), s = o.get("closestDepth"), c = o.get("closestPositionTexel"), l = o.get("farthestDepth"), u = this.velocityNode.load(c).xy.mul(U(.5, -.5)), d = e.sub(u), f = sr(this._previousDepthNode, d, this._previousCameraProjectionMatrixInverse, this._previousCameraWorldMatrix, this._cameraWorldMatrixInverse, this._cameraNearFar, this.camera), p = d.greaterThanEqual(0).all().and(d.lessThanEqual(1).all()), m = l.sub(s).greaterThan(this.edgeDepthDiff), h = s.sub(f).greaterThan(this.depthThreshold), g = p.and(m.or(h.not())), _ = this.beautyNode.sample(e), v = r.sample(d), y = e.sub(d).mul(i).length().div(this.maxVelocityLength).saturate(), b = V(.05).toVar();
3035
- return this.useSubpixelCorrection && b.addAssign(n(u, i).mul(.25)), b.assign(g.select(b.add(y).saturate(), 1)), ar(_, t(a, _, v, Ge(.5, 1, y.oneMinus().pow2())), b);
3034
+ }), r = F(this._historyRenderTarget.texture), i = V(() => {
3035
+ let e = Ye(), i = this.beautyNode.size(), a = e.mul(i), o = cr(this.depthNode, a, this._cameraNearFar), s = o.get("closestDepth"), c = o.get("closestPositionTexel"), l = o.get("farthestDepth"), u = this.velocityNode.load(c).xy.mul(H(.5, -.5)), d = e.sub(u), f = lr(this._previousDepthNode, d, this._previousCameraProjectionMatrixInverse, this._previousCameraWorldMatrix, this._cameraWorldMatrixInverse, this._cameraNearFar, this.camera), p = d.greaterThanEqual(0).all().and(d.lessThanEqual(1).all()), m = l.sub(s).greaterThan(this.edgeDepthDiff), h = s.sub(f).greaterThan(this.depthThreshold), g = p.and(m.or(h.not())), _ = this.beautyNode.sample(e), v = r.sample(d), y = e.sub(d).mul(i).length().div(this.maxVelocityLength).saturate(), b = B(.05).toVar();
3036
+ return this.useSubpixelCorrection && b.addAssign(n(u, i).mul(.25)), b.assign(g.select(b.add(y).saturate(), 1)), sr(_, t(a, _, v, qe(.5, 1, y.oneMinus().pow2())), b);
3036
3037
  });
3037
- return this._resolveMaterial.contextNode = qt(e.getSharedContext()), this._resolveMaterial.colorNode = i(), this._textureNode;
3038
+ return this._resolveMaterial.contextNode = Yt(e.getSharedContext()), this._resolveMaterial.colorNode = i(), this._textureNode;
3038
3039
  }
3039
3040
  dispose() {
3040
3041
  super.dispose(), this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
3041
3042
  }
3042
- }, gr = /* @__PURE__ */ cr(32), _r = (e, t, n, r) => new hr(pt(e), t, n, r), vr = class e extends tn {
3043
+ }, vr = /* @__PURE__ */ ur(32), yr = (e, t, n, r) => new _r(ht(e), t, n, r), br = class e extends rn {
3043
3044
  constructor(...t) {
3044
3045
  super(...t), this.passId = e.passId;
3045
3046
  }
@@ -3047,109 +3048,109 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3047
3048
  this.passId = "TraaRenderPass";
3048
3049
  }
3049
3050
  assemble(e, t, n, r, i) {
3050
- if (!(r instanceof D)) return t;
3051
- let a = _r(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), r);
3051
+ if (!(r instanceof E)) return t;
3052
+ let a = yr(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), r);
3052
3053
  return i === "velocity" ? a.velocityNode : a;
3053
3054
  }
3054
3055
  addParametersToGUI(e, t) {}
3055
- }, Q = {
3056
+ }, Z = {
3056
3057
  HIGHEST: "highest",
3057
3058
  HIGHER: "higher",
3058
3059
  HIGH: "high",
3059
3060
  MEDIUM: "medium",
3060
3061
  LOW: "low",
3061
3062
  LOWEST: "lowest"
3062
- }, $ = [
3063
- Q.HIGHEST,
3064
- Q.HIGHER,
3065
- Q.HIGH,
3066
- Q.MEDIUM,
3067
- Q.LOW,
3068
- Q.LOWEST
3069
- ], yr = $[0], br = $[$.length - 1], xr = Q.HIGHEST, Sr = new Map([
3070
- [Q.HIGHEST, {
3063
+ }, Q = [
3064
+ Z.HIGHEST,
3065
+ Z.HIGHER,
3066
+ Z.HIGH,
3067
+ Z.MEDIUM,
3068
+ Z.LOW,
3069
+ Z.LOWEST
3070
+ ], xr = Q[0], Sr = Q[Q.length - 1], Cr = Z.HIGHEST, wr = new Map([
3071
+ [Z.HIGHEST, {
3071
3072
  maxPixelRatio: 1.5,
3072
3073
  ssgiPerformanceParameters: {
3073
3074
  sliceCount: 3,
3074
3075
  stepCount: 16
3075
3076
  }
3076
3077
  }],
3077
- [Q.HIGHER, {
3078
+ [Z.HIGHER, {
3078
3079
  maxPixelRatio: 1.5,
3079
3080
  ssgiPerformanceParameters: {
3080
3081
  sliceCount: 2,
3081
3082
  stepCount: 8
3082
3083
  }
3083
3084
  }],
3084
- [Q.HIGH, {
3085
+ [Z.HIGH, {
3085
3086
  maxPixelRatio: 1.5,
3086
3087
  ssgiPerformanceParameters: {
3087
3088
  sliceCount: 1,
3088
3089
  stepCount: 12
3089
3090
  }
3090
3091
  }],
3091
- [Q.MEDIUM, {
3092
+ [Z.MEDIUM, {
3092
3093
  maxPixelRatio: 1.25,
3093
3094
  ssgiPerformanceParameters: {
3094
3095
  sliceCount: 1,
3095
3096
  stepCount: 12
3096
3097
  }
3097
3098
  }],
3098
- [Q.LOW, {
3099
+ [Z.LOW, {
3099
3100
  maxPixelRatio: 1,
3100
3101
  ssgiPerformanceParameters: {
3101
3102
  sliceCount: 1,
3102
3103
  stepCount: 8
3103
3104
  }
3104
3105
  }],
3105
- [Q.LOWEST, {
3106
+ [Z.LOWEST, {
3106
3107
  maxPixelRatio: 1,
3107
3108
  ssgiPerformanceParameters: {
3108
3109
  sliceCount: 0,
3109
3110
  stepCount: 0
3110
3111
  }
3111
3112
  }]
3112
- ]), Cr = [
3113
+ ]), Tr = [
3113
3114
  {
3114
3115
  min: 70,
3115
3116
  max: Infinity,
3116
- value: Q.HIGHEST
3117
+ value: Z.HIGHEST
3117
3118
  },
3118
3119
  {
3119
3120
  min: 55,
3120
3121
  max: 69,
3121
- value: Q.HIGHER
3122
+ value: Z.HIGHER
3122
3123
  },
3123
3124
  {
3124
3125
  min: 40,
3125
3126
  max: 54,
3126
- value: Q.HIGH
3127
+ value: Z.HIGH
3127
3128
  },
3128
3129
  {
3129
3130
  min: 30,
3130
3131
  max: 39,
3131
- value: Q.MEDIUM
3132
+ value: Z.MEDIUM
3132
3133
  },
3133
3134
  {
3134
3135
  min: 20,
3135
3136
  max: 29,
3136
- value: Q.LOW
3137
+ value: Z.LOW
3137
3138
  },
3138
3139
  {
3139
3140
  min: 0,
3140
3141
  max: 19,
3141
- value: Q.LOWEST
3142
+ value: Z.LOWEST
3142
3143
  }
3143
- ], wr = (e) => Cr.find((t) => e >= t.min && e <= t.max).value, Tr = class {
3144
+ ], Er = (e) => Tr.find((t) => e >= t.min && e <= t.max).value, Dr = class {
3144
3145
  constructor(e) {
3145
- this.qualityLevel = xr, this.qualityMap = Sr, this.fpsCounter = new xe(), this.applyQualityParametersCallback = e;
3146
+ this.qualityLevel = Cr, this.qualityMap = wr, this.fpsCounter = new Ce(), this.applyQualityParametersCallback = e;
3146
3147
  }
3147
3148
  getQualityLevel() {
3148
3149
  return this.qualityLevel;
3149
3150
  }
3150
3151
  manageQualitySettings(e, t) {
3151
3152
  this.fpsCounter.update();
3152
- let n = this.fpsCounter.getFps(), r = n > 0 && n < e && this.qualityLevel !== br, i = n > t && this.qualityLevel !== yr, a = r ? "decrement" : i ? "increment" : void 0;
3153
+ let n = this.fpsCounter.getFps(), r = n > 0 && n < e && this.qualityLevel !== Sr, i = n > t && this.qualityLevel !== xr, a = r ? "decrement" : i ? "increment" : void 0;
3153
3154
  if (a === void 0) {
3154
3155
  this.qualityChangePendingSince = void 0, this.qualityChangePendingDirection = void 0;
3155
3156
  return;
@@ -3162,25 +3163,25 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3162
3163
  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());
3163
3164
  }
3164
3165
  incrementQualityLevel() {
3165
- let e = $.indexOf(this.qualityLevel);
3166
+ let e = Q.indexOf(this.qualityLevel);
3166
3167
  this.setQualityLevelByOrderIndex(e - 1);
3167
3168
  }
3168
3169
  decrementQualityLevel() {
3169
- let e = $.indexOf(this.qualityLevel);
3170
+ let e = Q.indexOf(this.qualityLevel);
3170
3171
  this.setQualityLevelByOrderIndex(e + 1);
3171
3172
  }
3172
3173
  setQualityLevel(e) {
3173
3174
  this.qualityLevel !== e && (this.qualityLevel = e, this.applyCurrentQualityLevel());
3174
3175
  }
3175
3176
  addGUI(e, t) {
3176
- let n = e.createParameters("Quality Settings"), r = Object.fromEntries($.map((e) => [e, e])), i = { qualityLevel: this.qualityLevel };
3177
+ let n = e.createParameters("Quality Settings"), r = Object.fromEntries(Q.map((e) => [e, e])), i = { qualityLevel: this.qualityLevel };
3177
3178
  n.add(i, "qualityLevel", r).onChange((e) => {
3178
3179
  this.setQualityLevel(e), t();
3179
3180
  });
3180
3181
  }
3181
3182
  setQualityLevelByOrderIndex(e) {
3182
- let t = Math.min(Math.max(e, 0), $.length - 1);
3183
- this.setQualityLevel($[t]);
3183
+ let t = Math.min(Math.max(e, 0), Q.length - 1);
3184
+ this.setQualityLevel(Q[t]);
3184
3185
  }
3185
3186
  applyCurrentQualityLevel(e = 6) {
3186
3187
  let t = this.qualityMap.get(this.qualityLevel);
@@ -3189,29 +3190,29 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3189
3190
  async autoDetectInitialQualityLevel() {
3190
3191
  let { getGPUTier: e } = await import("./dist-Blgk0vU0.mjs"), t = await e({ benchmarksURL: "./benchmarks" });
3191
3192
  if (!t || !t.fps) {
3192
- console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel = xr;
3193
+ console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel = Cr;
3193
3194
  return;
3194
3195
  }
3195
- this.qualityLevel = wr(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.`);
3196
+ this.qualityLevel = Er(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.`);
3196
3197
  }
3197
- }, Er = class e extends tn {
3198
+ }, Or = class e extends rn {
3198
3199
  static {
3199
3200
  this.passId = "FogRenderPass";
3200
3201
  }
3201
3202
  constructor(t) {
3202
- super(), this.passId = e.passId, this.sceneWithFog = void 0, this.transparentObjectsDepthPass = void 0, this.fogColor = F(new ue(t.color)), this.fogNearBlend = F(t.nearBlend), this.fogFarBlend = F(t.farBlend), this.depthOverrideMaterial = new ce({ side: 2 });
3203
+ super(), this.passId = e.passId, this.sceneWithFog = void 0, this.transparentObjectsDepthPass = void 0, this.fogColor = P(new de(t.color)), this.fogNearBlend = P(t.nearBlend), this.fogFarBlend = P(t.farBlend), this.depthOverrideMaterial = new le({ side: 2 });
3203
3204
  }
3204
3205
  assemble(e, t, n, r, i) {
3205
- if (!(r instanceof D) || i === "no fog" || i === "depth") return this.removeSceneFog(), t;
3206
- let a = e.getTextureNode("depth"), o = this.getTransparentObjectsDepthPassTexture(n, r), s = Ve(a.r, o.r), c = F(r.projectionMatrixInverse), l = F(r.matrixWorld), u = Ve(F(r.far).onRenderUpdate(() => r.far), 50).sub(this.fogFarBlend), d = u.sub(this.fogNearBlend), f = L(Ht.x.mul(2).sub(1), Ht.y.mul(2).sub(1), s, 1), p = c.mul(f), m = p.xyz.div(p.w), h = l.mul(L(m, 1)).xyz.xz.length(), g = u.sub(h).div(u.sub(d)).clamp(0, 1).toInspector("Fog / Factor");
3207
- return this.addSceneFog(n, d, u), Ge(L(this.fogColor, 1), t, g).toInspector("Fog / Composite");
3206
+ if (!(r instanceof E) || i === "no fog" || i === "depth") return this.removeSceneFog(), t;
3207
+ let a = e.getTextureNode("depth"), o = this.getTransparentObjectsDepthPassTexture(n, r), s = Ue(a.r, o.r), c = P(r.projectionMatrixInverse), l = P(r.matrixWorld), u = Ue(P(r.far).onRenderUpdate(() => r.far), 50).sub(this.fogFarBlend), d = u.sub(this.fogNearBlend), f = I(Wt.x.mul(2).sub(1), Wt.y.mul(2).sub(1), s, 1), p = c.mul(f), m = p.xyz.div(p.w), h = l.mul(I(m, 1)).xyz.xz.length(), g = u.sub(h).div(u.sub(d)).clamp(0, 1).toInspector("Fog / Factor");
3208
+ return this.addSceneFog(n, d, u), qe(I(this.fogColor, 1), t, g).toInspector("Fog / Composite");
3208
3209
  }
3209
3210
  addSceneFog(e, t, n) {
3210
- let r = It.xz.length(), i = n.sub(r).div(n.sub(t)).clamp(0, 1).oneMinus();
3211
- e.fogNode = wt(this.fogColor, i), this.sceneWithFog = e;
3211
+ let r = Rt.xz.length(), i = n.sub(r).div(n.sub(t)).clamp(0, 1).oneMinus();
3212
+ e.fogNode = Et(this.fogColor, i), this.sceneWithFog = e;
3212
3213
  }
3213
3214
  getTransparentObjectsDepthPassTexture(e, t) {
3214
- return this.transparentObjectsDepthPass?.dispose(), this.transparentObjectsDepthPass = Ut(e, t), this.transparentObjectsDepthPass.opaque = !1, this.transparentObjectsDepthPass.overrideMaterial = this.depthOverrideMaterial, this.transparentObjectsDepthPass.getTextureNode("depth");
3215
+ return this.transparentObjectsDepthPass?.dispose(), this.transparentObjectsDepthPass = Gt(e, t), this.transparentObjectsDepthPass.opaque = !1, this.transparentObjectsDepthPass.overrideMaterial = this.depthOverrideMaterial, this.transparentObjectsDepthPass.getTextureNode("depth");
3215
3216
  }
3216
3217
  removeSceneFog() {
3217
3218
  this.sceneWithFog &&= (this.sceneWithFog.fogNode = null, void 0), this.transparentObjectsDepthPass?.dispose(), this.transparentObjectsDepthPass = void 0;
@@ -3222,7 +3223,7 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3222
3223
  this.fogColor.value.set(e), t();
3223
3224
  });
3224
3225
  }
3225
- }, Dr = class e extends tn {
3226
+ }, kr = class e extends rn {
3226
3227
  constructor(...t) {
3227
3228
  super(...t), this.passId = e.passId;
3228
3229
  }
@@ -3230,25 +3231,25 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3230
3231
  this.passId = "DebugRenderPass";
3231
3232
  }
3232
3233
  assemble(e, t, n, r, i) {
3233
- return i === "depth" ? L(M(e.getTextureNode("depth").r), 1) : i === "direct lighting only" ? e : t;
3234
+ return i === "depth" ? I(j(e.getTextureNode("depth").r), 1) : i === "direct lighting only" ? e : t;
3234
3235
  }
3235
3236
  addParametersToGUI(e, t) {}
3236
- }, Or = [
3237
- rr.passId,
3238
- nn.passId,
3239
- Er.passId,
3240
- vr.passId
3241
- ], kr = {
3242
- [O.NONE]: 0,
3243
- [O.LINEAR]: 1,
3244
- [O.REINHARD]: 2,
3245
- [O.CINEON]: 3,
3246
- [O.ACES_FILMIC]: 4,
3247
- [O.AGX]: 6,
3248
- [O.NEUTRAL]: 7
3249
- }, Ar = class extends be {
3237
+ }, Ar = [
3238
+ ar.passId,
3239
+ an.passId,
3240
+ Or.passId,
3241
+ br.passId
3242
+ ], jr = {
3243
+ [D.NONE]: 0,
3244
+ [D.LINEAR]: 1,
3245
+ [D.REINHARD]: 2,
3246
+ [D.CINEON]: 3,
3247
+ [D.ACES_FILMIC]: 4,
3248
+ [D.AGX]: 6,
3249
+ [D.NEUTRAL]: 7
3250
+ }, $ = class extends Se {
3250
3251
  constructor(e, t, n, r, i = n) {
3251
- 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 Tr(this.applyQualityParameters.bind(this)), this.freezeFrames = 0, this.freezeRenderTarget = new c(), this.debugRenderPass = new Dr(), this.renderPipeline = new Ne(t), this.applyToneMappingConfig(), this.enableDefaultRenderPasses(n, r, i), this._initData.webGpuConfig.autoDetectQualityLevel ? this.qualityManager.autoDetectInitialQualityLevel().then(() => this.qualityManager.applyCurrentQualityLevel(0)) : this.qualityManager.applyCurrentQualityLevel(0);
3252
+ 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 Dr(this.applyQualityParameters.bind(this)), this.freezeFrames = 0, this.freezeRenderTarget = new c(), this.debugRenderPass = new kr(), this.renderPipeline = new Fe(t), this.applyToneMappingConfig(), this.enableDefaultRenderPasses(n, r, i), this._initData.webGpuConfig.autoDetectQualityLevel ? this.qualityManager.autoDetectInitialQualityLevel().then(() => this.qualityManager.applyCurrentQualityLevel(0)) : this.qualityManager.applyCurrentQualityLevel(0);
3252
3253
  }
3253
3254
  enableDefaultRenderPasses(e, t, n) {
3254
3255
  let r = this._initData.webGpuConfig.fog.enabled, i = this._initData.transparentBackground;
@@ -3275,7 +3276,7 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3275
3276
  switchToPlanner(e) {
3276
3277
  super.switchToPlanner(e);
3277
3278
  let t = this._skyStateTracker.isSkyEnabled;
3278
- this._webGpuGroundShadowReflection.setFloorVisible(t), this._webGpuGroundShadowReflection.setTopLightVisible(!t && e !== Se.Mode2D), this._webGpuSkyContainer.setVisible(t), this._skyStateTracker.notifyEnteredPlanner(), this.disableFogPass(), this.passNeedsReassembly = !0;
3279
+ this._webGpuGroundShadowReflection.setFloorVisible(t), this._webGpuGroundShadowReflection.setTopLightVisible(!t && e !== we.Mode2D), this._webGpuSkyContainer.setVisible(t), this._skyStateTracker.notifyEnteredPlanner(), this.disableFogPass(), this.passNeedsReassembly = !0;
3279
3280
  }
3280
3281
  highlightObjects(e) {
3281
3282
  this.getOutlinePassOrUndefined()?.highlightObjects(e);
@@ -3292,17 +3293,17 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3292
3293
  this.renderer.setRenderTarget(this.freezeRenderTarget), this.renderPipeline.render(), this.renderer.setRenderTarget(e);
3293
3294
  }
3294
3295
  updateCameraProjectionMatrix(e) {
3295
- (e instanceof r || e instanceof D) && e.updateProjectionMatrix();
3296
+ (e instanceof r || e instanceof E) && e.updateProjectionMatrix();
3296
3297
  }
3297
3298
  assembleRenderPasses(e, t) {
3298
- let n = Pt(e, t), r = n;
3299
- n.setMRT(We({
3300
- output: vt,
3301
- diffuseColor: nt,
3302
- normal: kt(ct),
3303
- velocity: He
3299
+ let n = It(e, t), r = n;
3300
+ n.setMRT(Ke({
3301
+ output: bt,
3302
+ diffuseColor: it,
3303
+ normal: jt(ut),
3304
+ velocity: We
3304
3305
  }));
3305
- for (let i of Or) {
3306
+ for (let i of Ar) {
3306
3307
  let a = this.renderPasses.get(i);
3307
3308
  a && (r = a.assemble(n, r, e, t, this.debugMode));
3308
3309
  }
@@ -3316,7 +3317,7 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3316
3317
  this.isConfiguratorMode && this._webGpuGroundShadowReflection.setReceiveShadow(e);
3317
3318
  }
3318
3319
  enableOutline(e, t) {
3319
- this.getOutlinePassOrUndefined() || this.addRenderPass(new nn({
3320
+ this.getOutlinePassOrUndefined() || this.addRenderPass(new an({
3320
3321
  selectedObjects: [],
3321
3322
  visibleEdgeColor: e,
3322
3323
  hiddenEdgeColor: t,
@@ -3326,13 +3327,13 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3326
3327
  }));
3327
3328
  }
3328
3329
  getOutlinePassOrUndefined() {
3329
- let e = this.renderPasses.get(nn.passId);
3330
- if (e && e instanceof nn) return e;
3330
+ let e = this.renderPasses.get(an.passId);
3331
+ if (e && e instanceof an) return e;
3331
3332
  }
3332
3333
  enableSsgiPass(e) {
3333
- if (this.renderPasses.get(rr.passId)) return;
3334
+ if (this.renderPasses.get(ar.passId)) return;
3334
3335
  let t = this._initData.webGpuConfig.ssgi;
3335
- this.addRenderPass(new rr({
3336
+ this.addRenderPass(new ar({
3336
3337
  sliceCount: 2,
3337
3338
  stepCount: 12,
3338
3339
  radius: 8,
@@ -3349,20 +3350,20 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3349
3350
  }));
3350
3351
  }
3351
3352
  enableTraaPass() {
3352
- this.renderPasses.get(vr.passId) || this.addRenderPass(new vr());
3353
+ this.renderPasses.get(br.passId) || this.addRenderPass(new br());
3353
3354
  }
3354
3355
  enableFogPass() {
3355
- if (this.renderPasses.get(Er.passId)) return;
3356
+ if (this.renderPasses.get(Or.passId)) return;
3356
3357
  let e = this._initData.webGpuConfig.fog;
3357
- this.addRenderPass(new Er({
3358
- color: this._initData.colors.DEFAULT_BACKGROUND,
3358
+ this.addRenderPass(new Or({
3359
+ color: xe(e.color ?? this._initData.colors.DEFAULT_BACKGROUND),
3359
3360
  nearBlend: e.nearBlend,
3360
3361
  farBlend: e.farBlend
3361
3362
  }));
3362
3363
  }
3363
3364
  disableFogPass() {
3364
- let e = this.renderPasses.get(Er.passId);
3365
- !e || !(e instanceof Er) || (e.removeSceneFog(), this.renderPasses.delete(Er.passId));
3365
+ let e = this.renderPasses.get(Or.passId);
3366
+ !e || !(e instanceof Or) || (e.removeSceneFog(), this.renderPasses.delete(Or.passId));
3366
3367
  }
3367
3368
  applyQualityParameters(e, t) {
3368
3369
  this.freezeFrames = Math.max(t, this.freezeFrames);
@@ -3370,17 +3371,17 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3370
3371
  this.renderer.setPixelRatio(Math.min(n, e.maxPixelRatio)), this.getSsgiPassOrUndefined()?.updatePerformanceParameters(e.ssgiPerformanceParameters), this.passNeedsReassembly = !0;
3371
3372
  }
3372
3373
  getSsgiPassOrUndefined() {
3373
- let e = this.renderPasses.get(rr.passId);
3374
- if (e && e instanceof rr) return e;
3374
+ let e = this.renderPasses.get(ar.passId);
3375
+ if (e && e instanceof ar) return e;
3375
3376
  }
3376
3377
  setShadingType(e) {
3377
- e !== ge.DEFAULT && console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
3378
+ e !== _e.DEFAULT && console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
3378
3379
  }
3379
3380
  showGUI(e) {
3380
- if (this.renderer.inspector instanceof Un) return;
3381
+ if (this.renderer.inspector instanceof Gn) return;
3381
3382
  let t = document.createElement("style");
3382
3383
  t.innerText = ".profiler-toggle,\n .profiler-mini-panel {\n left: 15px;\n right: auto !important;\n }", document.head.appendChild(t);
3383
- let n = new Un();
3384
+ let n = new Gn();
3384
3385
  this.renderer.inspector = n, this._domHelper.element?.appendChild(n.domElement), this.addDebugGUI(n, e), this.qualityManager.addGUI(n, e);
3385
3386
  let r = n.createParameters("Render Pass Settings");
3386
3387
  for (let t of this.renderPasses.values()) t.addParametersToGUI(r, e);
@@ -3408,7 +3409,7 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3408
3409
  }
3409
3410
  applyToneMappingConfig() {
3410
3411
  let { toneMapping: e, toneMappingExposure: t } = this._initData.webGpuConfig;
3411
- this.renderer.toneMapping = kr[e], this.renderer.toneMappingExposure = t;
3412
+ this.renderer.toneMapping = jr[e], this.renderer.toneMappingExposure = t;
3412
3413
  }
3413
3414
  addToneMappingSettings(e, t) {
3414
3415
  let n = e.addFolder("Tone Mapping"), r = {
@@ -3431,7 +3432,7 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3431
3432
  }
3432
3433
  getOrCreateGUIParameters(e) {
3433
3434
  let t = this.renderer.inspector;
3434
- if (t instanceof Un) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
3435
+ if (t instanceof Gn) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
3435
3436
  throw Error("Inspector GUI is not initialized. Call showGUI() before creating parameter groups.");
3436
3437
  }
3437
3438
  createAndCacheGUIParameters(e, t) {
@@ -3439,8 +3440,8 @@ var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class
3439
3440
  return this.guiParameterGroups.set(t, n), n;
3440
3441
  }
3441
3442
  };
3442
- ye([ve, _e("design:type", Object)], Ar.prototype, "_domHelper", void 0), ye([ve, _e("design:type", Object)], Ar.prototype, "_webGpuGroundShadowReflection", void 0), ye([ve, _e("design:type", Object)], Ar.prototype, "_webGpuSkyContainer", void 0), ye([ve, _e("design:type", Object)], Ar.prototype, "_skyStateTracker", void 0), ye([ve, _e("design:type", Object)], Ar.prototype, "_initData", void 0);
3443
+ be([ye, ve("design:type", Object)], $.prototype, "_domHelper", void 0), be([ye, ve("design:type", Object)], $.prototype, "_webGpuGroundShadowReflection", void 0), be([ye, ve("design:type", Object)], $.prototype, "_webGpuSkyContainer", void 0), be([ye, ve("design:type", Object)], $.prototype, "_skyStateTracker", void 0), be([ye, ve("design:type", Object)], $.prototype, "_initData", void 0);
3443
3444
  //#endregion
3444
- export { Ar as RoomleWebGPURenderer };
3445
+ export { $ as RoomleWebGPURenderer };
3445
3446
 
3446
- //# sourceMappingURL=roomle-webgpu-renderer-BQuRMtn8.mjs.map
3447
+ //# sourceMappingURL=roomle-webgpu-renderer-ZT__n9mA.mjs.map