@roomle/web-sdk 5.1.0-alpha.4 → 5.1.0-alpha.6
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.
- package/lib/{BufferGeometry-Bl5whHAB.mjs → BufferGeometry-CxlpBjLq.mjs} +192 -195
- package/lib/BufferGeometry-CxlpBjLq.mjs.map +1 -0
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/{GLTFExporter-yQ7mMauu.mjs → GLTFExporter-DeNw0qAI.mjs} +86 -80
- package/lib/GLTFExporter-DeNw0qAI.mjs.map +1 -0
- package/lib/GaussianBlurNode-BR1cKBsX.mjs +65 -0
- package/lib/GaussianBlurNode-BR1cKBsX.mjs.map +1 -0
- package/lib/{Object3D-BHdngbxB.mjs → Object3D-CALIQdg1.mjs} +142 -59
- package/lib/Object3D-CALIQdg1.mjs.map +1 -0
- package/lib/{Pass-DLiMLT5k.mjs → Pass-DCljS3Z-.mjs} +4 -4
- package/lib/{Pass-DLiMLT5k.mjs.map → Pass-DCljS3Z-.mjs.map} +1 -1
- package/lib/{PointLightHelper-CuPSBuDU.mjs → PointLightHelper-C_0CYp7R.mjs} +35 -32
- package/lib/PointLightHelper-C_0CYp7R.mjs.map +1 -0
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{SpotLightHelper-m-Rh8vGU.mjs → SpotLightHelper-UUIHn43T.mjs} +22 -19
- package/lib/SpotLightHelper-UUIHn43T.mjs.map +1 -0
- package/lib/{USDZExporter-MdkuT226.mjs → USDZExporter-BBNw7Hey.mjs} +6 -3
- package/lib/USDZExporter-BBNw7Hey.mjs.map +1 -0
- package/lib/{Vector4-C7TlIAyy.mjs → Vector4-BOcWTZJI.mjs} +2 -2
- package/lib/Vector4-BOcWTZJI.mjs.map +1 -0
- package/lib/{api-Bznmr-xZ.mjs → api-ClfVJAUd.mjs} +2 -2
- package/lib/{api-Bznmr-xZ.mjs.map → api-ClfVJAUd.mjs.map} +1 -1
- package/lib/asset-loader.worker-CzI1oyTY.mjs.map +1 -1
- package/lib/{banana-for-scale-DpKXNBt_.mjs → banana-for-scale-Cf41yXTl.mjs} +3 -3
- package/lib/{banana-for-scale-DpKXNBt_.mjs.map → banana-for-scale-Cf41yXTl.mjs.map} +1 -1
- package/lib/budgeteer.sw-D80jTmYa.mjs.map +1 -1
- package/lib/{common-utils-DbL4tku0.mjs → common-utils-OTJQGohe.mjs} +3 -3
- package/lib/common-utils-OTJQGohe.mjs.map +1 -0
- package/lib/{component-dimensioning-BaUqwqYJ.mjs → component-dimensioning-yPK46Y5o.mjs} +26 -26
- package/lib/{component-dimensioning-BaUqwqYJ.mjs.map → component-dimensioning-yPK46Y5o.mjs.map} +1 -1
- package/lib/{component-raycast-helper-4i8b4E5B.mjs → component-raycast-helper-CnpnRaFg.mjs} +15 -15
- package/lib/{component-raycast-helper-4i8b4E5B.mjs.map → component-raycast-helper-CnpnRaFg.mjs.map} +1 -1
- package/lib/{configurator-CDw_c6tB.mjs → configurator-BM31Kt-5.mjs} +4 -4
- package/lib/{configurator-CDw_c6tB.mjs.map → configurator-BM31Kt-5.mjs.map} +1 -1
- package/lib/configurator-CRQg04Bp.mjs +2 -0
- package/lib/{continuous-drawing-helper-DqHIR_qF.mjs → continuous-drawing-helper-CTfGRTfH.mjs} +3 -3
- package/lib/{continuous-drawing-helper-DqHIR_qF.mjs.map → continuous-drawing-helper-CTfGRTfH.mjs.map} +1 -1
- package/lib/dimensioning-helper-CQlesi-m.mjs +2 -0
- package/lib/{dimensioning-helper-CGPjS2hW.mjs → dimensioning-helper-DSlkLDmx.mjs} +42 -36
- package/lib/dimensioning-helper-DSlkLDmx.mjs.map +1 -0
- package/lib/{glb-viewer-B-Zr743e.mjs → glb-viewer-B2si39v2.mjs} +33 -33
- package/lib/{glb-viewer-B-Zr743e.mjs.map → glb-viewer-B2si39v2.mjs.map} +1 -1
- package/lib/glb-viewer-DWybhP87.mjs +2 -0
- package/lib/{highlight-coordinator-4gkjde82.mjs → highlight-coordinator-DU6oFunq.mjs} +6 -6
- package/lib/{highlight-coordinator-4gkjde82.mjs.map → highlight-coordinator-DU6oFunq.mjs.map} +1 -1
- package/lib/{homag-intelligence-D7S7r-Gc.mjs → homag-intelligence-CSBo-iks.mjs} +3 -3
- package/lib/{homag-intelligence-D7S7r-Gc.mjs.map → homag-intelligence-CSBo-iks.mjs.map} +1 -1
- package/lib/{hosek-wilkie-sky-iMar2iw-.mjs → hosek-wilkie-sky-DmTvnxMA.mjs} +33 -33
- package/lib/{hosek-wilkie-sky-iMar2iw-.mjs.map → hosek-wilkie-sky-DmTvnxMA.mjs.map} +1 -1
- package/lib/{imos-ix-poc-export-helper-CyGqK7nu.mjs → imos-ix-poc-export-helper-BGN97m8W.mjs} +3 -3
- package/lib/{imos-ix-poc-export-helper-CyGqK7nu.mjs.map → imos-ix-poc-export-helper-BGN97m8W.mjs.map} +1 -1
- package/lib/kernel-BWfRHWkW.mjs.map +1 -1
- package/lib/{kernel-utils-BvatnA7U.mjs → kernel-utils-BYKmP0mf.mjs} +13 -13
- package/lib/{kernel-utils-BvatnA7U.mjs.map → kernel-utils-BYKmP0mf.mjs.map} +1 -1
- package/lib/{material-viewer-CTsSfTfL.mjs → material-viewer-C2Pj4-II.mjs} +18 -18
- package/lib/{material-viewer-CTsSfTfL.mjs.map → material-viewer-C2Pj4-II.mjs.map} +1 -1
- package/lib/{packages-BXAZEcKa.mjs → packages-C0xavGqP.mjs} +5 -5
- package/lib/{packages-BXAZEcKa.mjs.map → packages-C0xavGqP.mjs.map} +1 -1
- package/lib/{planner-jvLAnYww.mjs → planner-C1KkZRGk.mjs} +3 -3
- package/lib/{planner-jvLAnYww.mjs.map → planner-C1KkZRGk.mjs.map} +1 -1
- package/lib/planner-DJE5aZXG.mjs +2 -0
- package/lib/{plugin-system-CRaC04G5.mjs → plugin-system-CPf99Zkf.mjs} +2 -2
- package/lib/{plugin-system-CRaC04G5.mjs.map → plugin-system-CPf99Zkf.mjs.map} +1 -1
- package/lib/{render-cache-DCPIQbO1.mjs → render-cache-CPppt7Rd.mjs} +5 -5
- package/lib/{render-cache-DCPIQbO1.mjs.map → render-cache-CPppt7Rd.mjs.map} +1 -1
- package/lib/{render-order-BPF2wDMw.mjs → render-order-a0QAbB7Q.mjs} +2 -2
- package/lib/{render-order-BPF2wDMw.mjs.map → render-order-a0QAbB7Q.mjs.map} +1 -1
- package/lib/roomle-headless.d.ts +13 -11
- package/lib/roomle-headless.js +14 -14
- package/lib/{roomle-renderer-Ato6RMrd.mjs → roomle-renderer-UJINLYxS.mjs} +2 -2
- package/lib/{roomle-renderer-Ato6RMrd.mjs.map → roomle-renderer-UJINLYxS.mjs.map} +1 -1
- package/lib/{roomle-sdk-CBwhwX_e.mjs → roomle-sdk-BhHLCbgP.mjs} +1747 -1729
- package/lib/roomle-sdk-BhHLCbgP.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +13 -11
- package/lib/roomle-sdk.js +7 -7
- package/lib/{roomle-webgpu-renderer-BfZKcXSz.mjs → roomle-webgpu-renderer-BSvxbopA.mjs} +900 -707
- package/lib/roomle-webgpu-renderer-BSvxbopA.mjs.map +1 -0
- package/lib/{scene-renderer-BHYZac3H.mjs → scene-renderer--DzrpIl_.mjs} +309 -309
- package/lib/{scene-renderer-BHYZac3H.mjs.map → scene-renderer--DzrpIl_.mjs.map} +1 -1
- package/lib/{script-loader-CvnG6LgL.mjs → script-loader-BHniYj5b.mjs} +2 -2
- package/lib/{script-loader-CvnG6LgL.mjs.map → script-loader-BHniYj5b.mjs.map} +1 -1
- package/lib/{shading-settings-BBhR7KcS.mjs → shading-settings-6v-7O_Sz.mjs} +49 -49
- package/lib/{shading-settings-BBhR7KcS.mjs.map → shading-settings-6v-7O_Sz.mjs.map} +1 -1
- package/lib/src-6KtBPZXp.mjs +2 -0
- package/lib/{src-HhklrVDg.mjs → src-Dg0wYIom.mjs} +150 -150
- package/lib/{src-HhklrVDg.mjs.map → src-Dg0wYIom.mjs.map} +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +4 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +5 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{stats-helper-PndcZCzL.mjs → stats-helper-DYjPPDnz.mjs} +2 -2
- package/lib/{stats-helper-PndcZCzL.mjs.map → stats-helper-DYjPPDnz.mjs.map} +1 -1
- package/lib/{three.core-0KaTx8dm.mjs → three.core-BTUCraWz.mjs} +976 -884
- package/lib/three.core-BTUCraWz.mjs.map +1 -0
- package/lib/{three.module-dym6j3lO.mjs → three.module-DUSFrLM6.mjs} +1789 -1739
- package/lib/three.module-DUSFrLM6.mjs.map +1 -0
- package/lib/three.tsl-De6A-G56.mjs +158 -0
- package/lib/three.tsl-De6A-G56.mjs.map +1 -0
- package/lib/three.tsl-DtfvggFX.mjs +2 -0
- package/lib/three.webgpu-B1OhMci_.mjs +3 -0
- package/lib/{three.webgpu-D3nSEIjD.mjs → three.webgpu-wPiwbpFM.mjs} +5806 -4926
- package/lib/three.webgpu-wPiwbpFM.mjs.map +1 -0
- package/lib/{threejs-utils-v1uOvccg.mjs → threejs-utils-lVSsgAiQ.mjs} +68 -68
- package/lib/{threejs-utils-v1uOvccg.mjs.map → threejs-utils-lVSsgAiQ.mjs.map} +1 -1
- package/lib/{tools-core-B29U-88K.mjs → tools-core-QUdVgS4n.mjs} +3 -3
- package/lib/{tools-core-B29U-88K.mjs.map → tools-core-QUdVgS4n.mjs.map} +1 -1
- package/lib/{webgpu-BHAP6BLI.mjs → webgpu-BxYJfBjz.mjs} +555 -555
- package/lib/{webgpu-BHAP6BLI.mjs.map → webgpu-BxYJfBjz.mjs.map} +1 -1
- package/package.json +5 -5
- package/lib/BufferGeometry-Bl5whHAB.mjs.map +0 -1
- package/lib/GLTFExporter-yQ7mMauu.mjs.map +0 -1
- package/lib/GaussianBlurNode-DNBEf5-n.mjs +0 -59
- package/lib/GaussianBlurNode-DNBEf5-n.mjs.map +0 -1
- package/lib/Object3D-BHdngbxB.mjs.map +0 -1
- package/lib/PointLightHelper-CuPSBuDU.mjs.map +0 -1
- package/lib/SpotLightHelper-m-Rh8vGU.mjs.map +0 -1
- package/lib/USDZExporter-MdkuT226.mjs.map +0 -1
- package/lib/Vector4-C7TlIAyy.mjs.map +0 -1
- package/lib/common-utils-DbL4tku0.mjs.map +0 -1
- package/lib/configurator-BYQdWEvf.mjs +0 -2
- package/lib/dimensioning-helper-CGPjS2hW.mjs.map +0 -1
- package/lib/dimensioning-helper-VndKlIXS.mjs +0 -2
- package/lib/glb-viewer-Bd5Xn6Oq.mjs +0 -2
- package/lib/planner-DMk3T4ts.mjs +0 -2
- package/lib/roomle-sdk-CBwhwX_e.mjs.map +0 -1
- package/lib/roomle-webgpu-renderer-BfZKcXSz.mjs.map +0 -1
- package/lib/src-Bbq3Hqzn.mjs +0 -2
- package/lib/three.core-0KaTx8dm.mjs.map +0 -1
- package/lib/three.module-dym6j3lO.mjs.map +0 -1
- package/lib/three.tsl-BTc4fg8T.mjs +0 -2
- package/lib/three.tsl-Cf0-sCqB.mjs +0 -152
- package/lib/three.tsl-Cf0-sCqB.mjs.map +0 -1
- package/lib/three.webgpu-ClICiWlK.mjs +0 -3
- package/lib/three.webgpu-D3nSEIjD.mjs.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as he, t as ge } from "./shading-settings-
|
|
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 te, 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 D, 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-6v-7O_Sz.mjs";
|
|
3
3
|
import { n as _e, r as ve, t as ye } from "./decorate-Bl-JF_YY.mjs";
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { $ as Ne,
|
|
4
|
+
import { a as O, n as be, r as xe } from "./roomle-renderer-UJINLYxS.mjs";
|
|
5
|
+
import { Dt as Se, It as k, Jn as Ce, Mn as we, Q as Te, Sn as A, Vt as Ee, _r as De, mr as Oe, un as ke, vt as Ae, x as je, yn as Me } from "./three.webgpu-wPiwbpFM.mjs";
|
|
6
|
+
import { $ as Ne, B as Pe, Bt as j, C as Fe, Ct as Ie, D as M, 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 N, N as Ye, Nt as P, O as Xe, Ot as F, 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 I, W as L, 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 R, dt as _t, et as vt, f as yt, ft as bt, g as xt, ht as St, i as z, it as Ct, j as wt, k as B, kt as Tt, l as Et, m as Dt, mt as Ot, n as V, 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 H, ut as zt, v as Bt, vt as Vt, w as Ht, wt as Ut, x as Wt, xt as Gt, y as Kt, yt as qt, z as Jt, zt as U } from "./three.tsl-De6A-G56.mjs";
|
|
7
7
|
//#region ../../node_modules/three/examples/jsm/tsl/display/OutlineNode.js
|
|
8
|
-
var
|
|
8
|
+
var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE__ */ new d(1, 0), Zt = /* @__PURE__ */ new d(0, 1), G, Qt = class extends Ce {
|
|
9
9
|
static get type() {
|
|
10
10
|
return "OutlineNode";
|
|
11
11
|
}
|
|
12
12
|
constructor(e, t, n = {}) {
|
|
13
13
|
super("vec4");
|
|
14
|
-
let { selectedObjects: r = [], edgeThickness: i =
|
|
15
|
-
this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode =
|
|
14
|
+
let { selectedObjects: r = [], edgeThickness: i = B(1), edgeGlow: a = B(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 = Ee.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 = 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 k(), this._depthMaterial.colorNode = Bt(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new we(), this._depthSpriteMaterial.colorNode = Bt(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new k(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new we(), 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);
|
|
16
16
|
}
|
|
17
17
|
get visibleEdge() {
|
|
18
18
|
return this.r;
|
|
@@ -31,11 +31,11 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
31
31
|
updateBefore(e) {
|
|
32
32
|
let { renderer: t } = e, { camera: n, scene: r } = this;
|
|
33
33
|
if (this._updateSelectionCache(), this._selectionCache.size === 0) {
|
|
34
|
-
this._lastSelectionCount > 0 && (
|
|
34
|
+
this._lastSelectionCount > 0 && (G = A.resetRendererState(t, G), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), A.restoreRendererState(t, G), this._lastSelectionCount = 0);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
this._lastSelectionCount = this._selectionCache.size,
|
|
38
|
-
let i = t.getDrawingBufferSize(
|
|
37
|
+
this._lastSelectionCount = this._selectionCache.size, G = A.resetRendererAndSceneState(t, r, G);
|
|
38
|
+
let i = t.getDrawingBufferSize(Yt);
|
|
39
39
|
this.setSize(i.width, i.height), t.setClearColor(16777215, 1);
|
|
40
40
|
let a = r.name;
|
|
41
41
|
t.setRenderTarget(this._renderTargetDepthBuffer), t.setRenderObjectFunction((e, n, r, i, a, o, s, c) => {
|
|
@@ -48,120 +48,116 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
48
48
|
let a = e.isSprite ? this._prepareMaskSpriteMaterial : this._prepareMaskMaterial;
|
|
49
49
|
t.renderObject(e, n, r, i, a, o, s, c);
|
|
50
50
|
}
|
|
51
|
-
}), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(
|
|
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(Xt), W.material = this._separableBlurMaterial, W.name = "Outline [ Blur Half Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer1.texture, this._blurDirection.value.copy(Zt), t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Xt), W.material = this._separableBlurMaterial2, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer2), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer2.texture, this._blurDirection.value.copy(Zt), t.setRenderTarget(this._renderTargetEdgeBuffer2), W.render(t), W.material = this._compositeMaterial, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), W.render(t), A.restoreRendererAndSceneState(t, r, G);
|
|
52
52
|
}
|
|
53
53
|
setup() {
|
|
54
54
|
let e = () => {
|
|
55
|
-
let e = this._depthTextureUniform.sample(
|
|
56
|
-
return t = this.camera.isPerspectiveCamera ?
|
|
55
|
+
let e = this._depthTextureUniform.sample(Vt), t;
|
|
56
|
+
return t = this.camera.isPerspectiveCamera ? ft(e, this._cameraNear, this._cameraFar) : Ne(e, this._cameraNear, this._cameraFar), j(0, jt.z.lessThanEqual(t).select(1, 0), 1);
|
|
57
57
|
};
|
|
58
58
|
this._prepareMaskMaterial.colorNode = e(), this._prepareMaskMaterial.needsUpdate = !0, this._prepareMaskSpriteMaterial.colorNode = e(), this._prepareMaskSpriteMaterial.needsUpdate = !0, this._materialCopy.fragmentNode = this._maskTextureUniform, this._materialCopy.needsUpdate = !0;
|
|
59
|
-
let t =
|
|
60
|
-
let e =
|
|
61
|
-
return
|
|
59
|
+
let t = V(() => {
|
|
60
|
+
let e = Tt(this._maskTextureDownsSampleUniform), t = U(1).div(e).toVar(), n = I(1, 0, 0, 1).mul(I(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 I(Ve(Ve(i.g, a.g), Ve(o.g, s.g)).oneMinus().greaterThan(.001).select(this._visibleEdgeColor, this._hiddenEdgeColor), 1).mul(c);
|
|
62
62
|
});
|
|
63
63
|
this._edgeDetectionMaterial.fragmentNode = t(), this._edgeDetectionMaterial.needsUpdate = !0;
|
|
64
|
-
let n =
|
|
65
|
-
let t =
|
|
66
|
-
return
|
|
67
|
-
start:
|
|
68
|
-
end:
|
|
64
|
+
let n = V(([e, t]) => B(.39894).mul(Xe(B(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = V(([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),
|
|
69
69
|
type: "int",
|
|
70
70
|
condition: "<="
|
|
71
71
|
}, ({ i: t }) => {
|
|
72
|
-
let r = n(e.mul(
|
|
72
|
+
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
73
|
s.addAssign(u.add(d).mul(r)), o.addAssign(r.mul(2)), l.addAssign(c);
|
|
74
74
|
}), s.div(o);
|
|
75
75
|
});
|
|
76
76
|
this._separableBlurMaterial.fragmentNode = r(this.edgeThicknessNode), this._separableBlurMaterial.needsUpdate = !0, this._separableBlurMaterial2.fragmentNode = r(4), this._separableBlurMaterial2.needsUpdate = !0;
|
|
77
|
-
let i =
|
|
77
|
+
let i = V(() => {
|
|
78
78
|
let e = this._edge1TextureUniform, t = this._edge2TextureUniform, n = this._maskTextureUniform, r = e.add(t.mul(this.edgeGlowNode));
|
|
79
79
|
return n.r.mul(r);
|
|
80
80
|
});
|
|
81
81
|
return this._compositeMaterial.fragmentNode = i(), this._compositeMaterial.needsUpdate = !0, this._textureNode;
|
|
82
82
|
}
|
|
83
83
|
dispose() {
|
|
84
|
-
this.selectedObjects.length = 0, this._renderTargetDepthBuffer.dispose(), this._renderTargetMaskBuffer.dispose(), this._renderTargetMaskDownSampleBuffer.dispose(), this._renderTargetEdgeBuffer1.dispose(), this._renderTargetEdgeBuffer2.dispose(), this._renderTargetBlurBuffer1.dispose(), this._renderTargetBlurBuffer2.dispose(), this._renderTargetComposite.dispose(), this._depthMaterial.dispose(), this._depthSpriteMaterial.dispose(), this._prepareMaskMaterial.dispose(), this._prepareMaskSpriteMaterial.dispose(), this._materialCopy.dispose(), this._edgeDetectionMaterial.dispose(), this._separableBlurMaterial.dispose(), this._separableBlurMaterial2.dispose(), this._compositeMaterial.dispose();
|
|
84
|
+
super.dispose(), this.selectedObjects.length = 0, this._renderTargetDepthBuffer.dispose(), this._renderTargetMaskBuffer.dispose(), this._renderTargetMaskDownSampleBuffer.dispose(), this._renderTargetEdgeBuffer1.dispose(), this._renderTargetEdgeBuffer2.dispose(), this._renderTargetBlurBuffer1.dispose(), this._renderTargetBlurBuffer2.dispose(), this._renderTargetComposite.dispose(), this._depthMaterial.dispose(), this._depthSpriteMaterial.dispose(), this._prepareMaskMaterial.dispose(), this._prepareMaskSpriteMaterial.dispose(), this._materialCopy.dispose(), this._edgeDetectionMaterial.dispose(), this._separableBlurMaterial.dispose(), this._separableBlurMaterial2.dispose(), this._compositeMaterial.dispose();
|
|
85
85
|
}
|
|
86
86
|
_updateSelectionCache() {
|
|
87
87
|
for (let e = 0; e < this.selectedObjects.length; e++) this.selectedObjects[e].traverse((e) => {
|
|
88
88
|
(e.isMesh || e.isSprite) && this._selectionCache.add(e);
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
},
|
|
91
|
+
}, $t = (e, t, n) => new Qt(e, t, n), en = class {}, tn = class e extends en {
|
|
92
92
|
static {
|
|
93
93
|
this.passId = "OutlineRenderPass";
|
|
94
94
|
}
|
|
95
95
|
constructor(t) {
|
|
96
|
-
super(), this.passId = e.passId, this.selectedObjects = t.selectedObjects, this.edgeStrength =
|
|
96
|
+
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 D(t.visibleEdgeColor)), this.hiddenEdgeColor = P(new D(t.hiddenEdgeColor));
|
|
97
97
|
}
|
|
98
98
|
highlightObjects(e) {
|
|
99
99
|
this.selectedObjects.splice(0, this.selectedObjects.length, ...e);
|
|
100
100
|
}
|
|
101
101
|
setOutlineColors(e, t) {
|
|
102
|
-
this.visibleEdgeColor.value = new
|
|
102
|
+
this.visibleEdgeColor.value = new D(e), this.hiddenEdgeColor.value = new D(t);
|
|
103
103
|
}
|
|
104
104
|
assemble(e, t, n, r, i) {
|
|
105
|
-
let { visibleEdge: a, hiddenEdge: o } =
|
|
105
|
+
let { visibleEdge: a, hiddenEdge: o } = $t(n, r, {
|
|
106
106
|
selectedObjects: this.selectedObjects,
|
|
107
107
|
edgeThickness: this.edgeThickness,
|
|
108
108
|
edgeGlow: this.edgeGlow
|
|
109
|
-
}), s =
|
|
110
|
-
return i === "outline" ?
|
|
111
|
-
}
|
|
112
|
-
addParametersToGUI(e,
|
|
113
|
-
let
|
|
114
|
-
|
|
115
|
-
this.visibleEdgeColor.value.set(e),
|
|
116
|
-
}),
|
|
117
|
-
this.hiddenEdgeColor.value.set(e),
|
|
109
|
+
}), s = I(a.mul(this.visibleEdgeColor).add(o.mul(this.hiddenEdgeColor)).mul(this.edgeStrength), 0);
|
|
110
|
+
return i === "outline" ? I(0, 0, 0, 0).add(s) : t.add(s);
|
|
111
|
+
}
|
|
112
|
+
addParametersToGUI(e, t) {
|
|
113
|
+
let n = e.addFolder("Outline Settings");
|
|
114
|
+
n.add(this.edgeStrength, "value", .01, 10).name("edgeStrength").onChange(() => t()), n.add(this.edgeGlow, "value", 0, 1).name("edgeGlow").onChange(() => t()), n.add(this.edgeThickness, "value", 1, 4).name("edgeThickness").onChange(() => t()), n.addColor({ color: this.visibleEdgeColor.value.getHex(a) }, "color").name("visibleEdgeColor").onChange((e) => {
|
|
115
|
+
this.visibleEdgeColor.value.set(e), t();
|
|
116
|
+
}), n.addColor({ color: this.hiddenEdgeColor.value.getHex(a) }, "color").name("hiddenEdgeColor").onChange((e) => {
|
|
117
|
+
this.hiddenEdgeColor.value.set(e), t();
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, nn = class {
|
|
121
121
|
constructor(e, t) {
|
|
122
122
|
this.uid = e, this.cid = e.match(/^(.*):f(\d+)$/)[1], this.name = t, this.timestamp = 0, this.cpu = 0, this.gpu = 0, this.fps = 0, this.children = [], this.parent = null;
|
|
123
123
|
}
|
|
124
|
-
},
|
|
124
|
+
}, rn = class extends nn {
|
|
125
125
|
constructor(e, t, n, r) {
|
|
126
126
|
let i = t.name;
|
|
127
127
|
i === "" && (t.isScene ? i = "Scene" : t.isQuadMesh && (i = "QuadMesh")), super(e, i), this.scene = t, this.camera = n, this.renderTarget = r, this.isRenderStats = !0;
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, an = class extends nn {
|
|
130
130
|
constructor(e, t) {
|
|
131
|
-
|
|
131
|
+
let n = t.name || (t.isComputeNode ? "Compute" : "Compute Group");
|
|
132
|
+
super(e, n), this.computeNode = t, this.isComputeStats = !0;
|
|
132
133
|
}
|
|
133
|
-
},
|
|
134
|
+
}, on = class extends Te {
|
|
134
135
|
constructor() {
|
|
135
|
-
super(), this.currentFrame = null, this.currentRender = null, this.currentNodes = null, this.lastFrame = null, this.frames = [], this.framesLib = {}, this.maxFrames = 512, this._lastFinishTime = 0, this._resolveTimestampPromise = null, this.overdraw = !1, this._overdrawMaterial = null, this.isRendererInspector = !0;
|
|
136
|
+
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;
|
|
136
137
|
}
|
|
137
138
|
getParent() {
|
|
138
|
-
return this.
|
|
139
|
+
return this.currentContext || this.getFrame();
|
|
139
140
|
}
|
|
140
141
|
begin() {
|
|
141
|
-
this.currentFrame = this._createFrame(), this.
|
|
142
|
+
super.begin(), this.currentFrame = this._createFrame(), this.currentContext = this.currentFrame, this.currentRender = null, this.currentCompute = null, this.currentNodes = [];
|
|
142
143
|
}
|
|
143
144
|
finish() {
|
|
145
|
+
super.finish();
|
|
144
146
|
let e = performance.now(), t = this.currentFrame;
|
|
145
|
-
t.finishTime = e, t.deltaTime = e - (this._lastFinishTime > 0 ? this._lastFinishTime : e), this.addFrame(t), this.fps = this._getFPS(), this.lastFrame = t, this.currentFrame = null, this.currentRender = null, this.currentNodes = null, this._lastFinishTime = e, this.overdraw === !0 && this._renderOverdraw(
|
|
147
|
+
t.finishTime = e, t.deltaTime = e - (this._lastFinishTime > 0 ? this._lastFinishTime : e), this.addFrame(t), this.fps = this._getFPS(), this.lastFrame = t, this.currentFrame = null, this.currentContext = null, this.currentRender = null, this.currentCompute = null, this.currentNodes = null, this._lastFinishTime = e, this.overdraw === !0 && this._renderOverdraw();
|
|
146
148
|
}
|
|
147
|
-
_renderOverdraw(
|
|
148
|
-
let t = this.
|
|
149
|
+
_renderOverdraw() {
|
|
150
|
+
let t = this.getPrimaryPass();
|
|
149
151
|
if (t === null) return;
|
|
150
|
-
let n =
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
break;
|
|
154
|
-
}
|
|
155
|
-
if (n === null) return;
|
|
156
|
-
this._overdrawMaterial === null && (this._overdrawMaterial = new je({
|
|
157
|
-
colorNode: N(.25),
|
|
152
|
+
let n = this.getRenderer();
|
|
153
|
+
this._overdrawMaterial === null && (this._overdrawMaterial = new Ae({
|
|
154
|
+
colorNode: j(.25),
|
|
158
155
|
blending: 2,
|
|
159
156
|
depthTest: !0,
|
|
160
|
-
depthWrite: !0
|
|
161
|
-
toneMapped: !1
|
|
157
|
+
depthWrite: !0
|
|
162
158
|
}));
|
|
163
|
-
let { scene: r, camera: i } =
|
|
164
|
-
|
|
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);
|
|
165
161
|
}
|
|
166
162
|
_getFPS() {
|
|
167
163
|
let e = 0, t = 0;
|
|
@@ -185,6 +181,14 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
185
181
|
computes: []
|
|
186
182
|
};
|
|
187
183
|
}
|
|
184
|
+
getPrimaryPass() {
|
|
185
|
+
let e = this.getFrame(), t = null;
|
|
186
|
+
for (let n of e.renders) if (n.scene.isScene === !0) {
|
|
187
|
+
t = n;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
return t;
|
|
191
|
+
}
|
|
188
192
|
getFrame() {
|
|
189
193
|
return this.currentFrame || this.lastFrame;
|
|
190
194
|
}
|
|
@@ -195,30 +199,38 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
195
199
|
resolveFrame() {}
|
|
196
200
|
async resolveTimestamp() {
|
|
197
201
|
return this._resolveTimestampPromise === null && (this._resolveTimestampPromise = new Promise((e) => {
|
|
198
|
-
requestAnimationFrame(async () => {
|
|
202
|
+
this._rAFId = requestAnimationFrame(async () => {
|
|
203
|
+
this._rAFId = null;
|
|
199
204
|
let t = this.getRenderer();
|
|
205
|
+
if (t === null) {
|
|
206
|
+
this._resolveTimestampPromise = null, e();
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
200
209
|
if (t.backend.hasTimestamp) {
|
|
201
|
-
await t.resolveTimestampsAsync(
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
if (await t.resolveTimestampsAsync(C.COMPUTE), await t.resolveTimestampsAsync(C.RENDER), t !== this.getRenderer()) {
|
|
211
|
+
this._resolveTimestampPromise = null, e();
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
let n = t.backend.getTimestampFrames(C.COMPUTE), r = t.backend.getTimestampFrames(C.RENDER), i = [...new Set([...n, ...r])];
|
|
215
|
+
for (let e of i) {
|
|
216
|
+
let i = this.getFrameById(e);
|
|
217
|
+
if (i !== null) {
|
|
218
|
+
if (i.resolvedCompute === !1) if (i.computes.length > 0) {
|
|
219
|
+
if (n.includes(e)) {
|
|
220
|
+
for (let e of i.computes) t.backend.hasTimestampQuery(e.uid) ? e.gpu = t.backend.getTimestamp(e.uid) : (e.gpu = 0, e.gpuNotAvailable = !0);
|
|
221
|
+
i.resolvedCompute = !0;
|
|
210
222
|
}
|
|
211
|
-
} else
|
|
212
|
-
if (
|
|
213
|
-
if (
|
|
214
|
-
for (let e of
|
|
215
|
-
|
|
223
|
+
} else i.resolvedCompute = !0;
|
|
224
|
+
if (i.resolvedRender === !1) if (i.renders.length > 0) {
|
|
225
|
+
if (r.includes(e)) {
|
|
226
|
+
for (let e of i.renders) t.backend.hasTimestampQuery(e.uid) ? e.gpu = t.backend.getTimestamp(e.uid) : (e.gpu = 0, e.gpuNotAvailable = !0);
|
|
227
|
+
i.resolvedRender = !0;
|
|
216
228
|
}
|
|
217
|
-
} else
|
|
218
|
-
|
|
229
|
+
} else i.resolvedRender = !0;
|
|
230
|
+
i.resolvedCompute === !0 && i.resolvedRender === !0 && this.resolveFrame(i);
|
|
219
231
|
}
|
|
220
232
|
}
|
|
221
|
-
} else for (let e of this.frames) if (!(e.resolvedCompute === !0 && e.resolvedRender === !0) && this.getFrameById(e.frameId
|
|
233
|
+
} else for (let e of this.frames) if (!(e.resolvedCompute === !0 && e.resolvedRender === !0) && this.getFrameById(e.frameId - 1) !== null) {
|
|
222
234
|
if (e.resolvedCompute === !1) {
|
|
223
235
|
for (let t of e.computes) t.gpu = 0, t.gpuNotAvailable = !0;
|
|
224
236
|
e.resolvedCompute = !0;
|
|
@@ -244,37 +256,41 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
244
256
|
this.frames.push(e), this.framesLib[e.frameId] = e, this.isAvailable && (this.updateTabs(), this.resolveTimestamp());
|
|
245
257
|
}
|
|
246
258
|
inspect(e) {
|
|
259
|
+
if (this.enabled === !1) return;
|
|
247
260
|
let t = this.currentNodes;
|
|
248
|
-
t === null ?
|
|
261
|
+
t === null ? v("RendererInspector: Unable to inspect node outside of frame scope. Use \"renderer.setAnimationLoop()\".") : t.push(e);
|
|
249
262
|
}
|
|
250
263
|
beginCompute(e, t) {
|
|
251
264
|
let n = this.getFrame();
|
|
252
265
|
if (!n) return;
|
|
253
|
-
let r = new
|
|
254
|
-
r.timestamp = performance.now(), r.parent = this.
|
|
266
|
+
let r = new an(e, t);
|
|
267
|
+
r.timestamp = performance.now(), r.parent = this.getParent(), n.computes.push(r), r.parent.children.push(r), this.currentCompute = r, this.currentContext = r;
|
|
255
268
|
}
|
|
256
269
|
finishCompute() {
|
|
257
270
|
if (!this.getFrame()) return;
|
|
258
271
|
let e = this.currentCompute;
|
|
259
|
-
e.cpu = performance.now() - e.timestamp, this.currentCompute = e.parent.isComputeStats ? e.parent : null;
|
|
272
|
+
e.cpu = performance.now() - e.timestamp, this.currentContext = e.parent, this.currentCompute = e.parent && e.parent.isComputeStats ? e.parent : null;
|
|
260
273
|
}
|
|
261
274
|
beginRender(e, t, n, r) {
|
|
262
275
|
let i = this.getFrame();
|
|
263
276
|
if (!i) return;
|
|
264
|
-
let a = new
|
|
265
|
-
a.timestamp = performance.now(), a.parent = this.getParent(), i.renders.push(a),
|
|
277
|
+
let a = new rn(e, t, n, r);
|
|
278
|
+
a.timestamp = performance.now(), a.parent = this.getParent(), i.renders.push(a), a.parent.children.push(a), this.currentRender = a, this.currentContext = a;
|
|
266
279
|
}
|
|
267
280
|
finishRender() {
|
|
268
281
|
if (!this.getFrame()) return;
|
|
269
282
|
let e = this.currentRender;
|
|
270
|
-
e.cpu = performance.now() - e.timestamp, this.currentRender = e.parent;
|
|
283
|
+
e.cpu = performance.now() - e.timestamp, this.currentContext = e.parent, this.currentRender = e.parent && e.parent.isRenderStats ? e.parent : null;
|
|
271
284
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
let t = document.createElement("style");
|
|
275
|
-
t.textContent = "\n@scope (.three-inspector) {\n\n :scope {\n --profiler-background: #1e1e24f5;\n --profiler-header-background: #2a2a33aa;\n --profiler-header: #2a2a33;\n --profiler-border: #4a4a5a;\n --text-primary: #e0e0e0;\n --text-secondary: #9a9aab;\n --color-accent: #00aaff;\n --color-green: #4caf50;\n --color-yellow: #ffc107;\n --color-red: #f44336;\n --color-fps: rgb(63, 81, 181);\n --color-call: rgba(255, 185, 34, 1);\n --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n --font-mono: 'Courier New', Courier, monospace;\n }\n\n .profiler-panel, .profiler-toggle, .detached-tab-panel,\n .profiler-panel *, .profiler-toggle *, .detached-tab-panel * {\n text-transform: initial;\n line-height: normal;\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n }\n\n .profiler-toggle {\n position: fixed;\n top: 15px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 12px 6px 6px 12px;\n color: var(--text-primary);\n cursor: pointer;\n z-index: 1001;\n transition: all 0.2s ease-in-out;\n /*font-size: 14px;*/\n font-size: 15px;\n backdrop-filter: blur(8px);\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);\n display: flex;\n align-items: stretch;\n padding: 0;\n overflow: hidden;\n font-family: var(--font-family);\n }\n\n .profiler-toggle-graph {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 0;\n pointer-events: none;\n background: transparent;\n border: none;\n border-radius: inherit;\n opacity: 0.5;\n }\n\n .profiler-toggle.position-right.panel-open {\n right: auto;\n left: 15px;\n border-radius: 6px 12px 12px 6px;\n flex-direction: row-reverse;\n }\n\n .profiler-toggle.position-right.panel-open .builtin-tabs-container {\n border-right: none;\n border-left: 1px solid #262636;\n }\n\n .profiler-toggle:hover {\n border-color: var(--color-accent);\n }\n\n .profiler-toggle.panel-open .toggle-icon {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .toggle-icon {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n font-size: 20px;\n transition: background-color 0.2s;\n }\n\n .console-badge-container {\n position: absolute;\n top: 2px;\n right: 2px;\n display: flex;\n gap: 2px;\n pointer-events: none;\n }\n\n .console-badge,\n .tab-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 14px;\n height: 14px;\n padding: 0 4px;\n border-radius: 7px;\n font-size: 9px;\n font-weight: bold;\n color: #ffffff;\n line-height: 1;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n\n .tab-badge-container {\n position: absolute;\n top: 1px;\n right: 3px;\n display: flex;\n gap: 2px;\n pointer-events: none;\n }\n\n .console-badge.error,\n .tab-badge.error {\n background-color: var(--color-red);\n }\n\n .console-badge.warn,\n .tab-badge.warn {\n background-color: var(--color-yellow);\n color: #111111;\n }\n\n .profiler-toggle:hover .toggle-icon {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .profiler-toggle.panel-open:hover .toggle-icon {\n background-color: rgba(0, 170, 255, 0.3);\n }\n\n .toggle-separator {\n width: 1px;\n background-color: var(--profiler-border);\n }\n\n .toggle-text {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: baseline;\n padding: 8px 14px;\n min-width: 80px;\n justify-content: right;\n }\n\n .toggle-text .fps-label {\n font-size: 0.7em;\n margin-left: 10px;\n color: #999;\n }\n\n .builtin-tabs-container {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: stretch;\n gap: 0;\n border-right: 1px solid #262636;\n order: -1;\n }\n\n .builtin-tab-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 8px 14px;\n font-family: var(--font-family);\n font-size: 13px;\n font-weight: 600;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 32px;\n position: relative;\n }\n\n .builtin-tab-btn svg {\n width: 20px;\n height: 20px;\n stroke: currentColor;\n }\n\n .builtin-tab-btn:hover {\n background-color: rgba(255, 255, 255, 0.08);\n color: var(--color-accent);\n }\n\n .builtin-tab-btn:active {\n background-color: rgba(255, 255, 255, 0.12);\n }\n\n .builtin-tab-btn.active {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .builtin-tab-btn.active:hover {\n background-color: rgba(0, 170, 255, 0.3);\n }\n\n .profiler-mini-panel {\n position: fixed;\n top: 60px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 8px;\n color: var(--text-primary);\n z-index: 9999;\n backdrop-filter: blur(8px);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);\n font-family: var(--font-family);\n font-size: 11px;\n width: 350px;\n max-width: calc(100vw - 30px);\n min-width: 170px;\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n overflow-x: hidden;\n display: none;\n opacity: 0;\n transform: translateY(-10px) scale(0.98);\n transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), \n transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .profiler-mini-panel.position-right.panel-open {\n right: auto;\n left: 15px;\n }\n\n .profiler-mini-panel.visible {\n display: block;\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n\n /* Position toggle and mini-panel at the bottom when maximized */\n :scope:has(.profiler-panel.maximized) .profiler-toggle,\n :scope.maximized .profiler-toggle {\n top: auto !important;\n bottom: 15px !important;\n z-index: 10005 !important;\n }\n\n :scope:has(.profiler-panel.maximized) .profiler-mini-panel,\n :scope.maximized .profiler-mini-panel {\n top: auto !important;\n bottom: 60px !important;\n max-height: calc(100vh - 120px) !important;\n z-index: 10006 !important;\n }\n\n .profiler-mini-panel::-webkit-scrollbar {\n width: 6px;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.15);\n border-radius: 3px;\n transition: background 0.2s;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.25);\n }\n\n .mini-panel-content {\n padding: 0;\n font-size: 11px;\n line-height: 1.5;\n font-family: var(--font-mono);\n letter-spacing: 0.3px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .mini-panel-content .profiler-content {\n display: block !important;\n background: transparent;\n }\n\n .mini-panel-content .list-scroll-wrapper {\n max-height: calc(100vh - 120px);\n overflow-y: auto;\n overflow-x: hidden;\n width: 100%;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.1);\n border-radius: 2px;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.2);\n }\n\n .mini-panel-content .parameters {\n background: transparent;\n border: none;\n box-shadow: none;\n padding: 4px;\n }\n\n @media screen and (max-width: 340px) {\n\n .mini-panel-content .parameters {\n min-width: 0 !important;\n }\n\n .mini-panel-content .list-container.parameters .list-item-row,\n .mini-panel-content .list-container.parameters .list-header {\n grid-template-columns: minmax(0, .5fr) minmax(0, 1fr) !important;\n }\n\n }\n\n .mini-panel-content .list-container.parameters {\n padding: 2px 6px 0px 6px !important;\n }\n\n .mini-panel-content .list-header {\n display: none;\n padding: 2px 4px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n\n .mini-panel-content .list-item {\n border-bottom: 1px solid rgba(74, 74, 90, 0.2);\n transition: background-color 0.15s;\n }\n\n .mini-panel-content .list-item:last-child {\n border-bottom: none;\n }\n\n .mini-panel-content .list-item:hover {\n background-color: rgba(255, 255, 255, 0.04);\n }\n\n .mini-panel-content .list-item.actionable:hover {\n background-color: rgba(255, 255, 255, 0.06);\n cursor: pointer;\n }\n\n .info-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-secondary);\n font-size: 10px;\n font-style: italic;\n margin-left: 6px;\n cursor: help;\n position: relative;\n }\n\n .info-icon.active {\n background-color: var(--color-accent);\n color: white;\n }\n\n @media (hover: hover) {\n .info-icon:hover {\n background-color: var(--color-accent);\n color: white;\n }\n }\n\n .info-tooltip {\n position: fixed;\n transform: translate(-50%, -100%);\n background-color: rgba(30, 30, 36, 0.95);\n border: 1px solid var(--profiler-border);\n border-radius: 6px;\n padding: 10px 14px;\n color: var(--text-primary);\n font-size: 12px;\n width: max-content;\n max-width: 250px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s, visibility 0.2s;\n z-index: 999999;\n font-style: normal;\n font-family: var(--font-family);\n text-align: left;\n white-space: normal;\n }\n\n .info-tooltip h3 {\n margin: 0 0 6px 0;\n font-size: 13px;\n color: var(--color-accent);\n }\n\n .info-tooltip strong {\n font-weight: 600;\n color: white;\n }\n\n /* Style adjustments for lil-gui look */\n .mini-panel-content .item-row {\n padding: 3px 8px;\n min-height: 24px;\n }\n\n .mini-panel-content .list-item-row {\n padding: 1px 4px;\n gap: 8px;\n min-height: 21px;\n align-items: center;\n }\n\n .mini-panel-content input[type=\"checkbox\"] {\n width: 12px;\n height: 12px;\n }\n\n .mini-panel-content input[type=\"range\"] {\n height: 18px;\n }\n\n .mini-panel-content .value-number input,\n .mini-panel-content .value-slider input {\n background-color: rgba(0, 0, 0, 0.3);\n border: 1px solid rgba(74, 74, 90, 0.5);\n font-size: 10px;\n }\n\n .mini-panel-content .value-number input:focus,\n .mini-panel-content .value-slider input:focus {\n border-color: var(--color-accent);\n }\n\n .mini-panel-content .value-slider {\n gap: 6px;\n }\n\n /* Compact nested items */\n .mini-panel-content .list-item .list-item {\n margin-left: 8px;\n }\n\n .mini-panel-content .list-item .list-item .item-row,\n .mini-panel-content .list-item .list-item .list-item-row {\n padding: 2px 6px;\n min-height: 22px;\n }\n\n /* Compact collapsible headers */\n .mini-panel-content .collapsible .item-row,\n .mini-panel-content .list-item-row.collapsible {\n padding: 2px 8px;\n font-weight: 600;\n min-height: 16px;\n display: flex;\n align-items: center;\n line-height: 1;\n }\n\n .mini-panel-content .collapsible-icon {\n font-size: 10px;\n width: 14px;\n height: 14px;\n }\n\n .mini-panel-content .param-control input[type=\"range\"] {\n height: 12px;\n margin-top: 1px;\n padding-top: 5px;\n user-select: none;\n -webkit-user-select: none;\n outline: none;\n }\n\n .mini-panel-content .param-control input[type=\"range\"]::-webkit-slider-thumb {\n width: 14px;\n height: 14px;\n margin-top: -5px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .mini-panel-content .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 14px;\n height: 14px;\n user-select: none;\n -moz-user-select: none;\n }\n\n .mini-panel-content .list-children-container {\n padding-left: 0;\n }\n\n .mini-panel-content .param-control input[type=\"number\"] {\n flex-basis: 60px !important;\n }\n\n .mini-panel-content .param-control {\n align-items: center;\n }\n\n .mini-panel-content .param-control select {\n font-size: 11px;\n }\n\n .mini-panel-content .list-item-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .profiler-panel {\n position: fixed;\n z-index: 1001 !important;\n bottom: 0;\n left: 0;\n right: 0;\n height: 350px;\n background-color: var(--profiler-background);\n backdrop-filter: blur(8px);\n border-top: 2px solid var(--profiler-border);\n color: var(--text-primary);\n display: flex;\n flex-direction: column;\n z-index: 1000;\n /*box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);*/\n transform: translateY(100%);\n transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.3s ease-out, width 0.3s ease-out;\n font-family: var(--font-mono);\n }\n\n .profiler-panel.resizing,\n .profiler-panel.dragging {\n transition: none;\n }\n\n .profiler-panel.visible {\n transform: translateY(0);\n }\n\n .profiler-panel.maximized {\n height: 100vh;\n }\n\n /* Position-specific styles */\n .profiler-panel.position-top {\n bottom: auto;\n top: 0;\n border-top: none;\n border-bottom: 2px solid var(--profiler-border);\n transform: translateY(-100%);\n }\n\n .profiler-panel.position-top.visible {\n transform: translateY(0);\n }\n\n .profiler-panel.position-bottom {\n /* Default position - already defined above */\n }\n\n .profiler-panel.position-left {\n top: 0;\n bottom: 0;\n left: 0;\n right: auto;\n width: 350px;\n height: 100%;\n border-top: none;\n border-right: 2px solid var(--profiler-border);\n transform: translateX(-100%);\n }\n\n .profiler-panel.position-left.visible {\n transform: translateX(0);\n }\n\n .profiler-panel.position-right {\n top: 0;\n bottom: 0;\n left: auto;\n right: 0;\n width: 350px;\n height: 100%;\n border-top: none;\n border-left: 2px solid var(--profiler-border);\n transform: translateX(100%);\n }\n\n .profiler-panel.position-right.visible {\n transform: translateX(0);\n }\n\n .profiler-panel.position-floating {\n border: 2px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);\n transform: none !important;\n overflow: hidden;\n }\n\n .profiler-panel.position-floating.visible {\n transform: none !important;\n }\n\n .profiler-panel.position-floating .profiler-header {\n border-radius: 6px 6px 0 0;\n }\n\n .profiler-panel.position-floating .panel-resizer {\n bottom: 0;\n right: 0;\n top: auto;\n left: auto;\n width: 16px;\n height: 16px;\n cursor: nwse-resize;\n border-radius: 0 0 6px 0;\n }\n\n .profiler-panel.position-floating .panel-resizer::after {\n content: '';\n position: absolute;\n right: 2px;\n bottom: 2px;\n width: 10px;\n height: 10px;\n background: linear-gradient(135deg, transparent 0%, transparent 45%, var(--profiler-border) 45%, var(--profiler-border) 55%, transparent 55%);\n }\n\n\n .panel-resizer {\n position: absolute;\n top: -2px;\n left: 0;\n width: 100%;\n height: 5px;\n cursor: ns-resize;\n z-index: 1001;\n touch-action: none;\n }\n\n .profiler-panel.position-top .panel-resizer {\n top: auto;\n bottom: -2px;\n }\n\n .profiler-panel.position-left .panel-resizer {\n top: 0;\n left: auto;\n right: -2px;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n }\n\n .profiler-panel.position-right .panel-resizer {\n top: 0;\n left: -2px;\n right: auto;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n }\n\n .profiler-header {\n display: flex;\n background-color: var(--profiler-header-background);\n border-bottom: 1px solid var(--profiler-border);\n flex-shrink: 0;\n justify-content: space-between;\n align-items: stretch;\n\n overflow-x: auto;\n overflow-y: hidden;\n width: calc(100% - 120px);\n height: 32px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .profiler-panel.has-horizontal-scroll .profiler-header {\n height: 38px;\n }\n\n /* Adjust header width based on panel position */\n .profiler-panel.position-right .profiler-header,\n .profiler-panel.position-left .profiler-header {\n width: calc(100% - 120px);\n }\n\n .profiler-panel.position-bottom .profiler-header,\n .profiler-panel.position-top .profiler-header {\n width: calc(100% - 120px);\n }\n\n /* Adjust header width when position toggle button is hidden (mobile) */\n .profiler-panel.hide-position-toggle .profiler-header {\n width: calc(100% - 80px);\n }\n\n /* Adjust header width when maximized (floating position toggle button is hidden) */\n .profiler-panel.maximized .profiler-header {\n width: calc(100% - 80px);\n }\n\n /* ===== RULES FOR WHEN THERE ARE NO TABS ===== */\n\n /* Horizontal mode (bottom/top) without tabs */\n .profiler-panel.position-bottom.no-tabs:not(.maximized),\n .profiler-panel.position-top.no-tabs:not(.maximized) {\n height: 32px !important;\n min-height: 32px !important;\n }\n\n .profiler-panel.position-bottom.no-tabs .profiler-header,\n .profiler-panel.position-top.no-tabs .profiler-header {\n width: 100%;\n height: 32px;\n border-bottom: none;\n }\n\n .profiler-panel.position-bottom.no-tabs .profiler-content-wrapper,\n .profiler-panel.position-top.no-tabs .profiler-content-wrapper {\n display: none;\n }\n\n .profiler-panel.position-bottom.no-tabs .panel-resizer,\n .profiler-panel.position-top.no-tabs .panel-resizer {\n display: none;\n }\n\n /* Vertical mode (right/left) without tabs */\n .profiler-panel.position-right.no-tabs:not(.maximized),\n .profiler-panel.position-left.no-tabs:not(.maximized) {\n width: 40px !important;\n min-width: 40px !important;\n }\n\n /* Vertical layout for header when no tabs */\n .profiler-panel.position-right.no-tabs .profiler-header,\n .profiler-panel.position-left.no-tabs .profiler-header {\n width: 100%;\n flex-direction: column;\n height: 100%;\n border-bottom: none;\n }\n\n /* Vertical layout for controls when no tabs */\n .profiler-panel.position-right.no-tabs .profiler-controls,\n .profiler-panel.position-left.no-tabs .profiler-controls {\n position: static;\n flex-direction: column-reverse;\n justify-content: flex-end;\n width: 100%;\n height: 100%;\n border-bottom: none;\n border-left: none;\n background: transparent;\n }\n\n .profiler-panel.position-right.no-tabs .profiler-controls button,\n .profiler-panel.position-left.no-tabs .profiler-controls button {\n width: 100%;\n height: 40px;\n border-left: none;\n border-top: none;\n border-bottom: 1px solid var(--profiler-border);\n }\n\n .profiler-panel.position-right.no-tabs .profiler-content-wrapper,\n .profiler-panel.position-left.no-tabs .profiler-content-wrapper {\n display: none;\n }\n\n .profiler-panel.position-right.no-tabs .profiler-tabs,\n .profiler-panel.position-left.no-tabs .profiler-tabs {\n display: none;\n padding-left: 2px;\n }\n\n .profiler-panel.position-right.no-tabs .panel-resizer,\n .profiler-panel.position-left.no-tabs .panel-resizer {\n display: none;\n }\n\n /* Hide position toggle on mobile without tabs */\n .profiler-panel.hide-position-toggle.position-right.no-tabs:not(.maximized),\n .profiler-panel.hide-position-toggle.position-left.no-tabs:not(.maximized) {\n width: 40px !important;\n min-width: 40px !important;\n }\n\n /* Hide drag indicator on mobile devices */\n .profiler-panel.is-mobile .tab-btn.active::before {\n display: none;\n }\n\n .profiler-header::-webkit-scrollbar,\n .profiler-tabs::-webkit-scrollbar,\n .profiler-content::-webkit-scrollbar,\n .detached-tab-content::-webkit-scrollbar,\n .console-log::-webkit-scrollbar,\n .timelineTrack::-webkit-scrollbar,\n .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n }\n\n .profiler-header::-webkit-scrollbar-track,\n .profiler-tabs::-webkit-scrollbar-track,\n .profiler-content::-webkit-scrollbar-track,\n .detached-tab-content::-webkit-scrollbar-track,\n .console-log::-webkit-scrollbar-track,\n .timelineTrack::-webkit-scrollbar-track,\n .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .profiler-header::-webkit-scrollbar-thumb,\n .profiler-tabs::-webkit-scrollbar-thumb,\n .profiler-content::-webkit-scrollbar-thumb,\n .detached-tab-content::-webkit-scrollbar-thumb,\n .console-log::-webkit-scrollbar-thumb,\n .timelineTrack::-webkit-scrollbar-thumb,\n .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background-color: rgba(255, 255, 255, 0.15);\n border-radius: 2px;\n }\n\n .profiler-header::-webkit-scrollbar-thumb:hover,\n .profiler-tabs::-webkit-scrollbar-thumb:hover,\n .profiler-content::-webkit-scrollbar-thumb:hover,\n .detached-tab-content::-webkit-scrollbar-thumb:hover,\n .console-log::-webkit-scrollbar-thumb:hover,\n .timelineTrack::-webkit-scrollbar-thumb:hover,\n .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background-color: rgba(255, 255, 255, 0.3);\n }\n\n .profiler-header::-webkit-scrollbar-corner,\n .profiler-tabs::-webkit-scrollbar-corner,\n .profiler-content::-webkit-scrollbar-corner,\n .detached-tab-content::-webkit-scrollbar-corner,\n .console-log::-webkit-scrollbar-corner,\n .timelineTrack::-webkit-scrollbar-corner,\n .list-scroll-wrapper::-webkit-scrollbar-corner {\n background: transparent;\n }\n\n .profiler-header,\n .profiler-tabs,\n .profiler-content,\n .detached-tab-content,\n .console-log,\n .timelineTrack,\n .list-scroll-wrapper {\n scrollbar-width: thin;\n scrollbar-color: rgba(255, 255, 255, 0.15) transparent;\n }\n\n .profiler-panel.dragging .profiler-header {\n cursor: grabbing !important;\n }\n\n .profiler-panel.dragging {\n opacity: 0.8;\n }\n\n .profiler-tabs {\n display: flex;\n cursor: grab;\n position: relative;\n margin-left: 2px;\n }\n\n .profiler-tabs:active {\n cursor: grabbing;\n }\n\n\n .profiler-controls {\n display: flex;\n position: absolute;\n right: 0;\n top: 0;\n height: 32px;\n background: var(--profiler-header-background);\n border-bottom: 1px solid var(--profiler-border);\n }\n\n .profiler-panel.has-horizontal-scroll .profiler-controls {\n height: 38px;\n }\n\n .tab-btn {\n position: relative;\n background: transparent;\n border: none;\n /*border-right: 1px solid var(--profiler-border);*/\n color: var(--text-secondary);\n padding: 0 15px 2px 15px;\n height: 100%;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n align-items: center;\n font-family: var(--font-family);\n font-weight: 600;\n font-size: 13px;\n user-select: none;\n transition: opacity 0.2s, transform 0.2s;\n touch-action: pan-x;\n white-space: nowrap;\n }\n\n .tab-btn.active {\n border-bottom: 2px solid var(--color-accent);\n color: white;\n }\n\n .tab-btn.active::before {\n content: '';\n position: absolute;\n left: 2px;\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n height: 14px;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='14' viewBox='0 0 8 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='3' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='2' cy='7' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='2' cy='11' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='3' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='7' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='11' r='1' fill='%234a4a5a'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0.6;\n }\n\n .tab-btn.no-detach.active::before {\n display: none;\n }\n\n .floating-btn,\n .maximize-btn,\n .hide-panel-btn {\n background: transparent;\n border: none;\n border-left: 1px solid var(--profiler-border);\n color: var(--text-secondary);\n width: 40px;\n height: 100%;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n /* Disable transitions in vertical mode to avoid broken animations */\n .profiler-panel.position-right .floating-btn,\n .profiler-panel.position-right .maximize-btn,\n .profiler-panel.position-right .hide-panel-btn,\n .profiler-panel.position-left .floating-btn,\n .profiler-panel.position-left .maximize-btn,\n .profiler-panel.position-left .hide-panel-btn {\n transition: background-color 0.2s, color 0.2s;\n }\n\n .floating-btn:hover,\n .maximize-btn:hover,\n .hide-panel-btn:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-primary);\n }\n\n /* Hide maximize button when there are no tabs */\n .profiler-panel.position-right.no-tabs .maximize-btn,\n .profiler-panel.position-left.no-tabs .maximize-btn,\n .profiler-panel.position-bottom.no-tabs .maximize-btn,\n .profiler-panel.position-top.no-tabs .maximize-btn {\n display: none !important;\n }\n\n /* Hide floating button when maximized */\n .profiler-panel.maximized .floating-btn {\n display: none !important;\n }\n\n .profiler-content-wrapper {\n flex-grow: 1;\n overflow: hidden;\n position: relative;\n }\n\n .profiler-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n font-size: 13px;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s, visibility 0.2s;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .profiler-content.active {\n visibility: visible;\n opacity: 1;\n }\n\n .profiler-content {\n overflow: auto; /* make sure scrollbars can appear */\n }\n\n\n .list-item-row {\n display: grid;\n align-items: center;\n padding: 4px 8px;\n border-radius: 3px;\n transition: background-color 0.2s;\n gap: 10px;\n border-bottom: none;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .parameters .list-item-row {\n min-height: 23px;\n }\n\n .mini-panel-content .parameters .list-item-row {\n min-height: 21px;\n }\n\n .list-item-wrapper {\n margin-top: 2px;\n margin-bottom: 2px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-wrapper:has(> .list-item-row .graph-container) {\n margin-left: -1.5em;\n }\n\n .list-item-wrapper:first-child {\n /*margin-top: 0;*/\n }\n\n .list-item-wrapper:not(.header-wrapper):nth-child(odd) > .list-item-row {\n background-color: rgba(0,0,0,0.1);\n }\n\n .list-item-wrapper.header-wrapper>.list-item-row {\n color: var(--color-accent);\n background-color: rgba(0, 170, 255, 0.1);\n }\n\n .list-item-wrapper.header-wrapper>.list-item-row>.list-item-cell:first-child {\n font-weight: 600;\n }\n\n .list-item-row.collapsible,\n .list-item-row.actionable {\n cursor: pointer;\n }\n\n .list-item-row.collapsible {\n background-color: rgba(0, 170, 255, 0.15) !important;\n min-height: 23px;\n }\n\n .list-item-row.collapsible.alert,\n .list-item-row.alert {\n background-color: rgba(244, 67, 54, 0.1) !important;\n }\n\n @media (hover: hover) {\n\n .list-item-row:hover:not(.collapsible):not(.no-hover),\n .list-item-row:hover:not(.no-hover),\n .list-item-row.actionable:hover,\n .list-item-row.collapsible.actionable:hover {\n background-color: rgba(255, 255, 255, 0.05) !important;\n }\n\n .list-item-row.collapsible:hover {\n background-color: rgba(0, 170, 255, 0.25) !important;\n }\n\n }\n\n .list-item-cell {\n white-space: pre;\n display: flex;\n align-items: center;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-cell:not(:first-child) {\n justify-content: flex-end;\n font-weight: 600;\n }\n\n .list-header {\n display: grid;\n align-items: center;\n padding: 4px 8px;\n font-weight: 600;\n color: var(--text-secondary);\n padding-bottom: 6px;\n border-bottom: 1px solid var(--profiler-border);\n margin-bottom: 5px;\n gap: 10px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-wrapper.section-start {\n margin-top: 5px;\n margin-bottom: 5px;\n }\n\n .list-header .list-header-cell:not(:first-child) {\n text-align: right;\n }\n\n .list-children-container {\n padding-left: 1.5em;\n overflow: hidden;\n transition: max-height 0.1s ease-out;\n margin-top: 2px;\n }\n\n .list-children-container.closed {\n max-height: 0;\n }\n\n .item-toggler {\n display: inline-block;\n margin-right: 0.8em;\n text-align: left;\n }\n\n .list-item-row.open .item-toggler::before {\n content: '-';\n }\n\n .list-item-row:not(.open) .item-toggler::before {\n content: '+';\n }\n\n .list-item-cell .value.good {\n color: var(--color-green);\n }\n\n .list-item-cell .value.warn {\n color: var(--color-yellow);\n }\n\n .list-item-cell .value.bad {\n color: var(--color-red);\n }\n\n .list-scroll-wrapper {\n width: max-content;\n min-width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 100%;\n }\n\n .list-container.parameters .list-item-row:not(.collapsible) {\n }\n\n .graph-container {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 0;\n position: relative;\n }\n\n .graph-svg, .graph-canvas {\n width: 0;\n min-width: 100%;\n height: 80px;\n background-color: var(--profiler-header);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n display: block;\n }\n\n .graph-path {\n stroke-width: 2;\n fill-opacity: 0.4;\n }\n\n .console-buttons-group {\n display: flex;\n gap: 20px;\n }\n\n .console-filter-input {\n background-color: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 10px 2px 10px;\n font-family: var(--font-mono);\n flex-grow: 1;\n max-width: 300px;\n border-radius: 15px;\n }\n\n .console-filter-input:focus {\n outline: none;\n border-color: var(--text-secondary);\n }\n\n .console-copy-button {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: color 0.2s, background-color 0.2s;\n }\n\n .console-copy-button:hover {\n color: var(--text-primary);\n background-color: var(--profiler-hover);\n }\n\n .console-copy-button.copied {\n color: var(--color-green);\n }\n\n .console-log {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px;\n overflow-y: auto;\n flex-grow: 1;\n user-select: text;\n -webkit-user-select: text;\n }\n\n .log-message {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n padding: 3px 5px;\n border-radius: 3px;\n line-height: 1.5 !important;\n }\n\n .log-count-badge {\n display: inline-block;\n text-align: center;\n min-width: 14px;\n height: 14px;\n border-radius: 7px;\n padding: 0 3px;\n font-size: 9px;\n font-weight: bold;\n line-height: 14px;\n box-sizing: border-box;\n margin-top: 0;\n flex-shrink: 0;\n }\n\n .log-icon {\n display: inline-block;\n text-align: center;\n width: 14px;\n height: 14px;\n font-size: 11px;\n line-height: 14px;\n margin-top: 0;\n flex-shrink: 0;\n }\n\n .log-body {\n flex-grow: 1;\n white-space: pre-wrap;\n word-break: break-all;\n }\n\n .log-message.info .log-count-badge {\n background-color: rgba(255, 255, 255, 0.12);\n border: 1px solid rgba(255, 255, 255, 0.2);\n color: var(--text-secondary);\n }\n\n .log-message.warn .log-count-badge {\n background-color: rgba(255, 193, 7, 0.18);\n border: 1px solid rgba(255, 193, 7, 0.35);\n color: var(--color-yellow);\n }\n\n .log-message.error .log-count-badge {\n background-color: rgba(244, 67, 54, 0.18);\n border: 1px solid rgba(244, 67, 54, 0.35);\n color: #ff8a80;\n }\n\n .log-message.hidden {\n display: none;\n }\n\n .log-message.info {\n color: var(--text-primary);\n }\n\n .log-message.warn {\n color: var(--color-yellow);\n }\n\n .log-message.error {\n color: #f9dedc;\n background-color: rgba(244, 67, 54, 0.1);\n }\n\n .log-prefix {\n color: var(--text-secondary);\n margin-right: 8px;\n }\n\n .log-code {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 3px;\n padding: 1px 4px;\n }\n\n .thumbnail-container {\n display: flex;\n align-items: center;\n }\n\n .thumbnail-svg {\n width: 40px;\n height: 22.5px;\n flex-shrink: 0;\n margin-right: 8px;\n }\n\n .param-control {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n width: 100%;\n }\n\n .param-control input,\n .param-control select,\n .param-control button {\n background-color: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 6px;\n padding-bottom: 2px;\n font-family: var(--font-mono);\n width: 100%;\n box-sizing: border-box;\n }\n\n .param-control input:focus {\n outline: none;\n border-color: var(--color-accent);\n }\n\n .param-control select {\n padding-top: 3px;\n padding-bottom: 1px;\n }\n\n .param-control input[type=\"number\"] {\n cursor: ns-resize;\n }\n\n .param-control input[type=\"color\"] {\n padding: 2px;\n }\n\n .param-control button {\n cursor: pointer;\n transition: background-color 0.2s;\n }\n\n .param-control button:hover {\n background-color: var(--profiler-header);\n }\n\n .param-control-vector {\n display: flex;\n gap: 5px;\n }\n\n .custom-checkbox {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n gap: 8px;\n will-change: transform;\n font-size: 12px;\n }\n\n .custom-checkbox input {\n display: none;\n }\n\n .custom-checkbox .checkmark {\n width: 14px;\n height: 14px;\n border: 1px solid var(--color-accent);\n border-radius: 3px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n transition: background-color 0.2s, border-color 0.2s;\n }\n\n .custom-checkbox .checkbox-text {\n font-size: 12px;\n margin-top: 1px;\n color: inherit;\n }\n\n .custom-checkbox .checkmark::after {\n content: '';\n width: 6px;\n height: 6px;\n background-color: var(--color-accent);\n border-radius: 1px;\n display: block;\n transform: scale(0);\n transition: transform 0.2s;\n }\n\n .list-container .custom-checkbox .checkmark {\n width: 13px;\n height: 13px;\n }\n\n .list-container .custom-checkbox .checkmark::after {\n width: 7px;\n height: 7px;\n }\n\n .custom-checkbox input:checked+.checkmark {\n border-color: var(--color-accent);\n }\n\n .custom-checkbox input:checked+.checkmark::after {\n transform: scale(1);\n }\n\n .param-control input[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n outline: none;\n padding: 0px;\n padding-top: 8px;\n }\n\n .param-control input[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n background: var(--profiler-background);\n border: 1px solid var(--color-accent);\n border-radius: 3px;\n cursor: pointer;\n margin-top: -8px;\n }\n\n .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 18px;\n height: 18px;\n background: var(--profiler-background);\n border: 2px solid var(--color-accent);\n border-radius: 3px;\n cursor: pointer;\n }\n\n .param-control input[type=\"range\"]::-moz-range-track {\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n }\n\n /* Override .param-control styles for mini-panel-content */\n .mini-panel-content input,\n .mini-panel-content select,\n .mini-panel-content button {\n padding: 2px 4px;\n height: 21px;\n line-height: 1.4;\n padding-top: 4px;\n }\n\n .mini-panel-content .param-control input,\n .mini-panel-content .param-control select,\n .mini-panel-content .param-control button {\n background-color: #1e1e24c2;\n line-height: 1.0;\n }\n\n .mini-panel-content .param-control select {\n padding: 2px 2px;\n padding-top: 3px;\n }\n\n .mini-panel-content .param-control input[type=\"number\"]::-webkit-outer-spin-button,\n .mini-panel-content .param-control input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .mini-panel-content .param-control input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n .mini-panel-content .list-item-cell span {\n position: relative;\n top: 1px;\n margin-left: 2px;\n }\n\n @media screen and (max-width: 340px) {\n\n .mini-panel-content .list-item-cell:first-child {\n display: flex;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n width: 100%;\n }\n\n .mini-panel-content .list-item-cell:first-child .value {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1 1 0%;\n min-width: 0;\n }\n\n .mini-panel-content .list-item-cell:first-child .info-icon {\n flex-shrink: 0;\n }\n\n }\n\n .mini-panel-content .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n margin-bottom: 2px;\n will-change: transform;\n }\n\n .mini-panel-content .list-container.parameters .list-item-row:not(.collapsible) {\n margin-bottom: 2px;\n }\n\n .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:first-child:has(> .list-item-row:not(.collapsible)) {\n margin-top: 2px;\n }\n\n .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:last-child:has(> .list-item-row:not(.collapsible)) {\n margin-bottom: 4px;\n }\n\n @media screen and (max-width: 450px) and (orientation: portrait) {\n\n .console-filter-input {\n max-width: 100px;\n }\n\n }\n\n /* Touch device optimizations */\n @media (hover: none) and (pointer: coarse) {\n\n .panel-resizer {\n top: -10px !important;\n height: 20px !important;\n }\n\n .profiler-panel.position-top .panel-resizer {\n top: auto !important;\n bottom: -10px !important;\n height: 20px !important;\n }\n\n .profiler-panel.position-left .panel-resizer {\n right: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .profiler-panel.position-right .panel-resizer {\n left: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .detached-tab-resizer-top,\n .detached-tab-resizer-bottom {\n height: 10px !important;\n }\n\n .detached-tab-resizer-left,\n .detached-tab-resizer-right {\n width: 10px !important;\n }\n\n }\n\n .drag-preview-indicator {\n position: fixed;\n background-color: rgba(0, 170, 255, 0.2);\n border: 2px dashed var(--color-accent);\n z-index: 999;\n pointer-events: none;\n transition: all 0.2s ease-out;\n }\n\n /* Detached Tab Windows */\n .detached-tab-panel {\n position: fixed;\n width: 500px;\n height: 400px;\n background: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);\n z-index: 1002;\n display: flex;\n flex-direction: column;\n backdrop-filter: blur(10px);\n overflow: hidden;\n opacity: 1;\n visibility: visible;\n transition: opacity 0.2s, visibility 0.2s;\n font-family: var(--font-mono);\n font-size: 13px;\n }\n\n\n .detached-tab-header {\n background: var(--profiler-header-background);\n padding: 0 3px 0 10px;\n font-family: var(--font-family);\n font-size: 13px;\n color: var(--text-primary);\n font-weight: 600;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--profiler-border);\n cursor: grab;\n user-select: none;\n height: 32px;\n flex-shrink: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n touch-action: none;\n }\n\n .detached-tab-header:active {\n cursor: grabbing;\n }\n\n .detached-header-controls {\n display: flex;\n gap: 5px;\n }\n\n .detached-reattach-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n font-family: var(--font-family);\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n .detached-reattach-btn:hover {\n background: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .detached-tab-content {\n flex: 1;\n overflow: hidden;\n position: relative;\n background: var(--profiler-background);\n }\n\n\n .detached-tab-content .profiler-content {\n display: flex !important;\n flex-direction: column !important;\n height: 100%;\n visibility: visible !important;\n opacity: 1 !important;\n position: relative !important;\n }\n\n .detached-tab-content .profiler-content > * {\n font-family: var(--font-mono);\n color: var(--text-primary);\n }\n\n .detached-tab-resizer {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 20px;\n height: 20px;\n cursor: nwse-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer::after {\n content: '';\n position: absolute;\n bottom: 2px;\n right: 2px;\n width: 12px;\n height: 12px;\n border-right: 2px solid var(--profiler-border);\n border-bottom: 2px solid var(--profiler-border);\n border-bottom-right-radius: 6px;\n opacity: 0.5;\n }\n\n .detached-tab-resizer:hover::after {\n opacity: 1;\n border-color: var(--color-accent);\n }\n\n /* Edge resizers */\n .detached-tab-resizer-top {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-right {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-bottom {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-left {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n }\n\n /* Input number spin buttons - hide arrows */\n /* Chrome, Safari, Edge, Opera */\n .profiler-panel input[type=\"number\"]::-webkit-outer-spin-button,\n .profiler-panel input[type=\"number\"]::-webkit-inner-spin-button,\n .detached-tab-content input[type=\"number\"]::-webkit-outer-spin-button,\n .detached-tab-content input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n .profiler-panel input[type=\"number\"],\n .detached-tab-content input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n .panel-action-btn {\n background: transparent;\n color: var(--text-primary);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: 12px;\n transition: background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .panel-action-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .node-canvas-wrapper {\n touch-action: none;\n }\n\n .node-canvas-wrapper .node-canvas-detach-btn {\n position: absolute;\n top: 5px;\n right: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-detach-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .node-canvas-wrapper .node-canvas-fullscreen-btn {\n position: absolute;\n bottom: 5px;\n right: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-fullscreen-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .profiler-panel.maximized .node-canvas-fullscreen-btn {\n display: none;\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 32px;\n padding: 4px 6px;\n border-bottom: 1px solid var(--profiler-border);\n background: var(--profiler-header-background);\n flex-shrink: 0;\n box-sizing: border-box;\n gap: 16px;\n }\n\n .toolbar span {\n color: var(--text-secondary);\n font-size: 12px;\n font-weight: 600;\n }\n\n .toolbar .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n border-radius: 4px;\n }\n\n .viewer-content .toolbar {\n justify-content: flex-end;\n }\n\n .viewer-back-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n padding: 4px 8px;\n border-radius: 4px;\n margin-right: auto;\n transition: color 0.2s, background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .viewer-back-btn:hover {\n color: var(--text-primary);\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .select {\n background: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 16px 2px 6px;\n font-family: var(--font-mono);\n font-size: 12px;\n outline: none;\n cursor: pointer;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0e0e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right 5px center;\n background-size: 10px;\n }\n\n .select:focus {\n border-color: var(--color-accent);\n }\n\n .full-viewer-container {\n display: none;\n flex-grow: 1;\n width: 100%;\n height: 100%;\n overflow: hidden;\n position: relative;\n touch-action: none;\n }\n\n}\n", e.appendChild(t);
|
|
285
|
+
dispose() {
|
|
286
|
+
this._rAFId !== null && (cancelAnimationFrame(this._rAFId), this._rAFId = null), this._resolveTimestampPromise = null, this._overdrawMaterial !== null && (this._overdrawMaterial.dispose(), this._overdrawMaterial = null), super.dispose();
|
|
276
287
|
}
|
|
277
|
-
},
|
|
288
|
+
}, sn = class {
|
|
289
|
+
static init(e, t = null) {
|
|
290
|
+
let n = document.createElement("style");
|
|
291
|
+
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
|
+
}, cn = class {
|
|
278
294
|
constructor(e = 512) {
|
|
279
295
|
this.maxPoints = e, this.lines = {}, this.limit = 0, this.limitIndex = 0, this.domElement = document.createElement("canvas"), this.domElement.setAttribute("class", "graph-canvas"), this.ctx = this.domElement.getContext("2d"), this.width = 0, this.height = 0, this.devicePixelRatio = window.devicePixelRatio || 1;
|
|
280
296
|
}
|
|
@@ -345,9 +361,9 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
345
361
|
};
|
|
346
362
|
}
|
|
347
363
|
dispose() {}
|
|
348
|
-
},
|
|
349
|
-
constructor(e) {
|
|
350
|
-
super(), this.inspector = e, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, this.setupShell(), this.setupResizing(),
|
|
364
|
+
}, ln = class extends se {
|
|
365
|
+
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(), sn.init(this.domElement, this.nonce), this.updateWidgetPosition(), this.setupWindowResizeListener(), this.setupOrientationListener(), this.checkHeaderScroll(), this.panel.addEventListener("transitionend", (e) => {
|
|
351
367
|
e.target === this.panel && (e.propertyName === "width" || e.propertyName === "height" || e.propertyName === "transform") && this.checkHeaderScroll();
|
|
352
368
|
});
|
|
353
369
|
}
|
|
@@ -398,7 +414,7 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
398
414
|
}
|
|
399
415
|
};
|
|
400
416
|
window.addEventListener("resize", () => {
|
|
401
|
-
this.isSmallScreen ? (this.floatingBtn.style.display = "none", this.panel.classList.add("hide-position-toggle")) : (this.floatingBtn.style.display = "", this.panel.classList.remove("hide-position-toggle")), this.isMobile ? this.panel.classList.add("is-mobile") : this.panel.classList.remove("is-mobile"), e(), t(), this.checkHeaderScroll();
|
|
417
|
+
this.isSmallScreen ? (this.floatingBtn.style.display = "none", this.panel.classList.add("hide-position-toggle")) : (this.floatingBtn.style.display = "", this.panel.classList.remove("hide-position-toggle")), this.isMobile ? this.panel.classList.add("is-mobile") : this.panel.classList.remove("is-mobile"), e(), t(), this.checkHeaderScroll(), this.notifyLayoutChange();
|
|
402
418
|
});
|
|
403
419
|
}
|
|
404
420
|
constrainWindowToBounds(e) {
|
|
@@ -406,17 +422,21 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
406
422
|
a + r > t + s && (a = t + s - r), a < -s && (a = -s), o + i > n + c && (o = n + c - i), o < -c && (o = -c), e.style.left = `${a}px`, e.style.top = `${o}px`;
|
|
407
423
|
}
|
|
408
424
|
setupShell() {
|
|
409
|
-
this.domElement = document.createElement("div"), this.domElement.classList.add("three-inspector"), this.toggleButton = document.createElement("button"), this.toggleButton.classList.add("profiler-toggle"), this.toggleButton.innerHTML = "\n<span class=\"builtin-tabs-container\"></span>\n<span class=\"toggle-text\">\n <span class=\"fps-counter\">-</span>\n <span class=\"fps-label\">FPS</span>\n</span>\n<span class=\"toggle-icon\">\n <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\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-device-ipad-horizontal-search\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M11.5 20h-6.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v5.5\" /><path d=\"M9 17h2\" /><path d=\"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0\" /><path d=\"M20.2 20.2l1.8 1.8\" /></svg>\n <span class=\"console-badge-container\">\n <span class=\"console-badge error\"
|
|
410
|
-
let e =
|
|
411
|
-
e.
|
|
412
|
-
|
|
425
|
+
this.domElement = document.createElement("div"), this.domElement.classList.add("three-inspector"), this.domElement.addEventListener("keydown", (e) => e.stopPropagation()), this.domElement.addEventListener("keyup", (e) => e.stopPropagation()), this.toggleButton = document.createElement("button"), this.toggleButton.classList.add("profiler-toggle"), this.toggleButton.innerHTML = "\n<span class=\"builtin-tabs-container\"></span>\n<span class=\"toggle-text\">\n <span class=\"fps-counter\">-</span>\n <span class=\"fps-label\">FPS</span>\n</span>\n<span class=\"toggle-icon\">\n <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\" class=\"icon icon-tabler icons-tabler-outline icon-tabler-device-ipad-horizontal-search\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M11.5 20h-6.5a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v5.5\" /><path d=\"M9 17h2\" /><path d=\"M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0\" /><path d=\"M20.2 20.2l1.8 1.8\" /></svg>\n <span class=\"console-badge-container\">\n <span class=\"console-badge error\">0</span>\n <span class=\"console-badge warn\">0</span>\n </span>\n</span>\n", this.toggleButton.onclick = () => this.togglePanel();
|
|
426
|
+
let e = this.toggleButton.querySelector(".console-badge.error");
|
|
427
|
+
e.style.display = "none";
|
|
428
|
+
let t = this.toggleButton.querySelector(".console-badge.warn");
|
|
429
|
+
t.style.display = "none", this.builtinTabsContainer = this.toggleButton.querySelector(".builtin-tabs-container"), this.miniPanel = document.createElement("div"), this.miniPanel.classList.add("profiler-mini-panel"), this.miniPanel.className = "profiler-mini-panel", this.panel = document.createElement("div"), this.panel.classList.add("profiler-panel");
|
|
430
|
+
let n = document.createElement("div");
|
|
431
|
+
n.className = "profiler-header", n.addEventListener("wheel", (e) => {
|
|
432
|
+
e.deltaY !== 0 && (e.preventDefault(), n.scrollLeft += e.deltaY * .25);
|
|
413
433
|
}, { passive: !1 }), this.tabsContainer = document.createElement("div"), this.tabsContainer.className = "profiler-tabs";
|
|
414
|
-
let t = document.createElement("div");
|
|
415
|
-
t.className = "profiler-controls", this.floatingBtn = document.createElement("button"), this.floatingBtn.classList.add("floating-btn"), this.floatingBtn.title = "Switch to Right Side", this.floatingBtn.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect><line x1=\"15\" y1=\"3\" x2=\"15\" y2=\"21\"></line></svg>", this.floatingBtn.onclick = () => this.togglePosition(), this.isSmallScreen && (this.floatingBtn.style.display = "none", this.panel.classList.add("hide-position-toggle")), this.isMobile && this.panel.classList.add("is-mobile"), this.maximizeBtn = document.createElement("button"), this.maximizeBtn.classList.add("maximize-btn"), this.maximizeBtn.innerHTML = "<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>", this.maximizeBtn.onclick = () => this.toggleMaximize();
|
|
416
|
-
let n = document.createElement("button");
|
|
417
|
-
n.classList.add("hide-panel-btn"), n.textContent = "-", n.onclick = () => this.togglePanel(), t.append(this.floatingBtn, this.maximizeBtn, n), e.append(this.tabsContainer, t), this.contentWrapper = document.createElement("div"), this.contentWrapper.className = "profiler-content-wrapper";
|
|
418
434
|
let r = document.createElement("div");
|
|
419
|
-
r.className = "
|
|
435
|
+
r.className = "profiler-controls", this.floatingBtn = document.createElement("button"), this.floatingBtn.classList.add("floating-btn"), this.floatingBtn.title = "Switch to Right Side", this.floatingBtn.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect><line x1=\"15\" y1=\"3\" x2=\"15\" y2=\"21\"></line></svg>", this.floatingBtn.onclick = () => this.togglePosition(), this.isSmallScreen && (this.floatingBtn.style.display = "none", this.panel.classList.add("hide-position-toggle")), this.isMobile && this.panel.classList.add("is-mobile"), this.maximizeBtn = document.createElement("button"), this.maximizeBtn.classList.add("maximize-btn"), this.maximizeBtn.innerHTML = "<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>", this.maximizeBtn.onclick = () => this.toggleMaximize();
|
|
436
|
+
let i = document.createElement("button");
|
|
437
|
+
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
|
+
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 cn(80), this.toggleGraph.addLine("fps", "#4c4c6bff"), this.toggleGraph.domElement.className = "profiler-toggle-graph", this.toggleButton.appendChild(this.toggleGraph.domElement);
|
|
420
440
|
}
|
|
421
441
|
setupResizing() {
|
|
422
442
|
let e = this.panel.querySelector(".panel-resizer");
|
|
@@ -441,7 +461,7 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
441
461
|
});
|
|
442
462
|
}
|
|
443
463
|
toggleMaximize() {
|
|
444
|
-
this.panel.classList.contains("maximized") ? (this.panel.classList.remove("maximized"), this.domElement.classList.remove("maximized"), this.position === "bottom" ? (this.panel.style.height = `${this.lastHeightBottom}px`, this.panel.style.width = "100%") : this.position === "right" && (this.panel.style.height = "100%", this.panel.style.width = `${this.lastWidthRight}px`), this.maximizeBtn.innerHTML = "<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>") : (this.position === "bottom" ? this.lastHeightBottom = this.panel.offsetHeight : this.position === "right" && (this.lastWidthRight = this.panel.offsetWidth), this.panel.classList.add("maximized"), this.domElement.classList.add("maximized"), this.position === "bottom"
|
|
464
|
+
this.panel.classList.contains("maximized") ? (this.panel.classList.remove("maximized"), this.domElement.classList.remove("maximized"), this.position === "bottom" ? (this.panel.style.height = `${this.lastHeightBottom}px`, this.panel.style.width = "100%") : this.position === "right" && (this.panel.style.height = "100%", this.panel.style.width = `${this.lastWidthRight}px`), this.maximizeBtn.innerHTML = "<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>") : (this.position === "bottom" ? this.lastHeightBottom = this.panel.offsetHeight : this.position === "right" && (this.lastWidthRight = this.panel.offsetWidth), this.panel.classList.add("maximized"), this.domElement.classList.add("maximized"), (this.position === "bottom" || this.position === "right") && (this.panel.style.height = "100%", this.panel.style.width = "100%"), this.maximizeBtn.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"8\" y=\"8\" width=\"12\" height=\"12\" rx=\"2\" ry=\"2\"></rect><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"></path></svg>"), this.updateWidgetPosition(), this.dispatchEvent({ type: "resize" });
|
|
445
465
|
}
|
|
446
466
|
hide() {
|
|
447
467
|
this.miniPanel.classList.remove("visible"), this.miniPanel.querySelectorAll(".mini-panel-content").forEach((e) => {
|
|
@@ -455,7 +475,7 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
455
475
|
e.miniContent.style.display = "block", this.miniPanel.classList.add("visible");
|
|
456
476
|
}
|
|
457
477
|
addTab(e) {
|
|
458
|
-
this.tabs[e.id] = e, e.originalIndex = this.nextTabOriginalIndex++, e.allowDetach === !1 && e.button.classList.add("no-detach"), e.onVisibilityChange = () => this.updatePanelSize(), this.setupTabDragAndDrop(e), e.builtin || this.tabsContainer.appendChild(e.button), this.contentWrapper.appendChild(e.content), e.isVisible || (e.button.style.display = "none", e.content.style.display = "none"), e.builtin && this.addBuiltinTab(e), this.updatePanelSize(), e.
|
|
478
|
+
this.tabs[e.id] = e, e.originalIndex = this.nextTabOriginalIndex++, e.allowDetach === !1 && e.button.classList.add("no-detach"), e.onVisibilityChange = () => this.updatePanelSize(), this.setupTabDragAndDrop(e), e.builtin || this.tabsContainer.appendChild(e.button), this.contentWrapper.appendChild(e.content), e.isVisible || (e.button.style.display = "none", e.content.style.display = "none"), e.builtin && this.addBuiltinTab(e), e.profiler = this, this.updatePanelSize(), this.activeTabId && e.id === this.activeTabId && this.setActiveTab(e.id);
|
|
459
479
|
}
|
|
460
480
|
addBuiltinTab(e) {
|
|
461
481
|
let t = document.createElement("button");
|
|
@@ -680,7 +700,7 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
680
700
|
this.saveLayout(), this.checkHeaderScroll();
|
|
681
701
|
}
|
|
682
702
|
togglePanel() {
|
|
683
|
-
this.panel.classList.toggle("visible"), this.toggleButton.classList.toggle("panel-open"), this.miniPanel.classList.toggle("panel-open"), this.panel.classList.contains("visible") && this.activeTabId && this.tabs[this.activeTabId] && this.tabs[this.activeTabId].setActive(!0), this.dispatchEvent({ type: "resize" }), this.saveLayout();
|
|
703
|
+
this.panel.classList.toggle("visible"), this.toggleButton.classList.toggle("panel-open"), this.miniPanel.classList.toggle("panel-open"), this.panel.classList.contains("visible") && this.activeTabId && this.tabs[this.activeTabId] && this.tabs[this.activeTabId].setActive(!0), this.updateWidgetPosition(), this.dispatchEvent({ type: "resize" }), this.saveLayout();
|
|
684
704
|
}
|
|
685
705
|
togglePosition() {
|
|
686
706
|
let e = this.position === "bottom" ? "right" : "bottom";
|
|
@@ -690,7 +710,7 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
690
710
|
if (this.position === e) return;
|
|
691
711
|
this.panel.style.transition = "none";
|
|
692
712
|
let t = this.panel.classList.contains("maximized");
|
|
693
|
-
e === "right" ? (this.position = "right", this.floatingBtn.classList.add("active"), this.floatingBtn.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect><path d=\"M3 15h18\"></path></svg>", this.floatingBtn.title = "Switch to Bottom", this.panel.classList.remove("position-bottom"), this.panel.classList.add("position-right"), this.
|
|
713
|
+
e === "right" ? (this.position = "right", this.floatingBtn.classList.add("active"), this.floatingBtn.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect><path d=\"M3 15h18\"></path></svg>", this.floatingBtn.title = "Switch to Bottom", this.panel.classList.remove("position-bottom"), this.panel.classList.add("position-right"), this.panel.style.bottom = "", this.panel.style.top = "0", this.panel.style.right = "0", this.panel.style.left = "", t ? (this.panel.style.width = "100%", this.panel.style.height = "100%") : (this.panel.style.width = `${this.lastWidthRight}px`, this.panel.style.height = "100%")) : (this.position = "bottom", this.floatingBtn.classList.remove("active"), this.floatingBtn.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect><line x1=\"15\" y1=\"3\" x2=\"15\" y2=\"21\"></line></svg>", this.floatingBtn.title = "Switch to Right Side", this.panel.classList.remove("position-right"), this.panel.classList.add("position-bottom"), this.panel.style.top = "", this.panel.style.right = "", this.panel.style.bottom = "0", this.panel.style.left = "0", t ? (this.panel.style.width = "100%", this.panel.style.height = "100%") : (this.panel.style.width = "100%", this.panel.style.height = `${this.lastHeightBottom}px`)), this.updateWidgetPosition(), setTimeout(() => {
|
|
694
714
|
this.panel.style.transition = "";
|
|
695
715
|
}, 50), this.updatePanelSize(), this.saveLayout();
|
|
696
716
|
}
|
|
@@ -716,7 +736,7 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
716
736
|
});
|
|
717
737
|
});
|
|
718
738
|
try {
|
|
719
|
-
|
|
739
|
+
Wn("layout", e);
|
|
720
740
|
} catch (e) {
|
|
721
741
|
console.warn("Failed to save profiler layout:", e);
|
|
722
742
|
}
|
|
@@ -724,7 +744,7 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
724
744
|
loadLayout() {
|
|
725
745
|
this.isLoadingLayout = !0;
|
|
726
746
|
try {
|
|
727
|
-
let e =
|
|
747
|
+
let e = Un("layout");
|
|
728
748
|
if (Object.keys(e).length === 0) return;
|
|
729
749
|
if (e.detachedTabs && e.detachedTabs.length > 0) {
|
|
730
750
|
let t = window.innerWidth, n = window.innerHeight;
|
|
@@ -743,7 +763,7 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
743
763
|
}
|
|
744
764
|
e.position && (this.position = e.position), e.lastHeightBottom && (this.lastHeightBottom = e.lastHeightBottom), e.lastWidthRight && (this.lastWidthRight = e.lastWidthRight);
|
|
745
765
|
let t = window.innerWidth, n = window.innerHeight;
|
|
746
|
-
this.lastHeightBottom > n - 50 && (this.lastHeightBottom = n - 50), this.lastWidthRight > t - 50 && (this.lastWidthRight = t - 50), this.position === "right" ? (this.floatingBtn.classList.add("active"), this.floatingBtn.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect><path d=\"M3 15h18\"></path></svg>", this.floatingBtn.title = "Switch to Bottom", this.panel.classList.remove("position-bottom"), this.panel.classList.add("position-right"), this.toggleButton.classList.add("position-right"), this.miniPanel.classList.add("position-right"), this.panel.style.bottom = "", this.panel.style.top = "0", this.panel.style.right = "0", this.panel.style.left = "", this.panel.style.width = `${this.lastWidthRight}px`, this.panel.style.height = "100%") : this.panel.style.height = `${this.lastHeightBottom}px`, e.isVisible && (this.panel.classList.add("visible"), this.toggleButton.classList.add("panel-open")), e.activeTabId && this.setActiveTab(e.activeTabId), e.detachedTabs && e.detachedTabs.length > 0 && (this.pendingDetachedTabs = e.detachedTabs, this.restoreDetachedTabs()), this.updatePanelSize(), this.panel.classList.contains("visible") && this.miniPanel.classList.add("panel-open");
|
|
766
|
+
this.lastHeightBottom > n - 50 && (this.lastHeightBottom = n - 50), this.lastWidthRight > t - 50 && (this.lastWidthRight = t - 50), this.position === "right" ? (this.floatingBtn.classList.add("active"), this.floatingBtn.innerHTML = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect><path d=\"M3 15h18\"></path></svg>", this.floatingBtn.title = "Switch to Bottom", this.panel.classList.remove("position-bottom"), this.panel.classList.add("position-right"), this.toggleButton.classList.add("position-right"), this.miniPanel.classList.add("position-right"), this.panel.style.bottom = "", this.panel.style.top = "0", this.panel.style.right = "0", this.panel.style.left = "", this.panel.style.width = `${this.lastWidthRight}px`, this.panel.style.height = "100%") : this.panel.style.height = `${this.lastHeightBottom}px`, e.isVisible && (this.panel.classList.add("visible"), this.toggleButton.classList.add("panel-open")), e.activeTabId && this.setActiveTab(e.activeTabId), e.detachedTabs && e.detachedTabs.length > 0 && (this.pendingDetachedTabs = e.detachedTabs, this.restoreDetachedTabs()), this.updatePanelSize(), this.updateWidgetPosition(), this.panel.classList.contains("visible") && this.miniPanel.classList.add("panel-open");
|
|
747
767
|
} catch (e) {
|
|
748
768
|
console.warn("Failed to load profiler layout:", e);
|
|
749
769
|
} finally {
|
|
@@ -771,7 +791,38 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
771
791
|
this.updatePanelSize();
|
|
772
792
|
}
|
|
773
793
|
}
|
|
774
|
-
|
|
794
|
+
setHorizontalAlign(e) {
|
|
795
|
+
return this.horizontalAlign = e, this.updateWidgetPosition(), this;
|
|
796
|
+
}
|
|
797
|
+
setVerticalAlign(e) {
|
|
798
|
+
return this.verticalAlign = e, this.updateWidgetPosition(), this;
|
|
799
|
+
}
|
|
800
|
+
updateWidgetPosition() {
|
|
801
|
+
let e = this.panel.classList.contains("visible"), t = this.panel.classList.contains("maximized"), n = this.position === "right", r = this.horizontalAlign, i = this.verticalAlign;
|
|
802
|
+
e && (n ? this.horizontalAlign === "right" && (r = "left") : t ? i = this.verticalAlign === "top" ? "bottom" : "top" : this.verticalAlign === "bottom" && (i = "top")), r === "left" ? (this.toggleButton.classList.add("toggle-left"), this.miniPanel.classList.add("toggle-left")) : (this.toggleButton.classList.remove("toggle-left"), this.miniPanel.classList.remove("toggle-left")), i === "bottom" ? (this.toggleButton.classList.add("toggle-bottom"), this.miniPanel.classList.add("toggle-bottom")) : (this.toggleButton.classList.remove("toggle-bottom"), this.miniPanel.classList.remove("toggle-bottom")), this.notifyLayoutChange();
|
|
803
|
+
}
|
|
804
|
+
isVertical() {
|
|
805
|
+
return this.position === "left" || this.position === "right" || this.panel && (this.panel.classList.contains("position-left") || this.panel.classList.contains("position-right"));
|
|
806
|
+
}
|
|
807
|
+
notifyLayoutChange() {
|
|
808
|
+
let e = this.isVertical();
|
|
809
|
+
this.dispatchEvent({
|
|
810
|
+
type: "orientationchange",
|
|
811
|
+
position: this.position,
|
|
812
|
+
isVertical: e
|
|
813
|
+
}), this.dispatchEvent({
|
|
814
|
+
type: "layoutchange",
|
|
815
|
+
position: this.position,
|
|
816
|
+
isVertical: e
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
dispose() {
|
|
820
|
+
for (let e of Object.values(this.tabs)) e.dispose();
|
|
821
|
+
this.domElement.remove();
|
|
822
|
+
for (let e of this.detachedWindows) e.panel.remove();
|
|
823
|
+
this.toggleGraph.dispose();
|
|
824
|
+
}
|
|
825
|
+
}, un = class extends se {
|
|
775
826
|
constructor(e, t = {}) {
|
|
776
827
|
super(), this.id = e.toLowerCase().replace(/\s+/g, "-"), this.button = document.createElement("button"), this.button.className = "tab-btn", this.button.textContent = e, this.content = document.createElement("div"), this.content.className = "profiler-content", this.content.classList.add(`${this.id}-content`), this._isActive = !1, this.isVisible = !0, this.isDetached = !1, this.detachedWindow = null, this.allowDetach = t.allowDetach === void 0 ? !0 : t.allowDetach, this.builtin = t.builtin === void 0 ? !1 : t.builtin, this.icon = t.icon || null, this.builtinButton = null, this.miniContent = null, this.profiler = null, this.onVisibilityChange = null;
|
|
777
828
|
}
|
|
@@ -811,9 +862,10 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
811
862
|
this.builtinButton && this.builtinButton.classList.remove("active"), this.profiler && (Array.from(this.profiler.miniPanel.querySelectorAll(".mini-panel-content")).some((e) => e.style.display !== "none") || this.profiler.miniPanel.classList.remove("visible"), Array.from(this.profiler.builtinTabsContainer.querySelectorAll(".builtin-tab-btn")).some((e) => e.style.display !== "none") || (this.profiler.builtinTabsContainer.style.display = "none"));
|
|
812
863
|
}
|
|
813
864
|
}
|
|
814
|
-
|
|
865
|
+
dispose() {}
|
|
866
|
+
}, dn = class {
|
|
815
867
|
constructor(...e) {
|
|
816
|
-
this.headers = e, this.children = [], this.domElement = document.createElement("div"), this.domElement.className = "list-container", this.domElement.style.padding = "5px 10px 10px 10px", this.id = `list-${Math.random().toString(36).slice(2, 11)}`, this.domElement.dataset.listId = this.id
|
|
868
|
+
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;
|
|
817
869
|
let t = document.createElement("div");
|
|
818
870
|
t.className = "list-header", this.headers.forEach((e) => {
|
|
819
871
|
let n = document.createElement("div");
|
|
@@ -821,12 +873,10 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
821
873
|
}), this.domElement.appendChild(t);
|
|
822
874
|
}
|
|
823
875
|
setGridStyle(e) {
|
|
824
|
-
this.
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
}
|
|
829
|
-
`;
|
|
876
|
+
this.domElement.style.setProperty("--list-grid-template", e);
|
|
877
|
+
}
|
|
878
|
+
setViewMode(e) {
|
|
879
|
+
e === "grid" ? this.domElement.classList.add("grid-mode") : this.domElement.classList.remove("grid-mode");
|
|
830
880
|
}
|
|
831
881
|
add(e) {
|
|
832
882
|
e.parent !== null && e.parent.remove(e), e.domElement.classList.add("header-wrapper", "section-start"), e.parent = this, this.children.push(e), this.domElement.appendChild(e.domElement);
|
|
@@ -835,7 +885,7 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
835
885
|
let t = this.children.indexOf(e);
|
|
836
886
|
return t !== -1 && (this.children.splice(t, 1), this.domElement.removeChild(e.domElement), e.parent = null), this;
|
|
837
887
|
}
|
|
838
|
-
},
|
|
888
|
+
}, K = class {
|
|
839
889
|
constructor(...e) {
|
|
840
890
|
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) => {
|
|
841
891
|
let n = document.createElement("div");
|
|
@@ -886,14 +936,14 @@ var H = /* @__PURE__ */ new Ae(), qt = /* @__PURE__ */ new p(), Jt = /* @__PURE_
|
|
|
886
936
|
};
|
|
887
937
|
//#endregion
|
|
888
938
|
//#region ../../node_modules/three/examples/jsm/inspector/ui/utils.js
|
|
889
|
-
function
|
|
939
|
+
function q() {
|
|
890
940
|
let e = document.createElement("span");
|
|
891
941
|
return e.className = "value", e;
|
|
892
942
|
}
|
|
893
|
-
function
|
|
943
|
+
function J(e, t) {
|
|
894
944
|
e && e.textContent !== t && (e.textContent = t);
|
|
895
945
|
}
|
|
896
|
-
function
|
|
946
|
+
function fn(e) {
|
|
897
947
|
let t = e.lastIndexOf("/");
|
|
898
948
|
return t === -1 ? {
|
|
899
949
|
path: "",
|
|
@@ -903,10 +953,10 @@ function un(e) {
|
|
|
903
953
|
name: e.substring(t + 1).trim()
|
|
904
954
|
};
|
|
905
955
|
}
|
|
906
|
-
function
|
|
956
|
+
function pn(e) {
|
|
907
957
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
|
|
908
958
|
}
|
|
909
|
-
function
|
|
959
|
+
function Y(e, t = 2) {
|
|
910
960
|
if (e === 0) return "0 Bytes";
|
|
911
961
|
let n = 1024, r = t < 0 ? 0 : t, i = [
|
|
912
962
|
"Bytes",
|
|
@@ -921,7 +971,7 @@ function q(e, t = 2) {
|
|
|
921
971
|
], a = Math.floor(Math.log(e) / Math.log(n));
|
|
922
972
|
return parseFloat((e / n ** +a).toFixed(r)) + " " + i[a];
|
|
923
973
|
}
|
|
924
|
-
function
|
|
974
|
+
function mn(e, t) {
|
|
925
975
|
let n = e.querySelector(".info-icon");
|
|
926
976
|
if (!n) n = document.createElement("span"), n.className = "info-icon", n.textContent = "i", e.appendChild(n);
|
|
927
977
|
else {
|
|
@@ -951,36 +1001,36 @@ function fn(e, t) {
|
|
|
951
1001
|
}
|
|
952
1002
|
//#endregion
|
|
953
1003
|
//#region ../../node_modules/three/examples/jsm/inspector/tabs/Performance.js
|
|
954
|
-
var
|
|
1004
|
+
var hn = class extends un {
|
|
955
1005
|
constructor(e = {}) {
|
|
956
1006
|
super("Performance", e);
|
|
957
|
-
let t = new
|
|
1007
|
+
let t = new dn("Name", "CPU", "GPU", "Total");
|
|
958
1008
|
t.setGridStyle("minmax(200px, 2fr) 80px 80px 80px"), t.domElement.style.minWidth = "600px";
|
|
959
1009
|
let n = document.createElement("div");
|
|
960
1010
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
|
|
961
1011
|
let r = document.createElement("div");
|
|
962
1012
|
r.className = "graph-container";
|
|
963
|
-
let i = new
|
|
964
|
-
i.addLine("fps", "var( --color-fps )"), i.addLine("cpu", "var( --color-yellow )"), i.addLine("gpu", "var( --color-green )"), r.append(i.domElement), this.graphFpsCounter =
|
|
965
|
-
let a = new
|
|
1013
|
+
let i = new cn();
|
|
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);
|
|
966
1016
|
t.add(a);
|
|
967
|
-
let o = new
|
|
1017
|
+
let o = new K(r);
|
|
968
1018
|
o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o);
|
|
969
|
-
let s = new
|
|
1019
|
+
let s = new K("Frame Stats", q(), q(), q());
|
|
970
1020
|
t.add(s);
|
|
971
|
-
let c = new
|
|
1021
|
+
let c = new K("Miscellaneous & Idle", q(), q(), q());
|
|
972
1022
|
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();
|
|
973
1023
|
}
|
|
974
1024
|
resolveStats(e, t) {
|
|
975
1025
|
let n = e.getStatsData(t.cid), r = n.item;
|
|
976
|
-
if (r === void 0) r = new
|
|
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;
|
|
977
1027
|
else {
|
|
978
1028
|
r.userData.name = t.name, this.notInUse.has(t.cid) && (r.domElement.firstElementChild.classList.remove("alert"), this.notInUse.delete(t.cid));
|
|
979
1029
|
let e = t.parent.children.indexOf(t);
|
|
980
1030
|
(r.parent === null || r.parent.children.indexOf(r) !== e) && this.currentItem.add(r, e);
|
|
981
1031
|
}
|
|
982
1032
|
let i = r.userData.name;
|
|
983
|
-
t.isComputeStats && (i += " [ Compute ]"),
|
|
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));
|
|
984
1034
|
let a = this.currentItem;
|
|
985
1035
|
this.currentItem = r;
|
|
986
1036
|
for (let n of t.children) this.resolveStats(e, n);
|
|
@@ -1004,7 +1054,7 @@ var pn = class extends cn {
|
|
|
1004
1054
|
let { item: t, time: n } = this.notInUse.get(e), r = performance.now(), i = 5 - Math.floor((r - n) / 1e3);
|
|
1005
1055
|
if (i >= 0) {
|
|
1006
1056
|
let e = "*".repeat(Math.max(0, i));
|
|
1007
|
-
|
|
1057
|
+
J(t.domElement.querySelector(".list-item-cell .value"), t.userData.name + " (not in use) " + e);
|
|
1008
1058
|
} else t.domElement.firstElementChild.classList.remove("alert"), t.parent.remove(t), this.notInUse.delete(e);
|
|
1009
1059
|
}
|
|
1010
1060
|
updateText(e, t) {
|
|
@@ -1013,37 +1063,33 @@ var pn = class extends cn {
|
|
|
1013
1063
|
for (let n of t.children) this.resolveStats(e, n);
|
|
1014
1064
|
for (let [e, t] of n) this.frameItems.has(e) || (this.addNotInUse(e, t), n.delete(e));
|
|
1015
1065
|
for (let e of this.notInUse.keys()) this.updateNotInUse(e);
|
|
1016
|
-
|
|
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;
|
|
1017
1067
|
}
|
|
1018
|
-
},
|
|
1068
|
+
}, gn = class extends un {
|
|
1019
1069
|
constructor(e = {}) {
|
|
1020
1070
|
super("Memory", e);
|
|
1021
|
-
let t = new
|
|
1071
|
+
let t = new dn("Name", "Count", "Size");
|
|
1022
1072
|
t.setGridStyle("minmax(200px, 2fr) 60px 100px"), t.domElement.style.minWidth = "300px";
|
|
1023
1073
|
let n = document.createElement("div");
|
|
1024
1074
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
|
|
1025
1075
|
let r = document.createElement("div");
|
|
1026
1076
|
r.className = "graph-container";
|
|
1027
|
-
let i = new
|
|
1077
|
+
let i = new cn();
|
|
1028
1078
|
i.addLine("total", "var( --color-yellow )"), r.append(i.domElement);
|
|
1029
|
-
let a = new
|
|
1079
|
+
let a = new K("Graph Stats", "", "");
|
|
1030
1080
|
t.add(a);
|
|
1031
|
-
let o = new
|
|
1032
|
-
o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o), this.memoryStats = new
|
|
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;
|
|
1033
1083
|
}
|
|
1034
1084
|
updateGraph(e) {
|
|
1035
|
-
let t = e.getRenderer();
|
|
1036
|
-
|
|
1037
|
-
let n = t.info.memory;
|
|
1038
|
-
this.graph.addPoint("total", n.total), this.graph.limit === 0 && (this.graph.limit = 1), this.graph.update();
|
|
1085
|
+
let t = e.getRenderer().info.memory;
|
|
1086
|
+
this.graph.addPoint("total", t.total), this.graph.limit === 0 && (this.graph.limit = 1), this.graph.update();
|
|
1039
1087
|
}
|
|
1040
1088
|
updateText(e) {
|
|
1041
|
-
let t = e.getRenderer();
|
|
1042
|
-
|
|
1043
|
-
let n = t.info.memory;
|
|
1044
|
-
K(this.memoryStats.data[2], q(n.total)), K(this.attributes.data[1], n.attributes.toString()), K(this.attributes.data[2], q(n.attributesSize)), K(this.geometries.data[1], n.geometries.toString()), K(this.indexAttributes.data[1], n.indexAttributes.toString()), K(this.indexAttributes.data[2], q(n.indexAttributesSize)), K(this.indirectStorageAttributes.data[1], n.indirectStorageAttributes.toString()), K(this.indirectStorageAttributes.data[2], q(n.indirectStorageAttributesSize)), K(this.programs.data[1], n.programs.toString()), K(this.programs.data[2], q(n.programsSize)), K(this.readbackBuffers.data[1], n.readbackBuffers.toString()), K(this.readbackBuffers.data[2], q(n.readbackBuffersSize)), K(this.renderTargets.data[1], n.renderTargets.toString()), K(this.storageAttributes.data[1], n.storageAttributes.toString()), K(this.storageAttributes.data[2], q(n.storageAttributesSize)), K(this.textures.data[1], n.textures.toString()), K(this.textures.data[2], q(n.texturesSize)), K(this.uniformBuffers.data[1], n.uniformBuffers.toString()), K(this.uniformBuffers.data[2], q(n.uniformBuffersSize));
|
|
1089
|
+
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));
|
|
1045
1091
|
}
|
|
1046
|
-
},
|
|
1092
|
+
}, _n = class extends un {
|
|
1047
1093
|
constructor(e = {}) {
|
|
1048
1094
|
super("Console", e), this.filters = {
|
|
1049
1095
|
info: !0,
|
|
@@ -1152,12 +1198,12 @@ var pn = class extends cn {
|
|
|
1152
1198
|
}
|
|
1153
1199
|
this.logContainer.scrollTop = this.logContainer.scrollHeight, this.isActive || (e === "error" ? (this.unreadErrors++, this.updateBadges()) : e === "warn" && (this.unreadWarns++, this.updateBadges()));
|
|
1154
1200
|
}
|
|
1155
|
-
},
|
|
1201
|
+
}, X = class extends se {
|
|
1156
1202
|
constructor() {
|
|
1157
|
-
super(), this.domElement = document.createElement("div"), this.domElement.className = "param-control", this._onChangeFunction = null, this.addEventListener("change", (e) => {
|
|
1158
|
-
|
|
1203
|
+
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
|
+
clearTimeout(this._changeTimeout), this._changeTimeout = setTimeout(() => {
|
|
1159
1205
|
this._onChangeFunction && this._onChangeFunction(e.value);
|
|
1160
|
-
});
|
|
1206
|
+
}, this._debounceTime);
|
|
1161
1207
|
});
|
|
1162
1208
|
}
|
|
1163
1209
|
setValue() {
|
|
@@ -1175,13 +1221,16 @@ var pn = class extends cn {
|
|
|
1175
1221
|
onChange(e) {
|
|
1176
1222
|
return this._onChangeFunction = e, this;
|
|
1177
1223
|
}
|
|
1224
|
+
debounce(e) {
|
|
1225
|
+
return this._debounceTime = e, this;
|
|
1226
|
+
}
|
|
1178
1227
|
show() {
|
|
1179
1228
|
return this.dispatchEvent({ type: "show" }), this;
|
|
1180
1229
|
}
|
|
1181
1230
|
hide() {
|
|
1182
1231
|
return this.dispatchEvent({ type: "hide" }), this;
|
|
1183
1232
|
}
|
|
1184
|
-
},
|
|
1233
|
+
}, vn = class extends X {
|
|
1185
1234
|
constructor({ value: e = 0, step: t = .1, min: n = -Infinity, max: r = Infinity }) {
|
|
1186
1235
|
super(), this.input = document.createElement("input"), this.input.type = "number", this.input.value = e, this.input.step = t, this.input.min = n, this.input.max = r, this.input.addEventListener("change", this._onChangeValue.bind(this)), this.domElement.appendChild(this.input), this.addDragHandler();
|
|
1187
1236
|
}
|
|
@@ -1212,7 +1261,7 @@ var pn = class extends cn {
|
|
|
1212
1261
|
getValue() {
|
|
1213
1262
|
return parseFloat(this.input.value);
|
|
1214
1263
|
}
|
|
1215
|
-
},
|
|
1264
|
+
}, yn = class extends X {
|
|
1216
1265
|
constructor({ value: e = !1 }) {
|
|
1217
1266
|
super();
|
|
1218
1267
|
let t = document.createElement("label");
|
|
@@ -1230,10 +1279,10 @@ var pn = class extends cn {
|
|
|
1230
1279
|
getValue() {
|
|
1231
1280
|
return this.checkbox.checked;
|
|
1232
1281
|
}
|
|
1233
|
-
},
|
|
1282
|
+
}, bn = class extends X {
|
|
1234
1283
|
constructor({ value: e = 0, min: t = 0, max: n = 1, step: r = .01 }) {
|
|
1235
1284
|
super(), this.slider = document.createElement("input"), this.slider.type = "range", this.slider.min = t, this.slider.max = n, this.slider.step = r;
|
|
1236
|
-
let i = new
|
|
1285
|
+
let i = new vn({
|
|
1237
1286
|
value: e,
|
|
1238
1287
|
min: t,
|
|
1239
1288
|
max: n,
|
|
@@ -1254,7 +1303,7 @@ var pn = class extends cn {
|
|
|
1254
1303
|
step(e) {
|
|
1255
1304
|
return this.slider.step = e, this.numberInput.step = e, this.slider.value = parseFloat(this.numberInput.value), this;
|
|
1256
1305
|
}
|
|
1257
|
-
},
|
|
1306
|
+
}, xn = class extends X {
|
|
1258
1307
|
constructor({ options: e = [], value: t = "" }) {
|
|
1259
1308
|
super();
|
|
1260
1309
|
let n = document.createElement("select"), r = (e, r) => {
|
|
@@ -1277,7 +1326,7 @@ var pn = class extends cn {
|
|
|
1277
1326
|
let e = this.options;
|
|
1278
1327
|
return Array.isArray(e) ? e[this.select.selectedIndex] : e[this.select.value];
|
|
1279
1328
|
}
|
|
1280
|
-
},
|
|
1329
|
+
}, Sn = class extends X {
|
|
1281
1330
|
constructor({ value: e = "#ffffff" }) {
|
|
1282
1331
|
super();
|
|
1283
1332
|
let t = document.createElement("input");
|
|
@@ -1297,13 +1346,13 @@ var pn = class extends cn {
|
|
|
1297
1346
|
let e = this._value;
|
|
1298
1347
|
return typeof e == "string" && (e = parseInt(e.slice(1), 16)), e;
|
|
1299
1348
|
}
|
|
1300
|
-
},
|
|
1349
|
+
}, Cn = class extends X {
|
|
1301
1350
|
constructor({ text: e = "Button", value: t = () => {} }) {
|
|
1302
1351
|
super();
|
|
1303
1352
|
let n = document.createElement("button");
|
|
1304
1353
|
n.textContent = e, n.onclick = t, this.domElement.appendChild(n);
|
|
1305
1354
|
}
|
|
1306
|
-
},
|
|
1355
|
+
}, wn = class extends X {
|
|
1307
1356
|
constructor({ value: e = "" }) {
|
|
1308
1357
|
super();
|
|
1309
1358
|
let t = document.createElement("input");
|
|
@@ -1317,9 +1366,9 @@ var pn = class extends cn {
|
|
|
1317
1366
|
getValue() {
|
|
1318
1367
|
return this.input.value;
|
|
1319
1368
|
}
|
|
1320
|
-
},
|
|
1369
|
+
}, Tn = class e {
|
|
1321
1370
|
constructor(e, t) {
|
|
1322
|
-
this.parameters = e, this.paramList = new
|
|
1371
|
+
this.parameters = e, this.paramList = new K(t), this.paramList.setCollapsible(!0), this.objects = [];
|
|
1323
1372
|
}
|
|
1324
1373
|
close() {
|
|
1325
1374
|
return this.paramList.close(), this;
|
|
@@ -1338,7 +1387,7 @@ var pn = class extends cn {
|
|
|
1338
1387
|
return typeof n[0] == "object" ? i = this.addSelect(e, t, n[0]) : r === "number" ? i = n.length >= 2 ? this.addSlider(e, t, ...n) : this.addNumber(e, t, ...n) : r === "boolean" ? i = this.addBoolean(e, t) : r === "string" ? i = this.addString(e, t) : r === "function" && (i = this.addButton(e, t, ...n)), i;
|
|
1339
1388
|
}
|
|
1340
1389
|
_addInfo(e, t) {
|
|
1341
|
-
e.info = (n) => (
|
|
1390
|
+
e.info = (n) => (mn(t, n), e);
|
|
1342
1391
|
}
|
|
1343
1392
|
_addParameter(e, t, n, r) {
|
|
1344
1393
|
n.name = (e) => (r.data[0].childNodes.length > 0 && r.data[0].firstChild.nodeType === 3 ? r.data[0].firstChild.textContent = e : r.data[0].insertBefore(document.createTextNode(e), r.data[0].firstChild), n), this._addInfo(n, r.data[0]), n.listen = () => {
|
|
@@ -1358,13 +1407,13 @@ var pn = class extends cn {
|
|
|
1358
1407
|
}), n.addEventListener("show", () => r.show()), n.addEventListener("hide", () => r.hide());
|
|
1359
1408
|
}
|
|
1360
1409
|
addString(e, t) {
|
|
1361
|
-
let n = e[t], r = new
|
|
1410
|
+
let n = e[t], r = new wn({ value: n });
|
|
1362
1411
|
r.addEventListener("change", ({ value: n }) => {
|
|
1363
1412
|
e[t] = n;
|
|
1364
1413
|
});
|
|
1365
|
-
let i =
|
|
1414
|
+
let i = q();
|
|
1366
1415
|
i.textContent = t;
|
|
1367
|
-
let a = new
|
|
1416
|
+
let a = new K(i, r.domElement);
|
|
1368
1417
|
return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
|
|
1369
1418
|
}
|
|
1370
1419
|
addFolder(t) {
|
|
@@ -1372,13 +1421,13 @@ var pn = class extends cn {
|
|
|
1372
1421
|
return this.paramList.add(n.paramList), n;
|
|
1373
1422
|
}
|
|
1374
1423
|
addBoolean(e, t) {
|
|
1375
|
-
let n = e[t], r = new
|
|
1424
|
+
let n = e[t], r = new yn({ value: n });
|
|
1376
1425
|
r.addEventListener("change", ({ value: n }) => {
|
|
1377
1426
|
e[t] = n;
|
|
1378
1427
|
});
|
|
1379
|
-
let i =
|
|
1428
|
+
let i = q();
|
|
1380
1429
|
i.textContent = t;
|
|
1381
|
-
let a = new
|
|
1430
|
+
let a = new K(i, r.domElement);
|
|
1382
1431
|
this.paramList.add(a);
|
|
1383
1432
|
let o = a.domElement.firstChild;
|
|
1384
1433
|
return o.classList.add("actionable"), o.addEventListener("click", (e) => {
|
|
@@ -1388,30 +1437,30 @@ var pn = class extends cn {
|
|
|
1388
1437
|
}), this._addParameter(e, t, r, a), r;
|
|
1389
1438
|
}
|
|
1390
1439
|
addSelect(e, t, n) {
|
|
1391
|
-
let r = e[t], i = new
|
|
1440
|
+
let r = e[t], i = new xn({
|
|
1392
1441
|
options: n,
|
|
1393
1442
|
value: r
|
|
1394
1443
|
});
|
|
1395
1444
|
i.addEventListener("change", ({ value: n }) => {
|
|
1396
1445
|
e[t] = n;
|
|
1397
1446
|
});
|
|
1398
|
-
let a =
|
|
1447
|
+
let a = q();
|
|
1399
1448
|
a.textContent = t;
|
|
1400
|
-
let o = new
|
|
1449
|
+
let o = new K(a, i.domElement);
|
|
1401
1450
|
return this.paramList.add(o), o.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, i, o), i;
|
|
1402
1451
|
}
|
|
1403
1452
|
addColor(e, t) {
|
|
1404
|
-
let n = e[t], r = new
|
|
1453
|
+
let n = e[t], r = new Sn({ value: n });
|
|
1405
1454
|
r.addEventListener("change", ({ value: n }) => {
|
|
1406
1455
|
e[t] = n;
|
|
1407
1456
|
});
|
|
1408
|
-
let i =
|
|
1457
|
+
let i = q();
|
|
1409
1458
|
i.textContent = t;
|
|
1410
|
-
let a = new
|
|
1459
|
+
let a = new K(i, r.domElement);
|
|
1411
1460
|
return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
|
|
1412
1461
|
}
|
|
1413
1462
|
addSlider(e, t, n = 0, r = 1, i = .01) {
|
|
1414
|
-
let a = e[t], o = new
|
|
1463
|
+
let a = e[t], o = new bn({
|
|
1415
1464
|
value: a,
|
|
1416
1465
|
min: n,
|
|
1417
1466
|
max: r,
|
|
@@ -1420,13 +1469,13 @@ var pn = class extends cn {
|
|
|
1420
1469
|
o.addEventListener("change", ({ value: n }) => {
|
|
1421
1470
|
e[t] = n;
|
|
1422
1471
|
});
|
|
1423
|
-
let s =
|
|
1472
|
+
let s = q();
|
|
1424
1473
|
s.textContent = t;
|
|
1425
|
-
let c = new
|
|
1474
|
+
let c = new K(s, o.domElement);
|
|
1426
1475
|
return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
|
|
1427
1476
|
}
|
|
1428
1477
|
addNumber(e, t, ...n) {
|
|
1429
|
-
let r = e[t], [i, a] = n, o = new
|
|
1478
|
+
let r = e[t], [i, a] = n, o = new vn({
|
|
1430
1479
|
value: r,
|
|
1431
1480
|
min: i,
|
|
1432
1481
|
max: a
|
|
@@ -1434,98 +1483,101 @@ var pn = class extends cn {
|
|
|
1434
1483
|
o.addEventListener("change", ({ value: n }) => {
|
|
1435
1484
|
e[t] = n;
|
|
1436
1485
|
});
|
|
1437
|
-
let s =
|
|
1486
|
+
let s = q();
|
|
1438
1487
|
s.textContent = t;
|
|
1439
|
-
let c = new
|
|
1488
|
+
let c = new K(s, o.domElement);
|
|
1440
1489
|
return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
|
|
1441
1490
|
}
|
|
1442
1491
|
addButton(e, t) {
|
|
1443
|
-
let n = e[t], r = new
|
|
1492
|
+
let n = e[t], r = new Cn({
|
|
1444
1493
|
text: t,
|
|
1445
1494
|
value: n
|
|
1446
1495
|
});
|
|
1447
1496
|
r.addEventListener("change", ({ value: n }) => {
|
|
1448
1497
|
e[t] = n;
|
|
1449
1498
|
});
|
|
1450
|
-
let i = new
|
|
1499
|
+
let i = new K(r.domElement);
|
|
1451
1500
|
return i.itemRow.childNodes[0].style.gridColumn = "1 / -1", this.paramList.add(i), i.domElement.firstChild.classList.add("actionable"), r.name = (e) => {
|
|
1452
1501
|
let t = r.domElement.childNodes[0];
|
|
1453
1502
|
return t.childNodes.length > 0 && t.firstChild.nodeType === 3 ? t.firstChild.textContent = e : t.insertBefore(document.createTextNode(e), t.firstChild), r;
|
|
1454
1503
|
}, this._addInfo(r, r.domElement.childNodes[0]), this._registerParameter(e, t, r, i), r;
|
|
1455
1504
|
}
|
|
1456
|
-
},
|
|
1505
|
+
}, En = class extends un {
|
|
1457
1506
|
constructor(e = {}) {
|
|
1458
1507
|
super(e.name || "Parameters", e);
|
|
1459
|
-
let t = new
|
|
1508
|
+
let t = new dn("Property", "Value");
|
|
1460
1509
|
t.domElement.classList.add("parameters"), t.setGridStyle(".5fr 1fr"), t.domElement.style.minWidth = "300px";
|
|
1461
1510
|
let n = document.createElement("div");
|
|
1462
1511
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n), this.paramList = t, this.groups = [];
|
|
1463
1512
|
}
|
|
1464
1513
|
createGroup(e) {
|
|
1465
|
-
let t = new
|
|
1514
|
+
let t = new Tn(this, e);
|
|
1466
1515
|
return this.paramList.add(t.paramList), this.groups.push(t), t;
|
|
1467
1516
|
}
|
|
1468
|
-
},
|
|
1517
|
+
}, Dn = [{
|
|
1518
|
+
name: "Color Grading",
|
|
1519
|
+
url: "../extensions/color-grading/ColorGrading.js"
|
|
1520
|
+
}, {
|
|
1469
1521
|
name: "TSL Graph",
|
|
1470
1522
|
url: "../extensions/tsl-graph/TSLGraphEditor.js"
|
|
1471
|
-
}],
|
|
1472
|
-
function
|
|
1473
|
-
e ?
|
|
1523
|
+
}], On = De.prototype.init;
|
|
1524
|
+
function kn(e) {
|
|
1525
|
+
e ? De.prototype.init = async function() {
|
|
1474
1526
|
if (this.backend.isWebGLBackend !== !0) {
|
|
1475
1527
|
let e = this.backend.parameters;
|
|
1476
1528
|
this.backend = new Oe(e);
|
|
1477
1529
|
}
|
|
1478
|
-
return
|
|
1479
|
-
} :
|
|
1530
|
+
return On.call(this);
|
|
1531
|
+
} : De.prototype.init = On;
|
|
1480
1532
|
}
|
|
1481
|
-
var
|
|
1482
|
-
function
|
|
1483
|
-
if (
|
|
1484
|
-
let e =
|
|
1485
|
-
return
|
|
1533
|
+
var Z = null;
|
|
1534
|
+
function An() {
|
|
1535
|
+
if (Z !== null) return Z;
|
|
1536
|
+
let e = Un("settings");
|
|
1537
|
+
return Z = {
|
|
1486
1538
|
forceWebGL: e.forceWebGL === void 0 ? !1 : e.forceWebGL,
|
|
1487
1539
|
captureStackTrace: e.captureStackTrace === void 0 ? !1 : e.captureStackTrace,
|
|
1488
1540
|
activeExtensions: e.activeExtensions === void 0 ? {} : e.activeExtensions,
|
|
1489
1541
|
storage: e.storage === void 0 ? "url" : e.storage
|
|
1490
|
-
},
|
|
1542
|
+
}, Z.forceWebGL && kn(!0), Z.captureStackTrace && (Se.captureStackTrace = !0), Z;
|
|
1491
1543
|
}
|
|
1492
|
-
function
|
|
1493
|
-
|
|
1494
|
-
forceWebGL:
|
|
1495
|
-
captureStackTrace:
|
|
1496
|
-
activeExtensions:
|
|
1497
|
-
storage:
|
|
1544
|
+
function jn() {
|
|
1545
|
+
Wn("settings", {
|
|
1546
|
+
forceWebGL: Z.forceWebGL,
|
|
1547
|
+
captureStackTrace: Z.captureStackTrace,
|
|
1548
|
+
activeExtensions: Z.activeExtensions,
|
|
1549
|
+
storage: Z.storage
|
|
1498
1550
|
});
|
|
1499
1551
|
}
|
|
1500
|
-
|
|
1501
|
-
var
|
|
1552
|
+
An();
|
|
1553
|
+
var Mn = class extends En {
|
|
1502
1554
|
constructor() {
|
|
1503
1555
|
super({ name: "Settings" }), this.extensions = {};
|
|
1504
|
-
let e =
|
|
1556
|
+
let e = An(), t = this.createGroup("Renderer");
|
|
1505
1557
|
t.add(e, "forceWebGL").name("Force WebGL").onChange((e) => {
|
|
1506
|
-
|
|
1558
|
+
kn(e), jn(), location.reload();
|
|
1507
1559
|
}), t.add(e, "captureStackTrace").name("Capture Stack Trace").onChange((e) => {
|
|
1508
|
-
|
|
1560
|
+
Se.captureStackTrace = e, jn(), location.reload();
|
|
1509
1561
|
}), this.createGroup("Render Modes").add({ overdraw: !1 }, "overdraw").name("Overdraw").onChange((e) => {
|
|
1510
1562
|
this.inspector.overdraw = e;
|
|
1511
1563
|
}).info("Shows how many times each pixel is shaded.");
|
|
1512
1564
|
}
|
|
1513
1565
|
init() {
|
|
1514
|
-
let e = this.createGroup("Extensions"), t = this.createGroup("Storage"), n =
|
|
1566
|
+
let e = this.createGroup("Extensions"), t = this.createGroup("Storage"), n = An();
|
|
1515
1567
|
t.add(n, "storage", {
|
|
1516
1568
|
"URL Session": "url",
|
|
1517
1569
|
"Keep across Origin": "origin"
|
|
1518
1570
|
}).name("Save Settings").onChange(() => {
|
|
1519
|
-
|
|
1571
|
+
jn();
|
|
1520
1572
|
}).info("\nDefines how the **Inspector** preferences and states are stored in the browser.\n\n**URL Session**\nSaves state based on the exact URL. It will reset the settings whenever the URL changes.\n\n**Keep across Origin**\nShares the same state across any page within the current origin."), t.add({ clear: () => {
|
|
1521
1573
|
localStorage.removeItem("threejs-inspector"), location.reload();
|
|
1522
1574
|
} }, "clear").name("Clear Settings"), this._getExtensions().then((t) => {
|
|
1523
1575
|
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) => {
|
|
1524
|
-
this.setActiveExtension(n.name, e), e ?
|
|
1576
|
+
this.setActiveExtension(n.name, e), e ? Z.activeExtensions[n.name] = {
|
|
1525
1577
|
name: n.name,
|
|
1526
1578
|
url: n.url
|
|
1527
|
-
} : delete
|
|
1528
|
-
}),
|
|
1579
|
+
} : delete Z.activeExtensions[n.name], this._updateExtensionUI(n), jn();
|
|
1580
|
+
}), Z.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
|
|
1529
1581
|
});
|
|
1530
1582
|
}
|
|
1531
1583
|
async setActiveExtension(e, t) {
|
|
@@ -1533,7 +1585,7 @@ var An = class extends wn {
|
|
|
1533
1585
|
n && (t ? await this._loadExtension(r, n) : await this._unloadExtension(r, n));
|
|
1534
1586
|
}
|
|
1535
1587
|
_updateExtensionUI(e) {
|
|
1536
|
-
e.active &&
|
|
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");
|
|
1537
1589
|
}
|
|
1538
1590
|
async _unloadExtension(e, t) {
|
|
1539
1591
|
t.active !== !1 && (e.removeTab(t.tab), t.active = !1, t.loaded = !1, t.tab = null, this._updateExtensionUI(t), this.dispatchEvent({
|
|
@@ -1552,38 +1604,38 @@ var An = class extends wn {
|
|
|
1552
1604
|
});
|
|
1553
1605
|
}
|
|
1554
1606
|
async _getExtensions() {
|
|
1555
|
-
return
|
|
1607
|
+
return Dn;
|
|
1556
1608
|
}
|
|
1557
|
-
},
|
|
1558
|
-
let r =
|
|
1559
|
-
|
|
1609
|
+
}, Nn = /* @__PURE__ */ new d(), Pn = "<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>", 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\"><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>", 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.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>", Ln = /* @__PURE__ */ V(([e, t, n]) => {
|
|
1610
|
+
let r = P(0);
|
|
1611
|
+
Et(() => {
|
|
1560
1612
|
let { width: e, height: n } = t.value;
|
|
1561
1613
|
r.value = e / n;
|
|
1562
1614
|
});
|
|
1563
|
-
let i = n.div(r), a = e.sub(.5), o =
|
|
1564
|
-
return
|
|
1565
|
-
}),
|
|
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 j(c, Ut(0, c.x).mul(Ut(c.x, 1)).mul(Ut(0, c.y)).mul(Ut(c.y, 1)));
|
|
1617
|
+
}), Rn = class extends un {
|
|
1566
1618
|
constructor(e = {}) {
|
|
1567
1619
|
super("Viewer", e), this.content.style.overflow = "hidden", this.maximizedByFullscreenButton = !1;
|
|
1568
1620
|
let t = document.createElement("div");
|
|
1569
1621
|
t.className = "toolbar";
|
|
1570
1622
|
let n = document.createElement("button");
|
|
1571
|
-
n.className = "viewer-back-btn", n.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"19\" y1=\"12\" x2=\"5\" y2=\"12\"></line><polyline points=\"12 19 5 12 12 5\"></polyline></svg>", n.title = "Back
|
|
1623
|
+
n.className = "viewer-back-btn", n.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"19\" y1=\"12\" x2=\"5\" y2=\"12\"></line><polyline points=\"12 19 5 12 12 5\"></polyline></svg>", n.title = "Back", n.style.display = "none", t.appendChild(n);
|
|
1572
1624
|
let r = document.createElement("span");
|
|
1573
1625
|
r.textContent = "View:", t.appendChild(r);
|
|
1574
1626
|
let i = document.createElement("select");
|
|
1575
1627
|
i.className = "select", i.style.width = "200px";
|
|
1576
1628
|
let a = document.createElement("option");
|
|
1577
|
-
a.value = "list", a.textContent = "List", i.appendChild(a), t.appendChild(i)
|
|
1578
|
-
let o = new
|
|
1579
|
-
o.setGridStyle("150px minmax(200px, 2fr)"), o.domElement.style.minWidth = "400px";
|
|
1629
|
+
a.value = "list", a.textContent = "List", i.appendChild(a), t.appendChild(i);
|
|
1630
|
+
let o = new dn("Viewer", "Name");
|
|
1631
|
+
o.setGridStyle("150px minmax(200px, 2fr)"), o.domElement.style.minWidth = "400px", this.nodeList = o, this.content.appendChild(t);
|
|
1580
1632
|
let s = document.createElement("div");
|
|
1581
1633
|
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);
|
|
1582
1634
|
let c = document.createElement("div");
|
|
1583
1635
|
c.className = "full-viewer-container", c.style.touchAction = "none", this.content.appendChild(c);
|
|
1584
|
-
let l = new
|
|
1585
|
-
l.setCollapsible(!0), o.add(l), this.itemLibrary = /* @__PURE__ */ new Map(), this.folderLibrary = /* @__PURE__ */ new Map(), this.canvasNodes = /* @__PURE__ */ new Map(), this.currentDataList = [], this.
|
|
1586
|
-
i.value = "list", this.showListView(), this.maximizedByFullscreenButton &&= (this.profiler && this.profiler.panel.classList.contains("maximized") && this.profiler.toggleMaximize(), !1), this.saveLastView();
|
|
1636
|
+
let l = new K("User Defined");
|
|
1637
|
+
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
|
+
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();
|
|
1587
1639
|
}), i.addEventListener("change", () => {
|
|
1588
1640
|
let e = i.value;
|
|
1589
1641
|
e === "list" ? this.showListView() : this.showNodeView(e), this.saveLastView();
|
|
@@ -1591,16 +1643,16 @@ var An = class extends wn {
|
|
|
1591
1643
|
let u = (e) => {
|
|
1592
1644
|
if (!this.isDraggingThumbnail || !this.activeSourceCanvas) return;
|
|
1593
1645
|
let t = this.inspector.getRenderer();
|
|
1594
|
-
|
|
1646
|
+
e.isForwarded || (e.stopImmediatePropagation(), e.preventDefault(), this.forwardEvent(e, this.activeSourceCanvas, t.domElement), (e.type === "pointerup" || e.type === "pointercancel") && (this.activePointerIds.delete(e.pointerId), this.activePointerIds.size === 0 && (this.isDraggingThumbnail = !1, this.activeSourceCanvas = null)));
|
|
1595
1647
|
};
|
|
1596
1648
|
window.addEventListener("pointermove", u, !0), window.addEventListener("pointerup", u, !0), window.addEventListener("pointercancel", u, !0);
|
|
1597
1649
|
}
|
|
1598
1650
|
getFolder(e) {
|
|
1599
1651
|
let t = this.folderLibrary.get(e);
|
|
1600
|
-
return t === void 0 && (t = new
|
|
1652
|
+
return t === void 0 && (t = new K(e), t.setCollapsible(!0), this.folderLibrary.set(e, t), this.nodeList.add(t)), t;
|
|
1601
1653
|
}
|
|
1602
1654
|
hide() {
|
|
1603
|
-
super.hide(), this.maximizedByFullscreenButton = !1, this.isDraggingThumbnail = !1, this.activeSourceCanvas = null, this.activePointerIds.clear();
|
|
1655
|
+
super.hide(), this.maximizedByFullscreenButton = !1, this.isDraggingThumbnail = !1, this.activeSourceCanvas = null, this.activePointerIds.clear(), this.splitActive && this.stopSplitMode();
|
|
1604
1656
|
}
|
|
1605
1657
|
addNodeItem(e) {
|
|
1606
1658
|
let t = this.itemLibrary.get(e.id);
|
|
@@ -1609,14 +1661,16 @@ var An = class extends wn {
|
|
|
1609
1661
|
i.className = "node-canvas-wrapper", i.style.position = "relative", i.style.display = "inline-block", i.style.width = "140px", i.style.height = "140px", i.style.touchAction = "none";
|
|
1610
1662
|
let a = document.createElement("button");
|
|
1611
1663
|
a.className = "node-canvas-detach-btn", a.title = "View full size", a.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\"><line x1=\"7\" y1=\"17\" x2=\"17\" y2=\"7\"></line><polyline points=\"7 7 17 7 17 17\"></polyline></svg>", a.onclick = (t) => {
|
|
1612
|
-
t.stopPropagation(), this.select.value = e.id, this.showNodeView(e.id), this.saveLastView();
|
|
1664
|
+
t.stopPropagation(), this.splitActive && this.stopSplitMode(), this.select.value = e.id, this.showNodeView(e.id), this.saveLastView();
|
|
1613
1665
|
};
|
|
1614
1666
|
let o = document.createElement("button");
|
|
1615
|
-
o.className = "node-canvas-fullscreen-btn", o.title = "Fullscreen view", o.innerHTML =
|
|
1616
|
-
t.stopPropagation(), this.
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1667
|
+
o.className = "node-canvas-fullscreen-btn", o.title = "Fullscreen view", o.innerHTML = Fn, o.onclick = (t) => {
|
|
1668
|
+
t.stopPropagation(), this.splitActive && this.splitCanvasData === e && this.splitFullscreen ? this.stopSplitMode() : (this.splitFullscreen = !0, this.startSplitMode(e));
|
|
1669
|
+
};
|
|
1670
|
+
let s = document.createElement("button");
|
|
1671
|
+
s.className = "node-canvas-split-btn", s.title = "Interactive split screen", s.innerHTML = Pn, s.onclick = (t) => {
|
|
1672
|
+
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);
|
|
1620
1674
|
}
|
|
1621
1675
|
return t;
|
|
1622
1676
|
}
|
|
@@ -1672,6 +1726,17 @@ var An = class extends wn {
|
|
|
1672
1726
|
isPrimary: e.isPrimary
|
|
1673
1727
|
}) : new MouseEvent(e.type, f), d.isForwarded = !0, n.dispatchEvent(d);
|
|
1674
1728
|
}
|
|
1729
|
+
init(e) {
|
|
1730
|
+
super.init(e);
|
|
1731
|
+
let t = () => {
|
|
1732
|
+
let t = e.profiler.position, n = t === "top" || t === "bottom";
|
|
1733
|
+
this.setViewMode(n ? "grid" : "list");
|
|
1734
|
+
};
|
|
1735
|
+
e.profiler.addEventListener("resize", t), t();
|
|
1736
|
+
}
|
|
1737
|
+
setViewMode(e) {
|
|
1738
|
+
this.nodeList && (e === "grid" ? this.nodeList.domElement.style.minWidth = "0" : this.nodeList.domElement.style.minWidth = "400px", this.nodeList.setViewMode(e));
|
|
1739
|
+
}
|
|
1675
1740
|
showListView() {
|
|
1676
1741
|
if (this.activeFullNodeId) {
|
|
1677
1742
|
let e = Array.from(this.canvasNodes.values()).find((e) => String(e.id) === String(this.activeFullNodeId));
|
|
@@ -1688,19 +1753,62 @@ var An = class extends wn {
|
|
|
1688
1753
|
t.canvasTarget.setSize(r, i), this.inspector.getRenderer().backend.delete(t.canvasTarget);
|
|
1689
1754
|
}
|
|
1690
1755
|
}
|
|
1756
|
+
get isActive() {
|
|
1757
|
+
return this.splitActive ? !0 : super.isActive;
|
|
1758
|
+
}
|
|
1759
|
+
set isActive(e) {
|
|
1760
|
+
super.isActive = e;
|
|
1761
|
+
}
|
|
1762
|
+
startSplitMode(e) {
|
|
1763
|
+
this.profiler && this.profiler.panel.classList.contains("visible") && this.profiler.togglePanel(), this.splitActive = !0, this.splitCanvasData = e, this.splitX = .5;
|
|
1764
|
+
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 je(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
|
+
else {
|
|
1767
|
+
if (!this.splitOverlay) {
|
|
1768
|
+
let e = document.createElement("div");
|
|
1769
|
+
e.className = "split-screen-overlay three-inspector";
|
|
1770
|
+
let t = document.createElement("div");
|
|
1771
|
+
t.className = "split-screen-line", e.appendChild(t);
|
|
1772
|
+
let r = !1;
|
|
1773
|
+
t.addEventListener("pointerdown", (e) => {
|
|
1774
|
+
r = !0, t.classList.add("active"), e.preventDefault();
|
|
1775
|
+
}), window.addEventListener("pointermove", (e) => {
|
|
1776
|
+
if (!r) return;
|
|
1777
|
+
let i = n.getBoundingClientRect(), a = e.clientX - i.left, o = Math.max(0, Math.min(1, a / i.width));
|
|
1778
|
+
this.splitX = o, t.style.left = `${o * 100}%`, this.splitUniforms && this.splitUniforms.splitX && (this.splitUniforms.splitX.value = o);
|
|
1779
|
+
}), window.addEventListener("pointerup", () => {
|
|
1780
|
+
r = !1, t.classList.remove("active");
|
|
1781
|
+
}), this.splitOverlay = e, this.splitLine = t;
|
|
1782
|
+
}
|
|
1783
|
+
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
|
+
this.splitUniforms ||= {
|
|
1786
|
+
splitX: P(.5),
|
|
1787
|
+
viewportWidth: P(r.width)
|
|
1788
|
+
}, this.splitUniforms.splitX.value = .5, this.splitUniforms.viewportWidth.value = r.width;
|
|
1789
|
+
let c = Ot(I(j(e.node.context({ getUV: () => Vt })), 1), 0, t.outputColorSpace).context({ inspector: !0 }), l;
|
|
1790
|
+
l = this.splitFullscreen ? c : V(() => (Vt.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 ke(this.splitMaterial), this.updateSplitButtonsState();
|
|
1791
|
+
}
|
|
1792
|
+
stopSplitMode() {
|
|
1793
|
+
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
|
+
updateSplitButtonsState() {
|
|
1796
|
+
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 = In, e.fullscreenBtn.title = "Exit Fullscreen", e.splitBtn.classList.remove("active"), e.splitBtn.innerHTML = Pn, e.splitBtn.title = "Interactive split screen") : (e.splitBtn.classList.add("active"), e.splitBtn.innerHTML = In, e.splitBtn.title = "Exit Split Screen", e.fullscreenBtn.classList.remove("active"), e.fullscreenBtn.innerHTML = Fn, e.fullscreenBtn.title = "Fullscreen view") : (e.splitBtn.classList.remove("active"), e.splitBtn.innerHTML = Pn, e.splitBtn.title = "Interactive split screen", e.fullscreenBtn.classList.remove("active"), e.fullscreenBtn.innerHTML = Fn, e.fullscreenBtn.title = "Fullscreen view"));
|
|
1798
|
+
}
|
|
1691
1799
|
getCanvasDataByNode(e, t) {
|
|
1692
1800
|
let n = this.canvasNodes.get(t);
|
|
1693
1801
|
if (n === void 0) {
|
|
1694
|
-
let r = new
|
|
1802
|
+
let r = new je(document.createElement("canvas"));
|
|
1695
1803
|
r.setPixelRatio(window.devicePixelRatio), r.setSize(140, 140);
|
|
1696
|
-
let i = t.id, { path: a, name: o } =
|
|
1697
|
-
let t =
|
|
1804
|
+
let i = t.id, { path: a, name: o } = fn(pn(t.getName() || "(unnamed)")), s = P(1), c = B(1), l = I(j(t.context({ getUV: (e) => {
|
|
1805
|
+
let t = Ln(Vt, e, s), n = t.xy;
|
|
1698
1806
|
return c.assign(t.z), n;
|
|
1699
1807
|
} })), 1).mul(c);
|
|
1700
|
-
l =
|
|
1701
|
-
let u = new
|
|
1808
|
+
l = Ot(l, 0, e.outputColorSpace), l = l.context({ inspector: !0 });
|
|
1809
|
+
let u = new k();
|
|
1702
1810
|
u.outputNode = l;
|
|
1703
|
-
let d = new
|
|
1811
|
+
let d = new ke(u);
|
|
1704
1812
|
d.name = "Viewer - " + o, n = {
|
|
1705
1813
|
id: i,
|
|
1706
1814
|
name: o,
|
|
@@ -1714,33 +1822,39 @@ var An = class extends wn {
|
|
|
1714
1822
|
}
|
|
1715
1823
|
return n;
|
|
1716
1824
|
}
|
|
1717
|
-
update(
|
|
1718
|
-
let
|
|
1719
|
-
if (
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
}
|
|
1825
|
+
update(t) {
|
|
1826
|
+
let n = t.getRenderer();
|
|
1827
|
+
if (this.splitActive) {
|
|
1828
|
+
let t = n.domElement.getBoundingClientRect();
|
|
1829
|
+
if (t.width <= 0 || t.height <= 0) return;
|
|
1830
|
+
let r = document.fullscreenElement || this.profiler.domElement, i = r.getBoundingClientRect(), a = t.left - i.left, o = t.top - i.top;
|
|
1831
|
+
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 D()), 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);
|
|
1834
|
+
}
|
|
1835
|
+
let r = t.getNodes();
|
|
1836
|
+
if (r.length > 0) {
|
|
1837
|
+
if (!n.backend.isWebGPUBackend) return;
|
|
1724
1838
|
this.isVisible || this.show();
|
|
1725
1839
|
}
|
|
1726
1840
|
if (!this.isActive) return;
|
|
1727
|
-
let
|
|
1728
|
-
if (!
|
|
1729
|
-
for (let e = 0; e <
|
|
1730
|
-
|
|
1841
|
+
let i = r.map((e) => this.getCanvasDataByNode(n, e)), a = i.length !== this.currentDataList.length;
|
|
1842
|
+
if (!a) {
|
|
1843
|
+
for (let e = 0; e < i.length; e++) if (i[e].id !== this.currentDataList[e].id) {
|
|
1844
|
+
a = !0;
|
|
1731
1845
|
break;
|
|
1732
1846
|
}
|
|
1733
1847
|
}
|
|
1734
|
-
if (
|
|
1848
|
+
if (a) {
|
|
1735
1849
|
let e = this.select.value;
|
|
1736
1850
|
for (; this.select.options.length > 1;) this.select.remove(1);
|
|
1737
|
-
for (let e of
|
|
1851
|
+
for (let e of i) {
|
|
1738
1852
|
let t = document.createElement("option");
|
|
1739
1853
|
t.value = e.id, t.textContent = e.path ? `${e.path} / ${e.name}` : e.name, this.select.appendChild(t);
|
|
1740
1854
|
}
|
|
1741
1855
|
let t = !1;
|
|
1742
1856
|
if (this.pendingRestoreView) {
|
|
1743
|
-
let e =
|
|
1857
|
+
let e = Un("viewerLastView");
|
|
1744
1858
|
if (e !== "list") {
|
|
1745
1859
|
for (let n = 0; n < this.select.options.length; n++) if (this.select.options[n].textContent === e) {
|
|
1746
1860
|
this.select.selectedIndex = n;
|
|
@@ -1760,54 +1874,59 @@ var An = class extends wn {
|
|
|
1760
1874
|
}
|
|
1761
1875
|
}
|
|
1762
1876
|
if (this.activeFullNodeId) {
|
|
1763
|
-
let e =
|
|
1877
|
+
let e = i.find((e) => String(e.id) === String(this.activeFullNodeId));
|
|
1764
1878
|
if (e) {
|
|
1765
|
-
let
|
|
1766
|
-
(e.canvasTarget.domElement.width !== r || e.canvasTarget.domElement.height !== i) && (e.canvasTarget.setSize(r, i),
|
|
1879
|
+
let t = this.fullViewerContainer.getBoundingClientRect(), r = t.width || this.content.clientWidth, i = t.height || this.content.clientHeight - 38;
|
|
1880
|
+
(e.canvasTarget.domElement.width !== r || e.canvasTarget.domElement.height !== i) && (e.canvasTarget.setSize(r, i), n.backend.delete(e.canvasTarget));
|
|
1767
1881
|
}
|
|
1768
1882
|
}
|
|
1769
|
-
let
|
|
1770
|
-
for (let e of
|
|
1883
|
+
let o = [...this.currentDataList];
|
|
1884
|
+
for (let e of o) if (this.itemLibrary.has(e.id) && i.indexOf(e) === -1) {
|
|
1771
1885
|
let t = this.itemLibrary.get(e.id), n = t.parent;
|
|
1772
1886
|
n.remove(t), this.folderLibrary.has(n.data[0]) && n.children.length === 0 && (n.parent.remove(n), this.folderLibrary.delete(n.data[0])), this.itemLibrary.delete(e.id);
|
|
1773
1887
|
}
|
|
1774
|
-
let
|
|
1775
|
-
for (let
|
|
1776
|
-
let
|
|
1777
|
-
if (
|
|
1778
|
-
let e = this.getFolder(
|
|
1779
|
-
|
|
1780
|
-
} else
|
|
1781
|
-
let
|
|
1782
|
-
|
|
1888
|
+
let s = {};
|
|
1889
|
+
for (let t of i) {
|
|
1890
|
+
let r = this.addNodeItem(t), i = n.getCanvasTarget(), a = t.path;
|
|
1891
|
+
if (a) {
|
|
1892
|
+
let e = this.getFolder(a);
|
|
1893
|
+
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
|
+
} else r.parent || this.nodes.add(r);
|
|
1895
|
+
let o = [], c = i.getDrawingBufferSize(Nn);
|
|
1896
|
+
t.node.traverse((e) => {
|
|
1783
1897
|
if (e.isRTTNode && e.autoResize === !0) {
|
|
1784
1898
|
let t = e.width, n = e.height;
|
|
1785
|
-
e.width =
|
|
1899
|
+
e.width = c.width, e.height = c.height, e.setSize(c.width, c.height), o.push({
|
|
1786
1900
|
node: e,
|
|
1787
1901
|
oldWidth: t,
|
|
1788
1902
|
oldHeight: n
|
|
1789
1903
|
});
|
|
1790
1904
|
}
|
|
1791
1905
|
});
|
|
1792
|
-
let
|
|
1793
|
-
|
|
1794
|
-
for (let e of
|
|
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);
|
|
1908
|
+
for (let e of o) e.node.width = e.oldWidth, e.node.height = e.oldHeight;
|
|
1795
1909
|
}
|
|
1796
|
-
this.currentDataList =
|
|
1910
|
+
this.currentDataList = i;
|
|
1797
1911
|
}
|
|
1798
1912
|
setActive(e) {
|
|
1799
1913
|
super.setActive(e);
|
|
1800
1914
|
}
|
|
1801
1915
|
saveLastView() {
|
|
1802
|
-
if (this.select.value === "list")
|
|
1916
|
+
if (this.select.value === "list") Wn("viewerLastView", "list");
|
|
1803
1917
|
else {
|
|
1804
1918
|
let e = this.select.options[this.select.selectedIndex];
|
|
1805
|
-
e &&
|
|
1919
|
+
e && Wn("viewerLastView", e.textContent);
|
|
1806
1920
|
}
|
|
1807
1921
|
}
|
|
1808
|
-
|
|
1922
|
+
dispose() {
|
|
1923
|
+
this.splitActive && this.stopSplitMode(), this.splitCanvas &&= (this.splitCanvas.parentElement && this.splitCanvas.parentElement.removeChild(this.splitCanvas), null), this.splitCanvasTarget &&= (this.splitCanvasTarget.dispose(), null), this.splitMaterial &&= (this.splitMaterial.dispose(), null);
|
|
1924
|
+
for (let e of this.canvasNodes.values()) e.canvasTarget.dispose(), e.material.dispose();
|
|
1925
|
+
this.canvasNodes.clear(), super.dispose();
|
|
1926
|
+
}
|
|
1927
|
+
}, zn = 500, Bn = 60, Vn = class extends un {
|
|
1809
1928
|
constructor(e = {}) {
|
|
1810
|
-
super("Timeline", e), this.content.style.overflow = "hidden", this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.
|
|
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 cn(zn), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )"), this.buildHeader(), this.buildUI(), window.addEventListener("resize", () => {
|
|
1811
1930
|
this.isActive && !this.isRecording && this.frames.length > 0 && this.renderSlider();
|
|
1812
1931
|
});
|
|
1813
1932
|
}
|
|
@@ -1830,8 +1949,8 @@ var An = class extends wn {
|
|
|
1830
1949
|
r.value = "counts", r.textContent = "Count", this.viewModeSelect.appendChild(r), this.viewModeSelect.value = this.isHierarchicalView ? "hierarchy" : "counts", this.viewModeSelect.addEventListener("change", () => {
|
|
1831
1950
|
this.isHierarchicalView = this.viewModeSelect.value === "hierarchy", this.selectedFrameIndex !== void 0 && this.selectedFrameIndex !== -1 && this.selectFrame(this.selectedFrameIndex);
|
|
1832
1951
|
}), this.recordRefreshButton = document.createElement("button"), this.recordRefreshButton.className = "console-copy-button", this.recordRefreshButton.title = "Refresh & Record", this.recordRefreshButton.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\"></path><path d=\"M21 3v5h-5\"></path><circle cx=\"12\" cy=\"12\" r=\"3\" fill=\"currentColor\"></circle></svg>", this.recordRefreshButton.style.padding = "0 10px", this.recordRefreshButton.style.lineHeight = "24px", this.recordRefreshButton.style.display = "flex", this.recordRefreshButton.style.alignItems = "center", this.recordRefreshButton.addEventListener("click", () => {
|
|
1833
|
-
let e =
|
|
1834
|
-
e.recording = !0,
|
|
1952
|
+
let e = Un("timeline");
|
|
1953
|
+
e.recording = !0, Wn("timeline", e), window.location.reload();
|
|
1835
1954
|
}), this.exportButton = document.createElement("button"), this.exportButton.className = "console-copy-button", this.exportButton.title = "Export", this.exportButton.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path><polyline points=\"7 10 12 15 17 10\"></polyline><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line></svg>", this.exportButton.style.padding = "0 10px", this.exportButton.style.lineHeight = "24px", this.exportButton.style.display = "flex", this.exportButton.style.alignItems = "center", this.exportButton.addEventListener("click", () => this.exportData());
|
|
1836
1955
|
let i = document.createElement("div");
|
|
1837
1956
|
i.className = "console-buttons-group", i.appendChild(this.recordButton), i.appendChild(this.recordRefreshButton), i.appendChild(this.exportButton), i.appendChild(t);
|
|
@@ -1909,12 +2028,14 @@ var An = class extends wn {
|
|
|
1909
2028
|
r = !1, this.isManualScrubbing = !1;
|
|
1910
2029
|
}), e.appendChild(t);
|
|
1911
2030
|
let a = document.createElement("div");
|
|
1912
|
-
a.style.flex = "1", a.style.display = "flex", a.style.flexDirection = "column", a.style.overflow = "hidden", this.timelineTrack = document.createElement("div"), this.timelineTrack.style.flex = "1", this.timelineTrack.style.overflowY = "auto", this.timelineTrack.style.margin = "10px", this.timelineTrack.style.marginTop = "8px", this.timelineTrack.style.backgroundColor = "var(--background-color)", a.appendChild(this.timelineTrack),
|
|
2031
|
+
a.style.flex = "1", a.style.display = "flex", a.style.flexDirection = "column", a.style.overflow = "hidden", this.timelineTrack = document.createElement("div"), this.timelineTrack.style.flex = "1", this.timelineTrack.style.overflowY = "auto", this.timelineTrack.style.margin = "10px", this.timelineTrack.style.marginTop = "8px", this.timelineTrack.style.backgroundColor = "var(--background-color)", this.timelineTrack.style.position = "relative", a.appendChild(this.timelineTrack), this.timelineContent = document.createElement("div"), this.timelineContent.style.position = "relative", this.timelineContent.style.width = "100%", this.timelineTrack.appendChild(this.timelineContent), this.timelineTrack.addEventListener("scroll", () => {
|
|
2032
|
+
!this.isRecording && this.frames.length > 0 && this.updateVisibleBlocks();
|
|
2033
|
+
}), e.appendChild(a), this.content.appendChild(e);
|
|
1913
2034
|
}
|
|
1914
2035
|
setRenderer(e) {
|
|
1915
2036
|
this.renderer = e;
|
|
1916
|
-
let t =
|
|
1917
|
-
t.recording && (t.recording = !1,
|
|
2037
|
+
let t = Un("timeline");
|
|
2038
|
+
t.recording && (t.recording = !1, Wn("timeline", t), this.toggleRecording());
|
|
1918
2039
|
}
|
|
1919
2040
|
toggleRecording() {
|
|
1920
2041
|
if (!this.renderer) {
|
|
@@ -1944,7 +2065,7 @@ var An = class extends wn {
|
|
|
1944
2065
|
for (let t = 0; t < n.length; t++) n[t] *= e;
|
|
1945
2066
|
}
|
|
1946
2067
|
}
|
|
1947
|
-
let t = this.baseTriangles > 0 ? e / this.baseTriangles *
|
|
2068
|
+
let t = this.baseTriangles > 0 ? e / this.baseTriangles * Bn : 0;
|
|
1948
2069
|
this.graph.addPoint("calls", this.currentFrame.calls.length), this.graph.addPoint("fps", this.currentFrame.fps), this.graph.addPoint("triangles", t), this.graph.update();
|
|
1949
2070
|
}
|
|
1950
2071
|
this.currentFrame = {
|
|
@@ -1952,7 +2073,7 @@ var An = class extends wn {
|
|
|
1952
2073
|
calls: [],
|
|
1953
2074
|
fps: 0,
|
|
1954
2075
|
triangles: 0
|
|
1955
|
-
}, this.frames.push(this.currentFrame), this.frames.length >
|
|
2076
|
+
}, this.frames.push(this.currentFrame), this.frames.length > zn && this.frames.shift();
|
|
1956
2077
|
}
|
|
1957
2078
|
let a = {
|
|
1958
2079
|
method: n,
|
|
@@ -1970,56 +2091,56 @@ var An = class extends wn {
|
|
|
1970
2091
|
}
|
|
1971
2092
|
}
|
|
1972
2093
|
clear() {
|
|
1973
|
-
this.frames = [], this.
|
|
2094
|
+
this.frames = [], this.clearActiveBlocks(), this.timelineContent.innerHTML = "", this.timelineContent.style.height = "0px", this.playhead.style.display = "none", this.frameInfo.textContent = "", this.baseTriangles = 0, this.graph.lines.calls.points = [], this.graph.lines.fps.points = [], this.graph.lines.triangles.points = [], this.graph.resetLimit(), this.graph.update();
|
|
1974
2095
|
}
|
|
1975
2096
|
exportData() {
|
|
1976
2097
|
if (this.frames.length === 0) return;
|
|
1977
2098
|
let e = JSON.stringify(this.frames, null, " "), t = new Blob([e], { type: "application/json" }), n = URL.createObjectURL(t), r = document.createElement("a");
|
|
1978
2099
|
r.href = n, r.download = "threejs-timeline.json", r.click(), URL.revokeObjectURL(n);
|
|
1979
2100
|
}
|
|
1980
|
-
getRenderTargetDetails(
|
|
1981
|
-
let
|
|
2101
|
+
getRenderTargetDetails(e) {
|
|
2102
|
+
let r = e.textures, i = [], a = (e) => {
|
|
1982
2103
|
switch (e.type) {
|
|
1983
|
-
case
|
|
1984
|
-
case
|
|
1985
|
-
case
|
|
2104
|
+
case w:
|
|
2105
|
+
case y: return "8";
|
|
2106
|
+
case g:
|
|
2107
|
+
case de:
|
|
2108
|
+
case ne:
|
|
2109
|
+
case u:
|
|
2110
|
+
case n: return "16";
|
|
2111
|
+
case p:
|
|
1986
2112
|
case pe:
|
|
1987
|
-
case
|
|
2113
|
+
case S:
|
|
1988
2114
|
case me:
|
|
1989
|
-
case
|
|
1990
|
-
case
|
|
1991
|
-
case ue:
|
|
1992
|
-
case b:
|
|
1993
|
-
case te:
|
|
1994
|
-
case v:
|
|
1995
|
-
case x: return "32";
|
|
2115
|
+
case ee:
|
|
2116
|
+
case ue: return "32";
|
|
1996
2117
|
default: return "?";
|
|
1997
2118
|
}
|
|
1998
|
-
},
|
|
1999
|
-
switch (
|
|
2000
|
-
case
|
|
2001
|
-
case
|
|
2002
|
-
case
|
|
2003
|
-
case
|
|
2004
|
-
case
|
|
2119
|
+
}, c = (e) => {
|
|
2120
|
+
switch (e.format) {
|
|
2121
|
+
case ce: return "a";
|
|
2122
|
+
case t:
|
|
2123
|
+
case re: return "r";
|
|
2124
|
+
case fe:
|
|
2125
|
+
case f: return "rg";
|
|
2126
|
+
case T:
|
|
2127
|
+
case te: return "rgb";
|
|
2128
|
+
case ie: return "depth";
|
|
2129
|
+
case o: return "depth-stencil";
|
|
2130
|
+
case s:
|
|
2005
2131
|
case oe:
|
|
2006
|
-
case S: return "rgb";
|
|
2007
|
-
case se: return "depth";
|
|
2008
|
-
case s: return "depth-stencil";
|
|
2009
|
-
case o:
|
|
2010
|
-
case l:
|
|
2011
2132
|
default: return "rgba";
|
|
2012
2133
|
}
|
|
2013
2134
|
};
|
|
2014
|
-
for (let e = 0; e <
|
|
2015
|
-
let t =
|
|
2016
|
-
t.name && !(t.isDepthTexture && t.name === "depth") && (s += ` ${t.name}`), s += ` ${o} ${
|
|
2135
|
+
for (let e = 0; e < r.length; e++) {
|
|
2136
|
+
let t = r[e], n = a(t), o = c(t), s = `[${e}]`;
|
|
2137
|
+
t.name && !(t.isDepthTexture && t.name === "depth") && (s += ` ${t.name}`), s += ` ${o} ${n} bpc`, i.push(s);
|
|
2017
2138
|
}
|
|
2018
|
-
let
|
|
2019
|
-
target:
|
|
2020
|
-
[`attachments(${
|
|
2139
|
+
let l = {
|
|
2140
|
+
target: e.name || "RenderTarget",
|
|
2141
|
+
[`attachments(${r.length})`]: "\n" + i.join("\n")
|
|
2021
2142
|
};
|
|
2022
|
-
return
|
|
2143
|
+
return e.depthTexture && (l.depth = `${a(e.depthTexture)} bpc`), l;
|
|
2023
2144
|
}
|
|
2024
2145
|
getCallDetail(e, t) {
|
|
2025
2146
|
switch (e) {
|
|
@@ -2201,8 +2322,8 @@ var An = class extends wn {
|
|
|
2201
2322
|
}
|
|
2202
2323
|
formatDetails(e) {
|
|
2203
2324
|
let t = [];
|
|
2204
|
-
for (let n in e) e[n] !== void 0 && t.push(`<span
|
|
2205
|
-
return t.length === 0 ? "" : `<span
|
|
2325
|
+
for (let n in e) e[n] !== void 0 && t.push(`<span class="timeline-detail-key">${n}:</span> <span class="timeline-detail-value">${e[n]}</span>`);
|
|
2326
|
+
return t.length === 0 ? "" : `<span class="timeline-detail-block">{ ${t.join("<span class=\"timeline-detail-sep\">, </span>")} }</span>`;
|
|
2206
2327
|
}
|
|
2207
2328
|
renderSlider() {
|
|
2208
2329
|
if (this.frames.length === 0) {
|
|
@@ -2218,7 +2339,7 @@ var An = class extends wn {
|
|
|
2218
2339
|
r > t && (t = r);
|
|
2219
2340
|
}
|
|
2220
2341
|
for (let n = 0; n < e.length; n++) {
|
|
2221
|
-
let r = e[n].triangles || 0, i = t > 0 ? r / t *
|
|
2342
|
+
let r = e[n].triangles || 0, i = t > 0 ? r / t * Bn : 0;
|
|
2222
2343
|
this.graph.addPoint("calls", e[n].calls.length), this.graph.addPoint("fps", e[n].fps || 0), this.graph.addPoint("triangles", i);
|
|
2223
2344
|
}
|
|
2224
2345
|
this.graph.update(), this.playhead.style.display = "block";
|
|
@@ -2230,8 +2351,8 @@ var An = class extends wn {
|
|
|
2230
2351
|
this.selectedFrameIndex = e;
|
|
2231
2352
|
let t = this.frames[e];
|
|
2232
2353
|
this.renderTimelineTrack(t);
|
|
2233
|
-
let n = this.
|
|
2234
|
-
this.frameInfo.innerHTML = r + t.id + s("
|
|
2354
|
+
let n = this.content.offsetWidth < 800, r = n ? "" : "Frame: ", i = n ? "" : " FPS", a = n ? "" : " calls", o = n ? "" : " triangles", s = (e, t) => `<span class="timeline-info-group"><span class="timeline-info-dot ${e}"></span>${t}</span>`, c = Math.max(this.baseTriangles, t.triangles || 0), l = n ? t.triangles || 0 : (t.triangles || 0) + " / " + c + o;
|
|
2355
|
+
this.frameInfo.innerHTML = r + t.id + s("fps", (t.fps || 0).toFixed(1) + i) + s("call", t.calls.length + a) + s("red", l);
|
|
2235
2356
|
let u = this.graphSlider.getBoundingClientRect(), d = this.graph.lines.calls.points.length;
|
|
2236
2357
|
if (d > 0) {
|
|
2237
2358
|
let t = u.width / (this.graph.maxPoints - 1), n = e;
|
|
@@ -2240,114 +2361,141 @@ var An = class extends wn {
|
|
|
2240
2361
|
r = Math.max(1, Math.min(r, u.width - 1)), this.playhead.style.left = r + "px", this.playhead.style.display = "block";
|
|
2241
2362
|
}
|
|
2242
2363
|
}
|
|
2243
|
-
|
|
2244
|
-
let
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
} else i = this.fallbackBlocks[t];
|
|
2249
|
-
return i || (i = document.createElement("div"), i.style.display = "flex", i.style.alignItems = "center", i.style.padding = "4px 8px", i.style.margin = "2px 0", i.style.backgroundColor = "rgba(255, 255, 255, 0.03)", i.style.fontFamily = "monospace", i.style.fontSize = "12px", i.style.color = "var(--text-primary)", i.style.overflow = "hidden", i.arrow = document.createElement("span"), i.arrow.style.fontSize = "10px", i.arrow.style.marginRight = "8px", i.arrow.style.cursor = "pointer", i.arrow.style.width = "35px", i.arrow.style.textAlign = "center", i.arrow.style.flexShrink = "0", i.arrow.style.whiteSpace = "nowrap", i.appendChild(i.arrow), i.titleSpan = document.createElement("span"), i.titleSpan.style.flex = "1", i.titleSpan.style.minWidth = "0", i.titleSpan.style.overflow = "hidden", i.titleSpan.style.textOverflow = "ellipsis", i.titleSpan.style.whiteSpace = "nowrap", i.appendChild(i.titleSpan), i.addEventListener("click", (e) => {
|
|
2250
|
-
i._groupId && (e.stopPropagation(), this.collapsedGroups.has(i._groupId) ? this.collapsedGroups.delete(i._groupId) : this.collapsedGroups.add(i._groupId), this.renderTimelineTrack(this.frames[this.selectedFrameIndex]));
|
|
2251
|
-
}), r && typeof r == "object" ? this.callBlocks.get(r)[n] = i : this.fallbackBlocks[t] = i), i.style.cursor = "default", i._groupId = null, i.arrow.style.display = "none", i;
|
|
2364
|
+
createBlock() {
|
|
2365
|
+
let e = document.createElement("div");
|
|
2366
|
+
return e.style.display = "flex", e.style.alignItems = "center", e.style.padding = "4px 8px", e.style.backgroundColor = "rgba(255, 255, 255, 0.03)", e.style.fontFamily = "monospace", e.style.fontSize = "12px", e.style.color = "var(--text-primary)", e.style.overflow = "hidden", e.style.position = "absolute", e.style.left = "0", e.style.right = "0", e.style.height = "24px", e.style.boxSizing = "border-box", e.arrow = document.createElement("span"), e.arrow.style.fontSize = "10px", e.arrow.style.marginRight = "8px", e.arrow.style.cursor = "pointer", e.arrow.style.width = "35px", e.arrow.style.textAlign = "center", e.arrow.style.flexShrink = "0", e.arrow.style.whiteSpace = "nowrap", e.appendChild(e.arrow), e.titleSpan = document.createElement("span"), e.titleSpan.style.flex = "1", e.titleSpan.style.minWidth = "0", e.titleSpan.style.overflow = "hidden", e.titleSpan.style.textOverflow = "ellipsis", e.titleSpan.style.whiteSpace = "nowrap", e.appendChild(e.titleSpan), e.addEventListener("click", (t) => {
|
|
2367
|
+
e._groupId && (t.stopPropagation(), this.collapsedGroups.has(e._groupId) ? this.collapsedGroups.delete(e._groupId) : this.collapsedGroups.add(e._groupId), this.renderTimelineTrack(this.frames[this.selectedFrameIndex]));
|
|
2368
|
+
}), e;
|
|
2252
2369
|
}
|
|
2253
|
-
|
|
2254
|
-
if (this.
|
|
2255
|
-
|
|
2256
|
-
this.
|
|
2370
|
+
clearActiveBlocks() {
|
|
2371
|
+
if (this.activeBlocks) {
|
|
2372
|
+
for (let e of this.activeBlocks.values()) e.remove(), this.domPool.push(e);
|
|
2373
|
+
this.activeBlocks.clear();
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
updateVisibleBlocks() {
|
|
2377
|
+
if (!this.flatList || this.flatList.length === 0) {
|
|
2378
|
+
this.clearActiveBlocks();
|
|
2257
2379
|
return;
|
|
2258
2380
|
}
|
|
2259
|
-
this.
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2381
|
+
let e = this.timelineTrack.scrollTop, t = this.timelineTrack.clientHeight, n = Math.floor(e / 26) - 5, r = Math.ceil((e + t) / 26) + 5;
|
|
2382
|
+
n = Math.max(0, n), r = Math.min(this.flatList.length - 1, r);
|
|
2383
|
+
let i = /* @__PURE__ */ new Map();
|
|
2384
|
+
for (let [e, t] of this.activeBlocks.entries()) e < n || e > r ? (t.remove(), this.domPool.push(t)) : i.set(e, t);
|
|
2385
|
+
this.activeBlocks = i;
|
|
2386
|
+
for (let e = n; e <= r; e++) {
|
|
2387
|
+
let t = this.activeBlocks.get(e);
|
|
2388
|
+
t || (t = this.domPool.pop() || this.createBlock(), this.timelineContent.appendChild(t), this.activeBlocks.set(e, t));
|
|
2389
|
+
let n = this.flatList[e], r = n.call;
|
|
2390
|
+
t.style.top = e * 26 + "px", t.style.marginLeft = n.indent * 24 + "px", t.style.borderLeft = "4px solid " + this.getColorForMethod(r.method), t._groupId = n.groupId;
|
|
2391
|
+
let i = t.querySelector(":scope > .info-icon");
|
|
2392
|
+
i && i.remove(), t.titleSpan.textContent = "";
|
|
2393
|
+
let a = document.createElement("span");
|
|
2394
|
+
if (a.textContent = r.method, t.titleSpan.appendChild(a), r.details) {
|
|
2395
|
+
let e = `### ${r.method}\n`;
|
|
2396
|
+
for (let t in r.details) r.details[t] !== void 0 && (e += `**${t}**: ${r.details[t]}\n`);
|
|
2397
|
+
let n = mn(t.titleSpan, e);
|
|
2398
|
+
n.style.flexShrink = "0", n.style.marginLeft = "6px", n.style.display = "inline-flex", n.style.verticalAlign = "middle";
|
|
2272
2399
|
}
|
|
2273
|
-
let
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
let
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2400
|
+
let o = document.createElement("span"), s = r.formatedDetails ? r.formatedDetails : "";
|
|
2401
|
+
r.count > 1 && (s += ` <span class="timeline-call-count">( ${r.count} )</span>`), s && (o.innerHTML = s, t.titleSpan.appendChild(o)), n.groupId ? (t.style.cursor = "pointer", t.arrow.style.display = "inline-block", t.arrow.textContent = n.isCollapsed ? "[ + ]" : "[ - ]") : (t.style.cursor = "default", t.arrow.style.display = "none");
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
renderTimelineTrack(e) {
|
|
2405
|
+
if (!this.isRecording) {
|
|
2406
|
+
if (this.flatList = [], !e || e.calls.length === 0) {
|
|
2407
|
+
this.clearActiveBlocks(), this.timelineContent.innerHTML = "", this.timelineContent.style.height = "0px";
|
|
2408
|
+
return;
|
|
2409
|
+
}
|
|
2410
|
+
if (this.collapsedGroups ||= /* @__PURE__ */ new Set(), this.isHierarchicalView) {
|
|
2411
|
+
let t = [], n = null;
|
|
2412
|
+
for (let r = 0; r < e.calls.length; r++) {
|
|
2413
|
+
let i = e.calls[r], a = i.method.startsWith("begin") || i.method.startsWith("finish"), o = i.details ? this.formatDetails(i.details) : "";
|
|
2414
|
+
n && n.method === i.method && n.formatedDetails === o && !a ? n.count++ : (n = {
|
|
2415
|
+
method: i.method,
|
|
2416
|
+
count: 1,
|
|
2417
|
+
formatedDetails: o,
|
|
2418
|
+
target: i.target,
|
|
2419
|
+
details: i.details
|
|
2420
|
+
}, t.push(n));
|
|
2292
2421
|
}
|
|
2293
|
-
let
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2422
|
+
let r = 0, i = [{
|
|
2423
|
+
isCollapsed: !1,
|
|
2424
|
+
id: "",
|
|
2425
|
+
beginCount: 0
|
|
2426
|
+
}], a = /* @__PURE__ */ new WeakMap();
|
|
2427
|
+
for (let e = 0; e < t.length; e++) {
|
|
2428
|
+
let n = t[e], o = 0;
|
|
2429
|
+
n.target && typeof n.target == "object" && (o = a.get(n.target) || 0, a.set(n.target, o + 1));
|
|
2430
|
+
let s = i[i.length - 1], c = null, l = !1;
|
|
2431
|
+
if (n.method.startsWith("begin")) {
|
|
2432
|
+
let e = s.beginCount++;
|
|
2433
|
+
c = s.id + "/" + n.method + "-" + e, l = this.collapsedGroups.has(c);
|
|
2434
|
+
}
|
|
2435
|
+
s.isCollapsed || this.flatList.push({
|
|
2436
|
+
call: n,
|
|
2437
|
+
indent: r,
|
|
2438
|
+
groupId: c,
|
|
2439
|
+
isCollapsed: l,
|
|
2440
|
+
instanceIndex: o
|
|
2441
|
+
}), n.method.startsWith("begin") ? (r++, i.push({
|
|
2442
|
+
isCollapsed: s.isCollapsed || l,
|
|
2443
|
+
id: c,
|
|
2302
2444
|
beginCount: 0
|
|
2445
|
+
})) : n.method.startsWith("finish") && (r = Math.max(0, r - 1), i.pop());
|
|
2446
|
+
}
|
|
2447
|
+
} else {
|
|
2448
|
+
let t = {};
|
|
2449
|
+
for (let n = 0; n < e.calls.length; n++) {
|
|
2450
|
+
let r = e.calls[n].method;
|
|
2451
|
+
r.startsWith("finish") || (t[r] = (t[r] || 0) + 1);
|
|
2452
|
+
}
|
|
2453
|
+
let n = Object.keys(t).map((e) => ({
|
|
2454
|
+
method: e,
|
|
2455
|
+
count: t[e]
|
|
2456
|
+
}));
|
|
2457
|
+
n.sort((e, t) => t.count - e.count);
|
|
2458
|
+
for (let e = 0; e < n.length; e++) {
|
|
2459
|
+
let t = n[e];
|
|
2460
|
+
this.flatList.push({
|
|
2461
|
+
call: t,
|
|
2462
|
+
indent: 0,
|
|
2463
|
+
groupId: null,
|
|
2464
|
+
isCollapsed: !1,
|
|
2465
|
+
instanceIndex: 0
|
|
2303
2466
|
});
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
} else {
|
|
2307
|
-
let i = {};
|
|
2308
|
-
for (let t = 0; t < e.calls.length; t++) {
|
|
2309
|
-
let n = e.calls[t].method;
|
|
2310
|
-
n.startsWith("finish") || (i[n] = (i[n] || 0) + 1);
|
|
2311
|
-
}
|
|
2312
|
-
let a = Object.keys(i).map((e) => ({
|
|
2313
|
-
method: e,
|
|
2314
|
-
count: i[e]
|
|
2315
|
-
}));
|
|
2316
|
-
a.sort((e, t) => t.count - e.count);
|
|
2317
|
-
for (let e = 0; e < a.length; e++) {
|
|
2318
|
-
let i = a[e], o = this.getCallBlock(i, t++);
|
|
2319
|
-
o.style.marginLeft = "0px", o.style.borderLeft = "4px solid " + this.getColorForMethod(i.method);
|
|
2320
|
-
let s = o.querySelector(".info-icon");
|
|
2321
|
-
s && s.remove(), o.titleSpan.innerHTML = i.method + (i.count > 1 ? ` <span style="opacity: 0.5">( ${i.count} )</span>` : ""), n[r] !== o && this.timelineTrack.insertBefore(o, n[r]), r++;
|
|
2467
|
+
}
|
|
2322
2468
|
}
|
|
2469
|
+
this.timelineContent.style.height = this.flatList.length * 26 + "px", this.updateVisibleBlocks();
|
|
2323
2470
|
}
|
|
2324
|
-
for (; this.timelineTrack.children.length > r;) this.timelineTrack.removeChild(this.timelineTrack.lastChild);
|
|
2325
2471
|
}
|
|
2326
2472
|
getColorForMethod(e) {
|
|
2327
2473
|
return e.startsWith("begin") ? "var(--color-green)" : e.startsWith("finish") || e.startsWith("destroy") ? "var(--color-red)" : e.startsWith("draw") || e.startsWith("compute") || e.startsWith("create") || e.startsWith("generate") ? "var(--color-yellow)" : "var(--text-secondary)";
|
|
2328
2474
|
}
|
|
2329
|
-
},
|
|
2330
|
-
constructor() {
|
|
2475
|
+
}, Hn = class extends on {
|
|
2476
|
+
constructor(e = {}) {
|
|
2331
2477
|
super();
|
|
2332
|
-
let
|
|
2333
|
-
|
|
2334
|
-
let
|
|
2478
|
+
let { nonce: t = null } = e;
|
|
2479
|
+
this.nonce = t;
|
|
2480
|
+
let n = new ln(this, e);
|
|
2481
|
+
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 En({
|
|
2335
2483
|
builtin: !0,
|
|
2336
2484
|
icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 6l8 0\" /><path d=\"M16 6l4 0\" /><path d=\"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 12l2 0\" /><path d=\"M10 12l10 0\" /><path d=\"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 18l11 0\" /><path d=\"M19 18l1 0\" /></svg>"
|
|
2337
2485
|
});
|
|
2338
|
-
|
|
2339
|
-
let
|
|
2340
|
-
|
|
2341
|
-
let
|
|
2342
|
-
|
|
2343
|
-
let
|
|
2344
|
-
|
|
2345
|
-
let
|
|
2346
|
-
|
|
2347
|
-
let
|
|
2348
|
-
|
|
2349
|
-
let
|
|
2350
|
-
|
|
2486
|
+
r.hide(), n.addTab(r);
|
|
2487
|
+
let i = new Rn();
|
|
2488
|
+
i.hide(), n.addTab(i);
|
|
2489
|
+
let a = new hn();
|
|
2490
|
+
n.addTab(a);
|
|
2491
|
+
let o = new gn();
|
|
2492
|
+
n.addTab(o);
|
|
2493
|
+
let s = new Vn();
|
|
2494
|
+
n.addTab(s);
|
|
2495
|
+
let c = new _n();
|
|
2496
|
+
n.addTab(c);
|
|
2497
|
+
let l = new Mn();
|
|
2498
|
+
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 = {
|
|
2351
2499
|
text: {
|
|
2352
2500
|
needsUpdate: !1,
|
|
2353
2501
|
duration: .25,
|
|
@@ -2368,6 +2516,9 @@ var An = class extends wn {
|
|
|
2368
2516
|
get domElement() {
|
|
2369
2517
|
return this.profiler.domElement;
|
|
2370
2518
|
}
|
|
2519
|
+
isVertical() {
|
|
2520
|
+
return this.profiler ? this.profiler.isVertical() : !1;
|
|
2521
|
+
}
|
|
2371
2522
|
onExtension(e, t) {
|
|
2372
2523
|
let n = (r) => {
|
|
2373
2524
|
r.name === e && (t(r.tab), this.settings.removeEventListener("extensionadded", n));
|
|
@@ -2380,17 +2531,29 @@ var An = class extends wn {
|
|
|
2380
2531
|
show() {
|
|
2381
2532
|
this.profiler.show();
|
|
2382
2533
|
}
|
|
2534
|
+
setVisible(e) {
|
|
2535
|
+
return this.domElement.style.display = e ? "" : "none", this;
|
|
2536
|
+
}
|
|
2537
|
+
getVisible() {
|
|
2538
|
+
return this.domElement.style.display !== "none";
|
|
2539
|
+
}
|
|
2383
2540
|
getSize() {
|
|
2384
2541
|
return this.profiler.getSize();
|
|
2385
2542
|
}
|
|
2386
2543
|
setActiveTab(e) {
|
|
2387
2544
|
return this.profiler.setActiveTab(e.id), this;
|
|
2388
2545
|
}
|
|
2546
|
+
setHorizontalAlign(e) {
|
|
2547
|
+
return this.profiler.setHorizontalAlign(e), this;
|
|
2548
|
+
}
|
|
2549
|
+
setVerticalAlign(e) {
|
|
2550
|
+
return this.profiler.setVerticalAlign(e), this;
|
|
2551
|
+
}
|
|
2389
2552
|
addTab(e) {
|
|
2390
2553
|
return this.profiler.addTab(e), this;
|
|
2391
2554
|
}
|
|
2392
2555
|
removeTab(e) {
|
|
2393
|
-
return this.profiler.removeTab(e), this;
|
|
2556
|
+
return e.dispose(), this.profiler.removeTab(e), this;
|
|
2394
2557
|
}
|
|
2395
2558
|
setActiveExtension(e, t) {
|
|
2396
2559
|
return this.settings.setActiveExtension(e, t), this;
|
|
@@ -2412,23 +2575,25 @@ var An = class extends wn {
|
|
|
2412
2575
|
break;
|
|
2413
2576
|
}
|
|
2414
2577
|
}
|
|
2415
|
-
init() {
|
|
2416
|
-
let e = this.getRenderer(), t = "THREE.WebGPURenderer: 185 [ \"";
|
|
2417
|
-
if (e.backend.isWebGPUBackend ? t += "WebGPU" : e.backend.isWebGLBackend && (t += "WebGL2"), t += "\" ]", this.console.addMessage("info", t), e.inspector.domElement.parentElement === null) if (e.domElement.parentElement !== null) e.domElement.parentElement.appendChild(e.inspector.domElement);
|
|
2418
|
-
else {
|
|
2419
|
-
let t = new MutationObserver(() => {
|
|
2420
|
-
e.domElement.parentElement !== null && (e.domElement.parentElement.appendChild(e.inspector.domElement), t.disconnect());
|
|
2421
|
-
});
|
|
2422
|
-
t.observe(document.body || document.documentElement, {
|
|
2423
|
-
childList: !0,
|
|
2424
|
-
subtree: !0
|
|
2425
|
-
});
|
|
2426
|
-
}
|
|
2427
|
-
}
|
|
2428
2578
|
setRenderer(e) {
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2579
|
+
if (super.setRenderer(e), e !== null) {
|
|
2580
|
+
let t = h();
|
|
2581
|
+
this.previousConsoleFunction = t, ae((e, n, ...r) => {
|
|
2582
|
+
t && t(e, n, ...r), this.resolveConsole(e, n, ...r);
|
|
2583
|
+
}), this.isAvailable && ((async () => {
|
|
2584
|
+
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.");
|
|
2585
|
+
let t = "THREE.WebGPURenderer: 186 [ \"";
|
|
2586
|
+
e.backend.isWebGPUBackend ? t += "WebGPU" : e.backend.isWebGLBackend && (t += "WebGL2"), t += "\" ]", this.console.addMessage("info", t);
|
|
2587
|
+
let n = this.domElement;
|
|
2588
|
+
n.parentElement === null && (e.domElement.parentElement === null ? (this._domObserver !== null && this._domObserver.disconnect(), this._domObserver = new MutationObserver(() => {
|
|
2589
|
+
e.domElement && e.domElement.parentElement !== null && (e.domElement.parentElement.appendChild(n), this._domObserver !== null && (this._domObserver.disconnect(), this._domObserver = null));
|
|
2590
|
+
}), this._domObserver.observe(document.body || document.documentElement, {
|
|
2591
|
+
childList: !0,
|
|
2592
|
+
subtree: !0
|
|
2593
|
+
})) : e.domElement.parentElement.appendChild(n));
|
|
2594
|
+
})(), this.timeline.setRenderer(e));
|
|
2595
|
+
} 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
|
+
return this;
|
|
2432
2597
|
}
|
|
2433
2598
|
createParameters(e) {
|
|
2434
2599
|
return this.parameters.isVisible === !1 && this.parameters.show(), this.parameters.createGroup(e);
|
|
@@ -2465,7 +2630,7 @@ var An = class extends wn {
|
|
|
2465
2630
|
}
|
|
2466
2631
|
}
|
|
2467
2632
|
resolveFrame(e) {
|
|
2468
|
-
let t = this.getFrameById(e.frameId
|
|
2633
|
+
let t = this.getFrameById(e.frameId - 1);
|
|
2469
2634
|
if (t) {
|
|
2470
2635
|
e.cpu = 0, e.gpu = 0, e.total = 0;
|
|
2471
2636
|
for (let t of e.children) {
|
|
@@ -2473,48 +2638,51 @@ var An = class extends wn {
|
|
|
2473
2638
|
let n = this.getStatsData(t.cid);
|
|
2474
2639
|
e.cpu += n.cpu, e.gpu += n.gpu, e.total += n.total;
|
|
2475
2640
|
}
|
|
2476
|
-
e.deltaTime =
|
|
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;
|
|
2477
2642
|
}
|
|
2478
2643
|
}
|
|
2479
2644
|
updateCycle(e) {
|
|
2480
2645
|
e.time += this.nodeFrame.deltaTime, e.time >= e.duration && (e.needsUpdate = !0, e.time = 0);
|
|
2481
2646
|
}
|
|
2647
|
+
dispose() {
|
|
2648
|
+
super.dispose(), this.setRenderer(null);
|
|
2649
|
+
}
|
|
2482
2650
|
};
|
|
2483
|
-
function
|
|
2651
|
+
function Un(e) {
|
|
2484
2652
|
let t = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
|
|
2485
|
-
return t.version !== "
|
|
2653
|
+
return t.version !== "186" || t.settings && t.settings.storage === "url" && t.settings.url !== location.href ? (localStorage.removeItem("threejs-inspector"), {}) : t[e] || {};
|
|
2486
2654
|
}
|
|
2487
|
-
function
|
|
2655
|
+
function Wn(e, t) {
|
|
2488
2656
|
let n = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
|
|
2489
|
-
t === null ? delete n[e] : n[e] = t, n.settings = n.settings || {}, n.settings.url = n.settings.url || location.href, n.settings.storage = n.settings.storage || "url", n.version = "
|
|
2657
|
+
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));
|
|
2490
2658
|
}
|
|
2491
2659
|
//#endregion
|
|
2492
2660
|
//#region ../../node_modules/three/examples/jsm/tsl/display/SSGINode.js
|
|
2493
|
-
var
|
|
2661
|
+
var Gn = /* @__PURE__ */ new ke(), Kn = /* @__PURE__ */ new d(), qn = [
|
|
2494
2662
|
60,
|
|
2495
2663
|
300,
|
|
2496
2664
|
180,
|
|
2497
2665
|
240,
|
|
2498
2666
|
120,
|
|
2499
2667
|
0
|
|
2500
|
-
],
|
|
2668
|
+
], Jn = [
|
|
2501
2669
|
0,
|
|
2502
2670
|
.5,
|
|
2503
2671
|
.25,
|
|
2504
2672
|
.75
|
|
2505
|
-
],
|
|
2673
|
+
], Yn, Xn = class extends Ce {
|
|
2506
2674
|
static get type() {
|
|
2507
2675
|
return "SSGINode";
|
|
2508
2676
|
}
|
|
2509
|
-
constructor(e,
|
|
2510
|
-
super("vec4"), this.beautyNode = e, this.depthNode =
|
|
2677
|
+
constructor(e, n, r, i) {
|
|
2678
|
+
super("vec4"), this.beautyNode = e, this.depthNode = n, this.normalNode = r, this.updateBeforeType = At.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 = bt("near", "float", i), this._cameraFar = bt("far", "float", i), this._camera = i, this._ssgiRenderTarget = new c(1, 1, {
|
|
2511
2679
|
depthBuffer: !1,
|
|
2512
2680
|
count: 2
|
|
2513
2681
|
});
|
|
2514
|
-
let
|
|
2515
|
-
|
|
2516
|
-
let
|
|
2517
|
-
|
|
2682
|
+
let a = this._ssgiRenderTarget.textures[0];
|
|
2683
|
+
a.name = "SSGI.AO", a.type = y, a.format = t;
|
|
2684
|
+
let o = this._ssgiRenderTarget.textures[1];
|
|
2685
|
+
o.name = "SSGI.GI", o.type = ue, o.format = T, this._material = new k(), this._material.name = "SSGI", this._aoNode = Ct(this, this._ssgiRenderTarget.textures[0]), this._giNode = Ct(this, this._ssgiRenderTarget.textures[1]);
|
|
2518
2686
|
}
|
|
2519
2687
|
getAONode() {
|
|
2520
2688
|
return this._aoNode;
|
|
@@ -2523,34 +2691,34 @@ var zn = /* @__PURE__ */ new Ae(), Bn = /* @__PURE__ */ new p(), Vn = [
|
|
|
2523
2691
|
return this._giNode;
|
|
2524
2692
|
}
|
|
2525
2693
|
setSize(e, t) {
|
|
2526
|
-
this._resolution.value.set(e, t), this._ssgiRenderTarget.setSize(e, t), this._halfProjScale.value = t / (Math.tan(this._camera.fov *
|
|
2694
|
+
this._resolution.value.set(e, t), this._ssgiRenderTarget.setSize(e, t), this._halfProjScale.value = t / (Math.tan(this._camera.fov * b.DEG2RAD * .5) * 2) * .5;
|
|
2527
2695
|
}
|
|
2528
2696
|
updateBefore(e) {
|
|
2529
2697
|
let { renderer: t } = e;
|
|
2530
|
-
|
|
2531
|
-
let n = t.getDrawingBufferSize(
|
|
2698
|
+
Yn = A.resetRendererState(t, Yn);
|
|
2699
|
+
let n = t.getDrawingBufferSize(Kn);
|
|
2532
2700
|
if (this.setSize(n.width, n.height), this.useTemporalFiltering === !0) {
|
|
2533
2701
|
let t = e.frameId;
|
|
2534
|
-
this._temporalDirection.value =
|
|
2702
|
+
this._temporalDirection.value = qn[t % 6] / 360, this._temporalOffset.value = Jn[t % 4];
|
|
2535
2703
|
} else this._temporalDirection.value = 1, this._temporalOffset.value = 1;
|
|
2536
|
-
|
|
2704
|
+
Gn.material = this._material, Gn.name = "SSGI", t.setClearColor(16777215, 1), t.setRenderTarget(this._ssgiRenderTarget), Gn.render(t), A.restoreRendererState(t, Yn);
|
|
2537
2705
|
}
|
|
2538
2706
|
setup(e) {
|
|
2539
2707
|
let t = e.renderer;
|
|
2540
2708
|
t.backend.isWebGPUBackend === !0 && t.hasFeature("rg11b10ufloat-renderable") === !1 && console.error("THREE.SSGINode: The device does not support the \"rg11b10ufloat-renderable\" feature which is required for SSGI.");
|
|
2541
|
-
let n =
|
|
2709
|
+
let n = qe(), r = N(32), i = N(0), a = (t) => {
|
|
2542
2710
|
let n = this.depthNode.sample(t).r;
|
|
2543
|
-
return e.renderer.logarithmicDepthBuffer === !0 ?
|
|
2544
|
-
}, o = (e) => this.normalNode === null ?
|
|
2711
|
+
return e.renderer.logarithmicDepthBuffer === !0 ? at(Jt(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 = V(([e]) => B(.25).mul(Le(e.y, e.x).bitAnd(3))).setLayout({
|
|
2545
2713
|
name: "spatialOffsets",
|
|
2546
2714
|
type: "float",
|
|
2547
2715
|
inputs: [{
|
|
2548
2716
|
name: "position",
|
|
2549
2717
|
type: "vec2"
|
|
2550
2718
|
}]
|
|
2551
|
-
}), l =
|
|
2552
|
-
let t =
|
|
2553
|
-
return t.mulAssign(
|
|
2719
|
+
}), l = V(([e]) => {
|
|
2720
|
+
let t = R(e).mul(B(-.156583)).add(Nt);
|
|
2721
|
+
return t.mulAssign(Ie(R(e).oneMinus())), U(e.x.greaterThanEqual(0).select(t.x, H.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, H.sub(t.y)));
|
|
2554
2722
|
}).setLayout({
|
|
2555
2723
|
name: "GTAOFastAcos",
|
|
2556
2724
|
type: "vec2",
|
|
@@ -2558,123 +2726,126 @@ var zn = /* @__PURE__ */ new Ae(), Bn = /* @__PURE__ */ new p(), Vn = [
|
|
|
2558
2726
|
name: "value",
|
|
2559
2727
|
type: "vec2"
|
|
2560
2728
|
}]
|
|
2561
|
-
}), u =
|
|
2562
|
-
let g = this.stepCount.toConst(), _ = this.expFactor.toConst(), v = this.thickness.toConst(), y = this.backfaceLighting.toConst(), b = e.select(
|
|
2563
|
-
return
|
|
2564
|
-
start:
|
|
2729
|
+
}), u = V(([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 = j(0);
|
|
2731
|
+
return dt({
|
|
2732
|
+
start: N(0),
|
|
2565
2733
|
end: g,
|
|
2566
2734
|
type: "uint",
|
|
2567
2735
|
condition: "<"
|
|
2568
2736
|
}, ({ i: g }) => {
|
|
2569
|
-
let
|
|
2570
|
-
|
|
2737
|
+
let S = gt(R(st(t, B(g).add(d)).div(n)), _).mul(n).toConst(), C = u.mul(L(S, B(g).add(1))).toConst(), w = f.add(C.mul(b)).toConst();
|
|
2738
|
+
z(w.x.lessThanEqual(0).or(w.y.lessThanEqual(0)).or(w.x.greaterThanEqual(1)).or(w.y.greaterThanEqual(1)), () => {
|
|
2571
2739
|
Lt();
|
|
2572
2740
|
});
|
|
2573
|
-
let
|
|
2574
|
-
|
|
2575
|
-
let
|
|
2576
|
-
|
|
2577
|
-
let le =
|
|
2578
|
-
|
|
2579
|
-
let e = s(
|
|
2580
|
-
|
|
2581
|
-
let t =
|
|
2582
|
-
|
|
2583
|
-
let i = o(
|
|
2584
|
-
a = y.greaterThan(0).and(
|
|
2741
|
+
let te = Ze(w, a(w), this._cameraProjectionMatrixInverse).toConst(), T = te.sub(c).normalize().toConst(), ne = this.useLinearThickness.select(te.z.negate().div(this._cameraFar).clamp().mul(100), B(1)), re = $e(te.sub(ne.mul(p).mul(v)).sub(c)), E = U(M(T, p), M(re, p));
|
|
2742
|
+
E = l(lt(E, -1, 1)), E = lt(Re(st(ee, E.negate()).sub(h.sub(Nt)), H)), E = e.select(E.yx, E.xy);
|
|
2743
|
+
let ie = E.x.toConst(), ae = E.y.toConst(), oe = N(E.mul(B(r))).toConst(), se = N(xt(ae.sub(ie).mul(B(r)))).toConst(), ce = se.greaterThan(N(0)).select(N(qt(N(4294967295), N(32).sub(r).add(r.sub(se)))), N(0)).toConst().shiftLeft(oe);
|
|
2744
|
+
ce = ce.bitAnd(i.bitNot()), i.assign(i.bitOr(ce));
|
|
2745
|
+
let le = tt(ce);
|
|
2746
|
+
z(le.greaterThan(0), () => {
|
|
2747
|
+
let e = s(w);
|
|
2748
|
+
z(Pe(e).greaterThan(.001), () => {
|
|
2749
|
+
let t = $e(T), n = lt(M(m, t));
|
|
2750
|
+
z(n.greaterThan(.001), () => {
|
|
2751
|
+
let i = o(w), a = M(i, t.negate()), s = mt(a).lessThan(0).select(R(a).mul(y), R(a));
|
|
2752
|
+
a = y.greaterThan(0).and(M(i, p).greaterThan(0)).select(s, lt(a)), x.rgb.addAssign(B(le).div(B(r)).mul(e).mul(n).mul(a));
|
|
2585
2753
|
});
|
|
2586
2754
|
});
|
|
2587
2755
|
});
|
|
2588
|
-
}),
|
|
2589
|
-
}), d =
|
|
2756
|
+
}), x;
|
|
2757
|
+
}), d = zt("float"), f = zt("vec3"), p = Rt(d, f), m = V(() => {
|
|
2590
2758
|
let e = a(n).toVar();
|
|
2591
2759
|
e.greaterThanEqual(1).discard();
|
|
2592
|
-
let t =
|
|
2593
|
-
|
|
2594
|
-
|
|
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))), _ = B(0), v = j(0), y = this.sliceCount.toConst(), b = this.stepCount.toConst(), ee = this.aoIntensity.toConst(), x = this.giIntensity.toConst(), S = this.radius.toConst(), C = B(0).toVar();
|
|
2761
|
+
z(this.useScreenSpaceSampling, () => {
|
|
2762
|
+
C.assign(S.mul(this._resolution.x.div(2)).div(B(16)));
|
|
2595
2763
|
}).Else(() => {
|
|
2596
|
-
|
|
2597
|
-
}),
|
|
2598
|
-
let
|
|
2599
|
-
|
|
2600
|
-
start:
|
|
2764
|
+
C.assign(L(S.mul(this._halfProjScale).div(t.z.negate()), B(b)));
|
|
2765
|
+
}), C.divAssign(B(b).add(1));
|
|
2766
|
+
let w = L(1, B(b.sub(1))).mul(C).toConst();
|
|
2767
|
+
dt({
|
|
2768
|
+
start: N(0),
|
|
2601
2769
|
end: y,
|
|
2602
2770
|
type: "uint",
|
|
2603
2771
|
condition: "<"
|
|
2604
2772
|
}, ({ i: e }) => {
|
|
2605
|
-
let a =
|
|
2606
|
-
i.assign(0), v.addAssign(u(
|
|
2607
|
-
}), _.divAssign(
|
|
2608
|
-
let
|
|
2609
|
-
return v.mulAssign(
|
|
2773
|
+
let a = st(B(e).add(m).add(this._temporalDirection), H.div(B(y))).toConst(), o = j(U(Wt(a), Gt(a)), 0).toConst(), c = o.xy.mul(B(1).div(this._resolution)).toConst(), d = $e(Fe(o, l)).toConst(), f = Fe(l, d).toConst(), p = s.sub(d.mul(M(s, d))).toConst(), h = lt(M($e(p).toConst(), l), -1, 1).toConst(), b = mt(M(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(B(tt(i)).div(B(r)));
|
|
2775
|
+
}), _.divAssign(B(y)), _.assign(gt(_.clamp().oneMinus(), ee).clamp()), v.divAssign(B(y)), v.mulAssign(x);
|
|
2776
|
+
let te = B(7).toConst(), T = Pe(v), ne = T.greaterThan(te).select(te.div(T), B(1));
|
|
2777
|
+
return v.mulAssign(ne), d.assign(_), f.assign(v), I(0);
|
|
2610
2778
|
});
|
|
2611
|
-
return this._material.
|
|
2779
|
+
return this._material.contextNode = Kt(e.getSharedContext()), this._material.colorNode = m(), this._material.outputNode = p, this._material.needsUpdate = !0, this._aoNode;
|
|
2612
2780
|
}
|
|
2613
2781
|
dispose() {
|
|
2614
|
-
this._ssgiRenderTarget.dispose(), this._material.dispose();
|
|
2782
|
+
super.dispose(), this._ssgiRenderTarget.dispose(), this._material.dispose();
|
|
2615
2783
|
}
|
|
2616
|
-
},
|
|
2784
|
+
}, Zn = (e, t, n, r) => new Xn(pt(e), t, n, r), Qn = class extends Ce {
|
|
2617
2785
|
static get type() {
|
|
2618
2786
|
return "DenoiseNode";
|
|
2619
2787
|
}
|
|
2620
2788
|
constructor(e, t, n, r) {
|
|
2621
|
-
super("vec4"), this.textureNode = e, this.depthNode = t, this.normalNode = n, this.noiseNode = F(
|
|
2789
|
+
super("vec4"), this.textureNode = e, this.depthNode = t, this.normalNode = n, this._noiseTexture = er(), 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 = At.FRAME, this._resolution = P(new d()), this._sampleVectors = Qe($n(16, 2, 1)), this._cameraProjectionMatrixInverse = P(r.projectionMatrixInverse);
|
|
2622
2790
|
}
|
|
2623
2791
|
updateBefore() {
|
|
2624
2792
|
let e = this.textureNode.value;
|
|
2625
2793
|
this._resolution.value.set(e.image.width, e.image.height);
|
|
2626
2794
|
}
|
|
2627
2795
|
setup() {
|
|
2628
|
-
let e =
|
|
2629
|
-
let s = t(o).toVar(), c = n(o).toVar(), l = r(o).toVar(), u = s.rgb, d =
|
|
2630
|
-
return
|
|
2631
|
-
}), o =
|
|
2632
|
-
let o = n(e).toVar(), s = r(e).toVar(), c = t(e).toVar(), l =
|
|
2633
|
-
return
|
|
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 = V(([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(L(M(i, l).toVar(), 0), this.normalPhi).toVar(), p = R(Pe(u).sub(Pe(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);
|
|
2798
|
+
return I(u.mul(_), _);
|
|
2799
|
+
}), o = V(([e]) => {
|
|
2800
|
+
let o = n(e).toVar(), s = r(e).toVar(), c = t(e).toVar(), l = zt("vec4");
|
|
2801
|
+
return z(o.greaterThanEqual(1).or(M(s, s).equal(0)), () => {
|
|
2634
2802
|
l.assign(c);
|
|
2635
2803
|
}).Else(() => {
|
|
2636
|
-
let t =
|
|
2804
|
+
let t = j(c.rgb), n = Ze(e, o, this._cameraProjectionMatrixInverse).toConst(), r = Tt(this.noiseNode, 0), u = U(e.x, e.y.oneMinus());
|
|
2637
2805
|
u = u.mul(this._resolution.div(r));
|
|
2638
|
-
let d = i(u).toVar(), f =
|
|
2639
|
-
|
|
2640
|
-
start:
|
|
2641
|
-
end:
|
|
2806
|
+
let d = i(u).toVar(), f = U(Gt(d.element(this.index.mod(4).mul(2).mul(H))), Wt(d.element(this.index.mod(4).mul(2).mul(H)))), p = it(f.x, f.y.negate(), f.x, f.y), m = B(1).toVar(), h = j(c.rgb).toVar();
|
|
2807
|
+
dt({
|
|
2808
|
+
start: Ue(0),
|
|
2809
|
+
end: Ue(16),
|
|
2642
2810
|
type: "int",
|
|
2643
2811
|
condition: "<"
|
|
2644
2812
|
}, ({ i: r }) => {
|
|
2645
|
-
let i = this._sampleVectors.element(r), o = p.mul(i.xy.mul(
|
|
2813
|
+
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));
|
|
2646
2814
|
h.addAssign(c.xyz), m.addAssign(c.w);
|
|
2647
|
-
}),
|
|
2815
|
+
}), z(m.greaterThan(B(0)), () => {
|
|
2648
2816
|
h.divAssign(m);
|
|
2649
|
-
}), l.assign(
|
|
2817
|
+
}), l.assign(I(h, c.a));
|
|
2650
2818
|
}), l;
|
|
2651
2819
|
});
|
|
2652
|
-
return
|
|
2820
|
+
return V(() => o(e))();
|
|
2821
|
+
}
|
|
2822
|
+
dispose() {
|
|
2823
|
+
super.dispose(), this._noiseTexture.dispose();
|
|
2653
2824
|
}
|
|
2654
2825
|
};
|
|
2655
|
-
function
|
|
2656
|
-
let
|
|
2826
|
+
function $n(e, t, n) {
|
|
2827
|
+
let r = [];
|
|
2657
2828
|
for (let a = 0; a < e; a++) {
|
|
2658
|
-
let o = 2 * Math.PI * t * a / e, s = (a / (e - 1)) **
|
|
2659
|
-
|
|
2829
|
+
let o = 2 * Math.PI * t * a / e, s = (a / (e - 1)) ** n;
|
|
2830
|
+
r.push(new i(Math.cos(o), Math.sin(o), s));
|
|
2660
2831
|
}
|
|
2661
|
-
return
|
|
2832
|
+
return r;
|
|
2662
2833
|
}
|
|
2663
|
-
function
|
|
2834
|
+
function er(e = 64) {
|
|
2664
2835
|
let t = new he(), n = e * e * 4, r = new Uint8Array(n);
|
|
2665
2836
|
for (let n = 0; n < e; n++) for (let i = 0; i < e; i++) {
|
|
2666
2837
|
let a = n, o = i;
|
|
2667
2838
|
r[(n * e + i) * 4] = (t.noise(a, o) * .5 + .5) * 255, r[(n * e + i) * 4 + 1] = (t.noise(a + e, o) * .5 + .5) * 255, r[(n * e + i) * 4 + 2] = (t.noise(a, o + e) * .5 + .5) * 255, r[(n * e + i) * 4 + 3] = (t.noise(a + e, o + e) * .5 + .5) * 255;
|
|
2668
2839
|
}
|
|
2669
|
-
let i = new
|
|
2670
|
-
return i.wrapS =
|
|
2840
|
+
let i = new m(r, e, e);
|
|
2841
|
+
return i.wrapS = l, i.wrapT = l, i.needsUpdate = !0, i;
|
|
2671
2842
|
}
|
|
2672
|
-
var
|
|
2843
|
+
var tr = (e, t, n, r) => new Qn(pt(e), ot(t), ot(n), r), nr = class e extends en {
|
|
2673
2844
|
static {
|
|
2674
2845
|
this.passId = "SsgiRenderPass";
|
|
2675
2846
|
}
|
|
2676
2847
|
constructor(t) {
|
|
2677
|
-
super(), this.passId = e.passId, this.sliceCount =
|
|
2848
|
+
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;
|
|
2678
2849
|
}
|
|
2679
2850
|
updatePerformanceParameters(e) {
|
|
2680
2851
|
this.sliceCount.value = e.sliceCount, this.stepCount.value = e.stepCount;
|
|
@@ -2684,29 +2855,108 @@ var Yn = (e, t, n, r) => new Kn(ot(e), Mt(t), Mt(n), r), Xn = class e extends Qt
|
|
|
2684
2855
|
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());
|
|
2685
2856
|
}
|
|
2686
2857
|
assemble(e, t, n, r, i) {
|
|
2687
|
-
if (!(r instanceof
|
|
2688
|
-
let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), l =
|
|
2858
|
+
if (!(r instanceof E) || 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 = Zn(a, s, l, r);
|
|
2689
2860
|
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;
|
|
2690
|
-
let
|
|
2691
|
-
|
|
2692
|
-
let
|
|
2693
|
-
|
|
2694
|
-
let
|
|
2695
|
-
return
|
|
2696
|
-
}
|
|
2697
|
-
},
|
|
2861
|
+
let d = u.getGINode(), f = u.getAONode(), p = tr(d, s, l, r);
|
|
2862
|
+
p.radius = this.giDenoiseRadius;
|
|
2863
|
+
let m = tr(f, s, l, r);
|
|
2864
|
+
m.radius = this.aoDenoiseRadius;
|
|
2865
|
+
let h = I(Mt(a.rgb.mul(m.r), o.rgb.mul(p.rgb)), a.a);
|
|
2866
|
+
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 === "direct lighting only" ? a : i === "without denoise" ? I(Mt(a.rgb.mul(f.r), o.rgb.mul(d.rgb)), a.a) : h;
|
|
2867
|
+
}
|
|
2868
|
+
}, rr = V(([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(I(i, e.a)).toConst(), s = o.xyz.div(a).toConst().abs().toConst(), c = L(s.x, s.y, s.z).toConst();
|
|
2870
|
+
return c.greaterThan(1).select(I(i, e.a).add(o.div(c)), t);
|
|
2871
|
+
}).setLayout({
|
|
2872
|
+
name: "clipAABB",
|
|
2873
|
+
type: "vec4",
|
|
2874
|
+
inputs: [
|
|
2875
|
+
{
|
|
2876
|
+
name: "currentColor",
|
|
2877
|
+
type: "vec4"
|
|
2878
|
+
},
|
|
2879
|
+
{
|
|
2880
|
+
name: "historyColor",
|
|
2881
|
+
type: "vec4"
|
|
2882
|
+
},
|
|
2883
|
+
{
|
|
2884
|
+
name: "minColor",
|
|
2885
|
+
type: "vec4"
|
|
2886
|
+
},
|
|
2887
|
+
{
|
|
2888
|
+
name: "maxColor",
|
|
2889
|
+
type: "vec4"
|
|
2890
|
+
}
|
|
2891
|
+
]
|
|
2892
|
+
}), ir = V(([e, t, n]) => {
|
|
2893
|
+
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 = Pe(r.rgb).toConst(), o = Pe(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(L(s.add(c), 1e-5));
|
|
2895
|
+
}).setLayout({
|
|
2896
|
+
name: "flickerReduction",
|
|
2897
|
+
type: "vec4",
|
|
2898
|
+
inputs: [
|
|
2899
|
+
{
|
|
2900
|
+
name: "currentColor",
|
|
2901
|
+
type: "vec4"
|
|
2902
|
+
},
|
|
2903
|
+
{
|
|
2904
|
+
name: "historyColor",
|
|
2905
|
+
type: "vec4"
|
|
2906
|
+
},
|
|
2907
|
+
{
|
|
2908
|
+
name: "currentWeight",
|
|
2909
|
+
type: "float"
|
|
2910
|
+
}
|
|
2911
|
+
]
|
|
2912
|
+
}), ar = V(([e, t, n], r) => {
|
|
2913
|
+
let i = B(2).toVar(), a = U(0).toVar(), o = B(-1).toVar();
|
|
2914
|
+
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 = lr(u, n)), u = u.toVar(), z(u.lessThan(i), () => {
|
|
2917
|
+
i.assign(u), a.assign(l);
|
|
2918
|
+
}), z(u.greaterThan(o), () => {
|
|
2919
|
+
o.assign(u);
|
|
2920
|
+
});
|
|
2921
|
+
}
|
|
2922
|
+
return cr(i, a, o);
|
|
2923
|
+
}), or = V(([e, t, n, r, i, a, o], s) => {
|
|
2924
|
+
let c = e.sample(t).r;
|
|
2925
|
+
s.renderer.logarithmicDepthBuffer && (c = lr(c, a));
|
|
2926
|
+
let l = Ze(t, c, n), u = r.mul(I(l, 1)).xyz, d = i.mul(I(u, 1)).z;
|
|
2927
|
+
return o.isOrthographicCamera ? rt(d, a.x, a.y) : at(d, a.x, a.y);
|
|
2928
|
+
});
|
|
2929
|
+
function sr(e) {
|
|
2930
|
+
return Array.from({ length: e }, (e, t) => [ur(t + 1, 2), ur(t + 1, 3)]);
|
|
2931
|
+
}
|
|
2932
|
+
var cr = ze({
|
|
2933
|
+
closestDepth: "float",
|
|
2934
|
+
closestPositionTexel: "vec2",
|
|
2935
|
+
farthestDepth: "float"
|
|
2936
|
+
}), lr = (e, t) => {
|
|
2937
|
+
let { x: n, y: r } = t;
|
|
2938
|
+
return at(Jt(e, n, r), n, r);
|
|
2939
|
+
};
|
|
2940
|
+
function ur(e, t) {
|
|
2941
|
+
let n = 1, r = 0;
|
|
2942
|
+
for (; e > 0;) n /= t, r += e % t * n, e = Math.floor(e / t);
|
|
2943
|
+
return r;
|
|
2944
|
+
}
|
|
2945
|
+
//#endregion
|
|
2946
|
+
//#region ../../node_modules/three/examples/jsm/tsl/display/TRAANode.js
|
|
2947
|
+
var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class extends Ce {
|
|
2698
2948
|
static get type() {
|
|
2699
2949
|
return "TRAANode";
|
|
2700
2950
|
}
|
|
2701
2951
|
constructor(e, t, n, r) {
|
|
2702
|
-
super("vec4"), this.isTRAANode = !0, this.updateBeforeType = Ee.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 =
|
|
2952
|
+
super("vec4"), this.isTRAANode = !0, this.updateBeforeType = Ee.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, {
|
|
2703
2953
|
depthBuffer: !1,
|
|
2704
|
-
type:
|
|
2954
|
+
type: ne,
|
|
2705
2955
|
depthTexture: new _()
|
|
2706
|
-
}), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new
|
|
2956
|
+
}), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new c(1, 1, {
|
|
2707
2957
|
depthBuffer: !1,
|
|
2708
|
-
type:
|
|
2709
|
-
}), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new
|
|
2958
|
+
type: ne
|
|
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 = 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;
|
|
2710
2960
|
}
|
|
2711
2961
|
getTextureNode() {
|
|
2712
2962
|
return this._textureNode;
|
|
@@ -2723,82 +2973,34 @@ var Yn = (e, t, n, r) => new Kn(ot(e), Mt(t), Mt(n), r), Xn = class e extends Qt
|
|
|
2723
2973
|
offsetY: 0,
|
|
2724
2974
|
width: e,
|
|
2725
2975
|
height: t
|
|
2726
|
-
}, r =
|
|
2976
|
+
}, r = hr[this._jitterIndex];
|
|
2727
2977
|
this.camera.setViewOffset(n.fullWidth, n.fullHeight, n.offsetX + r[0] - .5, n.offsetY + r[1] - .5, n.width, n.height);
|
|
2728
2978
|
}
|
|
2729
2979
|
clearViewOffset() {
|
|
2730
|
-
this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %=
|
|
2980
|
+
this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= hr.length;
|
|
2731
2981
|
}
|
|
2732
2982
|
updateBefore(e) {
|
|
2733
2983
|
let { renderer: t } = e;
|
|
2734
2984
|
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);
|
|
2735
2985
|
let n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, r = n.texture.width, i = n.texture.height;
|
|
2736
|
-
this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1),
|
|
2986
|
+
this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), pr = A.resetRendererState(t, pr);
|
|
2737
2987
|
let a = this._historyRenderTarget.width !== r || this._historyRenderTarget.height !== i;
|
|
2738
|
-
this.setSize(r, i), a === !0 && (t.initRenderTarget(this._historyRenderTarget), t.initRenderTarget(this._resolveRenderTarget), t.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), t.setRenderTarget(this._resolveRenderTarget),
|
|
2739
|
-
let o = t.getDrawingBufferSize(
|
|
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), dr.material = this._resolveMaterial, dr.name = "TRAA", dr.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
|
|
2989
|
+
let o = t.getDrawingBufferSize(fr);
|
|
2740
2990
|
if (this._historyRenderTarget.height === o.height && this._historyRenderTarget.width === o.width) {
|
|
2741
2991
|
let e = this.depthNode.value;
|
|
2742
2992
|
t.copyTextureToTexture(e, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
|
|
2743
2993
|
}
|
|
2744
|
-
|
|
2994
|
+
A.restoreRendererState(t, pr);
|
|
2745
2995
|
}
|
|
2746
2996
|
setup(e) {
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
let t = e.renderer.getDrawingBufferSize(Qn);
|
|
2997
|
+
e.renderPipeline && !e.context.renderPipelineState.viewOffsetOwner && (e.context.renderPipelineState.viewOffsetOwner = this, this._needsPostProcessingSync = !0, ht(() => {
|
|
2998
|
+
let t = e.renderer.getDrawingBufferSize(fr);
|
|
2750
2999
|
this.setViewOffset(t.width, t.height);
|
|
2751
|
-
},
|
|
3000
|
+
}), Ft(() => {
|
|
2752
3001
|
this.clearViewOffset();
|
|
2753
|
-
}), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type =
|
|
2754
|
-
let
|
|
2755
|
-
let { x: t, y: n } = this._cameraNearFar;
|
|
2756
|
-
return nt(He(e, t, n), t, n);
|
|
2757
|
-
}, r = Le({
|
|
2758
|
-
closestDepth: "float",
|
|
2759
|
-
closestPositionTexel: "vec2",
|
|
2760
|
-
farthestDepth: "float"
|
|
2761
|
-
}), i = B(([t]) => {
|
|
2762
|
-
let i = j(2).toVar(), a = M(0).toVar(), o = j(-1).toVar();
|
|
2763
|
-
for (let r = -1; r <= 1; ++r) for (let s = -1; s <= 1; ++s) {
|
|
2764
|
-
let c = t.add(M(r, s)).toVar(), l = this.depthNode.load(c).r;
|
|
2765
|
-
e.renderer.reversedDepthBuffer && (l = l.oneMinus()), e.renderer.logarithmicDepthBuffer && (l = n(l)), l = l.toVar(), L(l.lessThan(i), () => {
|
|
2766
|
-
i.assign(l), a.assign(c);
|
|
2767
|
-
}), L(l.greaterThan(o), () => {
|
|
2768
|
-
o.assign(l);
|
|
2769
|
-
});
|
|
2770
|
-
}
|
|
2771
|
-
return r(i, a, o);
|
|
2772
|
-
}), a = (t) => {
|
|
2773
|
-
let r = this._previousDepthNode.sample(t).r;
|
|
2774
|
-
e.renderer.logarithmicDepthBuffer && (r = n(r));
|
|
2775
|
-
let i = wt(t, r, this._previousCameraProjectionMatrixInverse), a = this._previousCameraWorldMatrix.mul(P(i, 1)).xyz, o = this._cameraWorldMatrixInverse.mul(P(a, 1)).z;
|
|
2776
|
-
return this.camera.isOrthographicCamera ? Fe(o, this._cameraNearFar.x, this._cameraNearFar.y) : nt(o, this._cameraNearFar.x, this._cameraNearFar.y);
|
|
2777
|
-
}, o = B(([e, t, n, r]) => {
|
|
2778
|
-
let i = r.rgb.add(n.rgb).mul(.5), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7), o = t.sub(P(i, e.a)), s = o.xyz.div(a).abs(), c = I(s.x, s.y, s.z);
|
|
2779
|
-
return c.greaterThan(1).select(P(i, e.a).add(o.div(c)), t);
|
|
2780
|
-
}).setLayout({
|
|
2781
|
-
name: "clipAABB",
|
|
2782
|
-
type: "vec4",
|
|
2783
|
-
inputs: [
|
|
2784
|
-
{
|
|
2785
|
-
name: "currentColor",
|
|
2786
|
-
type: "vec4"
|
|
2787
|
-
},
|
|
2788
|
-
{
|
|
2789
|
-
name: "historyColor",
|
|
2790
|
-
type: "vec4"
|
|
2791
|
-
},
|
|
2792
|
-
{
|
|
2793
|
-
name: "minColor",
|
|
2794
|
-
type: "vec4"
|
|
2795
|
-
},
|
|
2796
|
-
{
|
|
2797
|
-
name: "maxColor",
|
|
2798
|
-
type: "vec4"
|
|
2799
|
-
}
|
|
2800
|
-
]
|
|
2801
|
-
}), s = B(([e, t, n, r]) => {
|
|
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 = V(([e, t, n, r]) => {
|
|
2802
3004
|
let i = [
|
|
2803
3005
|
[-1, -1],
|
|
2804
3006
|
[-1, 1],
|
|
@@ -2808,15 +3010,15 @@ var Yn = (e, t, n, r) => new Kn(ot(e), Mt(t), Mt(n), r), Xn = class e extends Qt
|
|
|
2808
3010
|
[0, -1],
|
|
2809
3011
|
[0, 1],
|
|
2810
3012
|
[-1, 0]
|
|
2811
|
-
], a = t.toVar(),
|
|
3013
|
+
], a = t.toVar(), o = t.pow2().toVar();
|
|
2812
3014
|
for (let [t, n] of i) {
|
|
2813
|
-
let r = this.beautyNode.offset(
|
|
2814
|
-
a.addAssign(r),
|
|
3015
|
+
let r = this.beautyNode.offset(et(t, n)).load(e).max(0);
|
|
3016
|
+
a.addAssign(r), o.addAssign(r.pow2());
|
|
2815
3017
|
}
|
|
2816
|
-
let
|
|
2817
|
-
return
|
|
2818
|
-
}),
|
|
2819
|
-
let n = e.mul(t).fract().abs(), r =
|
|
3018
|
+
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);
|
|
3019
|
+
return rr(c.clamp(u, d), n, u, d);
|
|
3020
|
+
}), n = V(([e, t]) => {
|
|
3021
|
+
let n = e.mul(t).fract().abs(), r = L(n, n.oneMinus());
|
|
2820
3022
|
return r.x.mul(r.y).oneMinus().div(.75);
|
|
2821
3023
|
}).setLayout({
|
|
2822
3024
|
name: "subpixelCorrection",
|
|
@@ -2828,25 +3030,16 @@ var Yn = (e, t, n, r) => new Kn(ot(e), Mt(t), Mt(n), r), Xn = class e extends Qt
|
|
|
2828
3030
|
name: "textureSize",
|
|
2829
3031
|
type: "ivec2"
|
|
2830
3032
|
}]
|
|
2831
|
-
}),
|
|
2832
|
-
let
|
|
2833
|
-
return
|
|
2834
|
-
}), u = F(this._historyRenderTarget.texture), d = B(() => {
|
|
2835
|
-
let e = Xe(), t = this.beautyNode.size(), n = e.mul(t), r = i(n), o = r.get("closestDepth"), d = r.get("closestPositionTexel"), f = r.get("farthestDepth"), p = this.velocityNode.load(d).xy.mul(M(.5, -.5)), m = e.sub(p), h = a(m), g = m.greaterThanEqual(0).all().and(m.lessThanEqual(1).all()), _ = f.sub(o).greaterThan(this.edgeDepthDiff), v = o.sub(h).greaterThan(this.depthThreshold), y = g.and(_.or(v.not())), b = this.beautyNode.sample(e), ee = u.sample(e.sub(p)), te = e.sub(m).mul(t).length().div(this.maxVelocityLength).saturate(), x = j(.05).toVar();
|
|
2836
|
-
return this.useSubpixelCorrection && x.addAssign(c(p, t).mul(.25)), x.assign(y.select(x.add(te).saturate(), 1)), l(b, s(n, b, ee, tt(.5, 1, te.oneMinus().pow2())), x);
|
|
3033
|
+
}), r = F(this._historyRenderTarget.texture), i = V(() => {
|
|
3034
|
+
let e = qe(), i = this.beautyNode.size(), a = e.mul(i), o = ar(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 = or(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();
|
|
3035
|
+
return this.useSubpixelCorrection && b.addAssign(n(u, i).mul(.25)), b.assign(g.select(b.add(y).saturate(), 1)), ir(_, t(a, _, v, Ge(.5, 1, y.oneMinus().pow2())), b);
|
|
2837
3036
|
});
|
|
2838
|
-
return this._resolveMaterial.colorNode =
|
|
3037
|
+
return this._resolveMaterial.contextNode = Kt(e.getSharedContext()), this._resolveMaterial.colorNode = i(), this._textureNode;
|
|
2839
3038
|
}
|
|
2840
3039
|
dispose() {
|
|
2841
|
-
this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
|
|
3040
|
+
super.dispose(), this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
|
|
2842
3041
|
}
|
|
2843
|
-
}
|
|
2844
|
-
function tr(e, t) {
|
|
2845
|
-
let n = 1, r = 0;
|
|
2846
|
-
for (; e > 0;) n /= t, r += e % t * n, e = Math.floor(e / t);
|
|
2847
|
-
return r;
|
|
2848
|
-
}
|
|
2849
|
-
var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(t + 1, 3)]), rr = (e, t, n, r) => new er(ot(e), t, n, r), ir = class e extends Qt {
|
|
3042
|
+
}, hr = /* @__PURE__ */ sr(32), gr = (e, t, n, r) => new mr(pt(e), t, n, r), _r = class e extends en {
|
|
2850
3043
|
constructor(...t) {
|
|
2851
3044
|
super(...t), this.passId = e.passId;
|
|
2852
3045
|
}
|
|
@@ -2854,107 +3047,107 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
2854
3047
|
this.passId = "TraaRenderPass";
|
|
2855
3048
|
}
|
|
2856
3049
|
assemble(e, t, n, r, i) {
|
|
2857
|
-
return r instanceof
|
|
3050
|
+
return r instanceof E ? gr(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), r) : t;
|
|
2858
3051
|
}
|
|
2859
3052
|
addParametersToGUI(e, t) {}
|
|
2860
|
-
},
|
|
3053
|
+
}, Q = {
|
|
2861
3054
|
HIGHEST: "highest",
|
|
2862
3055
|
HIGHER: "higher",
|
|
2863
3056
|
HIGH: "high",
|
|
2864
3057
|
MEDIUM: "medium",
|
|
2865
3058
|
LOW: "low",
|
|
2866
3059
|
LOWEST: "lowest"
|
|
2867
|
-
},
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
],
|
|
2875
|
-
[
|
|
3060
|
+
}, $ = [
|
|
3061
|
+
Q.HIGHEST,
|
|
3062
|
+
Q.HIGHER,
|
|
3063
|
+
Q.HIGH,
|
|
3064
|
+
Q.MEDIUM,
|
|
3065
|
+
Q.LOW,
|
|
3066
|
+
Q.LOWEST
|
|
3067
|
+
], vr = $[0], yr = $[$.length - 1], br = Q.HIGHEST, xr = new Map([
|
|
3068
|
+
[Q.HIGHEST, {
|
|
2876
3069
|
maxPixelRatio: 1.5,
|
|
2877
3070
|
ssgiPerformanceParameters: {
|
|
2878
3071
|
sliceCount: 3,
|
|
2879
3072
|
stepCount: 16
|
|
2880
3073
|
}
|
|
2881
3074
|
}],
|
|
2882
|
-
[
|
|
3075
|
+
[Q.HIGHER, {
|
|
2883
3076
|
maxPixelRatio: 1.5,
|
|
2884
3077
|
ssgiPerformanceParameters: {
|
|
2885
3078
|
sliceCount: 2,
|
|
2886
3079
|
stepCount: 8
|
|
2887
3080
|
}
|
|
2888
3081
|
}],
|
|
2889
|
-
[
|
|
3082
|
+
[Q.HIGH, {
|
|
2890
3083
|
maxPixelRatio: 1.5,
|
|
2891
3084
|
ssgiPerformanceParameters: {
|
|
2892
3085
|
sliceCount: 1,
|
|
2893
3086
|
stepCount: 12
|
|
2894
3087
|
}
|
|
2895
3088
|
}],
|
|
2896
|
-
[
|
|
3089
|
+
[Q.MEDIUM, {
|
|
2897
3090
|
maxPixelRatio: 1.25,
|
|
2898
3091
|
ssgiPerformanceParameters: {
|
|
2899
3092
|
sliceCount: 1,
|
|
2900
3093
|
stepCount: 12
|
|
2901
3094
|
}
|
|
2902
3095
|
}],
|
|
2903
|
-
[
|
|
3096
|
+
[Q.LOW, {
|
|
2904
3097
|
maxPixelRatio: 1,
|
|
2905
3098
|
ssgiPerformanceParameters: {
|
|
2906
3099
|
sliceCount: 1,
|
|
2907
3100
|
stepCount: 8
|
|
2908
3101
|
}
|
|
2909
3102
|
}],
|
|
2910
|
-
[
|
|
3103
|
+
[Q.LOWEST, {
|
|
2911
3104
|
maxPixelRatio: 1,
|
|
2912
3105
|
ssgiPerformanceParameters: {
|
|
2913
3106
|
sliceCount: 0,
|
|
2914
3107
|
stepCount: 0
|
|
2915
3108
|
}
|
|
2916
3109
|
}]
|
|
2917
|
-
]),
|
|
3110
|
+
]), Sr = [
|
|
2918
3111
|
{
|
|
2919
3112
|
min: 70,
|
|
2920
3113
|
max: Infinity,
|
|
2921
|
-
value:
|
|
3114
|
+
value: Q.HIGHEST
|
|
2922
3115
|
},
|
|
2923
3116
|
{
|
|
2924
3117
|
min: 55,
|
|
2925
3118
|
max: 69,
|
|
2926
|
-
value:
|
|
3119
|
+
value: Q.HIGHER
|
|
2927
3120
|
},
|
|
2928
3121
|
{
|
|
2929
3122
|
min: 40,
|
|
2930
3123
|
max: 54,
|
|
2931
|
-
value:
|
|
3124
|
+
value: Q.HIGH
|
|
2932
3125
|
},
|
|
2933
3126
|
{
|
|
2934
3127
|
min: 30,
|
|
2935
3128
|
max: 39,
|
|
2936
|
-
value:
|
|
3129
|
+
value: Q.MEDIUM
|
|
2937
3130
|
},
|
|
2938
3131
|
{
|
|
2939
3132
|
min: 20,
|
|
2940
3133
|
max: 29,
|
|
2941
|
-
value:
|
|
3134
|
+
value: Q.LOW
|
|
2942
3135
|
},
|
|
2943
3136
|
{
|
|
2944
3137
|
min: 0,
|
|
2945
3138
|
max: 19,
|
|
2946
|
-
value:
|
|
3139
|
+
value: Q.LOWEST
|
|
2947
3140
|
}
|
|
2948
|
-
],
|
|
3141
|
+
], Cr = (e) => Sr.find((t) => e >= t.min && e <= t.max).value, wr = class {
|
|
2949
3142
|
constructor(e) {
|
|
2950
|
-
this.qualityLevel =
|
|
3143
|
+
this.qualityLevel = br, this.qualityMap = xr, this.fpsCounter = new xe(), this.applyQualityParametersCallback = e;
|
|
2951
3144
|
}
|
|
2952
3145
|
getQualityLevel() {
|
|
2953
3146
|
return this.qualityLevel;
|
|
2954
3147
|
}
|
|
2955
3148
|
manageQualitySettings(e, t) {
|
|
2956
3149
|
this.fpsCounter.update();
|
|
2957
|
-
let n = this.fpsCounter.getFps(), r = n > 0 && n < e && this.qualityLevel !==
|
|
3150
|
+
let n = this.fpsCounter.getFps(), r = n > 0 && n < e && this.qualityLevel !== yr, i = n > t && this.qualityLevel !== vr, a = r ? "decrement" : i ? "increment" : void 0;
|
|
2958
3151
|
if (a === void 0) {
|
|
2959
3152
|
this.qualityChangePendingSince = void 0, this.qualityChangePendingDirection = void 0;
|
|
2960
3153
|
return;
|
|
@@ -2967,25 +3160,25 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
2967
3160
|
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());
|
|
2968
3161
|
}
|
|
2969
3162
|
incrementQualityLevel() {
|
|
2970
|
-
let e =
|
|
3163
|
+
let e = $.indexOf(this.qualityLevel);
|
|
2971
3164
|
this.setQualityLevelByOrderIndex(e - 1);
|
|
2972
3165
|
}
|
|
2973
3166
|
decrementQualityLevel() {
|
|
2974
|
-
let e =
|
|
3167
|
+
let e = $.indexOf(this.qualityLevel);
|
|
2975
3168
|
this.setQualityLevelByOrderIndex(e + 1);
|
|
2976
3169
|
}
|
|
2977
3170
|
setQualityLevel(e) {
|
|
2978
3171
|
this.qualityLevel !== e && (this.qualityLevel = e, this.applyCurrentQualityLevel());
|
|
2979
3172
|
}
|
|
2980
3173
|
addGUI(e, t) {
|
|
2981
|
-
let n = e.createParameters("Quality Settings"), r = Object.fromEntries(
|
|
3174
|
+
let n = e.createParameters("Quality Settings"), r = Object.fromEntries($.map((e) => [e, e])), i = { qualityLevel: this.qualityLevel };
|
|
2982
3175
|
n.add(i, "qualityLevel", r).onChange((e) => {
|
|
2983
3176
|
this.setQualityLevel(e), t();
|
|
2984
3177
|
});
|
|
2985
3178
|
}
|
|
2986
3179
|
setQualityLevelByOrderIndex(e) {
|
|
2987
|
-
let t = Math.min(Math.max(e, 0),
|
|
2988
|
-
this.setQualityLevel(
|
|
3180
|
+
let t = Math.min(Math.max(e, 0), $.length - 1);
|
|
3181
|
+
this.setQualityLevel($[t]);
|
|
2989
3182
|
}
|
|
2990
3183
|
applyCurrentQualityLevel(e = 6) {
|
|
2991
3184
|
let t = this.qualityMap.get(this.qualityLevel);
|
|
@@ -2994,40 +3187,40 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
2994
3187
|
async autoDetectInitialQualityLevel() {
|
|
2995
3188
|
let { getGPUTier: e } = await import("./dist-BZTF7IJN.mjs"), t = await e({ benchmarksURL: "./benchmarks" });
|
|
2996
3189
|
if (!t || !t.fps) {
|
|
2997
|
-
console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel =
|
|
3190
|
+
console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel = br;
|
|
2998
3191
|
return;
|
|
2999
3192
|
}
|
|
3000
|
-
this.qualityLevel =
|
|
3193
|
+
this.qualityLevel = Cr(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.`);
|
|
3001
3194
|
}
|
|
3002
|
-
},
|
|
3195
|
+
}, Tr = class e extends en {
|
|
3003
3196
|
static {
|
|
3004
3197
|
this.passId = "FogRenderPass";
|
|
3005
3198
|
}
|
|
3006
3199
|
constructor(t) {
|
|
3007
|
-
super(), this.passId = e.passId, this.sceneWithFog = void 0, this.transparentObjectsDepthPass = void 0, this.fogColor =
|
|
3200
|
+
super(), this.passId = e.passId, this.sceneWithFog = void 0, this.transparentObjectsDepthPass = void 0, this.fogColor = P(new D(t.color)), this.fogNearBlend = P(t.nearBlend), this.fogFarBlend = P(t.farBlend), this.depthOverrideMaterial = new le({ side: 2 });
|
|
3008
3201
|
}
|
|
3009
3202
|
assemble(e, t, n, r, i) {
|
|
3010
|
-
if (!(r instanceof
|
|
3011
|
-
let a = e.getTextureNode("depth"), o = this.getTransparentObjectsDepthPassTexture(n, r), s = Ve(a.r, o.r), c =
|
|
3012
|
-
return this.addSceneFog(n,
|
|
3203
|
+
if (!(r instanceof E) || i === "no fog" || i === "depth") return this.removeSceneFog(), t;
|
|
3204
|
+
let a = e.getTextureNode("depth"), o = this.getTransparentObjectsDepthPassTexture(n, r), s = Ve(a.r, o.r), c = P(r.projectionMatrixInverse), l = P(r.matrixWorld), u = Ve(P(r.far).onRenderUpdate(() => r.far), 50).sub(this.fogFarBlend), d = u.sub(this.fogNearBlend), f = I(Vt.x.mul(2).sub(1), Vt.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);
|
|
3205
|
+
return this.addSceneFog(n, d, u), Ge(I(this.fogColor, 1), t, g);
|
|
3013
3206
|
}
|
|
3014
3207
|
addSceneFog(e, t, n) {
|
|
3015
|
-
let r =
|
|
3016
|
-
e.fogNode =
|
|
3208
|
+
let r = It.xz.length(), i = n.sub(r).div(n.sub(t)).clamp(0, 1).oneMinus();
|
|
3209
|
+
e.fogNode = wt(this.fogColor, i), this.sceneWithFog = e;
|
|
3017
3210
|
}
|
|
3018
3211
|
getTransparentObjectsDepthPassTexture(e, t) {
|
|
3019
|
-
return this.transparentObjectsDepthPass?.dispose(), this.transparentObjectsDepthPass =
|
|
3212
|
+
return this.transparentObjectsDepthPass?.dispose(), this.transparentObjectsDepthPass = Ht(e, t), this.transparentObjectsDepthPass.opaque = !1, this.transparentObjectsDepthPass.overrideMaterial = this.depthOverrideMaterial, this.transparentObjectsDepthPass.getTextureNode("depth");
|
|
3020
3213
|
}
|
|
3021
3214
|
removeSceneFog() {
|
|
3022
3215
|
this.sceneWithFog &&= (this.sceneWithFog.fogNode = null, void 0), this.transparentObjectsDepthPass?.dispose(), this.transparentObjectsDepthPass = void 0;
|
|
3023
3216
|
}
|
|
3024
|
-
addParametersToGUI(e,
|
|
3025
|
-
let
|
|
3026
|
-
|
|
3027
|
-
this.fogColor.value.set(e),
|
|
3217
|
+
addParametersToGUI(e, t) {
|
|
3218
|
+
let n = e.addFolder("Fog Settings");
|
|
3219
|
+
n.add(this.fogNearBlend, "value", 0, 30, .1).name("near blend").onChange(() => t()), n.add(this.fogFarBlend, "value", 0, 30, .1).name("far blend").onChange(() => t()), n.addColor({ color: this.fogColor.value.getHex(a) }, "color").name("color").onChange((e) => {
|
|
3220
|
+
this.fogColor.value.set(e), t();
|
|
3028
3221
|
});
|
|
3029
3222
|
}
|
|
3030
|
-
},
|
|
3223
|
+
}, Er = class e extends en {
|
|
3031
3224
|
constructor(...t) {
|
|
3032
3225
|
super(...t), this.passId = e.passId;
|
|
3033
3226
|
}
|
|
@@ -3035,20 +3228,20 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
3035
3228
|
this.passId = "DebugRenderPass";
|
|
3036
3229
|
}
|
|
3037
3230
|
assemble(e, t, n, r, i) {
|
|
3038
|
-
return i === "depth" ?
|
|
3231
|
+
return i === "depth" ? I(j(e.getTextureNode("depth").r), 1) : t;
|
|
3039
3232
|
}
|
|
3040
3233
|
addParametersToGUI(e, t) {}
|
|
3041
|
-
},
|
|
3042
|
-
[
|
|
3043
|
-
[
|
|
3044
|
-
[
|
|
3045
|
-
[
|
|
3046
|
-
[
|
|
3047
|
-
[
|
|
3048
|
-
[
|
|
3049
|
-
},
|
|
3234
|
+
}, Dr = {
|
|
3235
|
+
[O.NONE]: 0,
|
|
3236
|
+
[O.LINEAR]: 1,
|
|
3237
|
+
[O.REINHARD]: 2,
|
|
3238
|
+
[O.CINEON]: 3,
|
|
3239
|
+
[O.ACES_FILMIC]: 4,
|
|
3240
|
+
[O.AGX]: 6,
|
|
3241
|
+
[O.NEUTRAL]: 7
|
|
3242
|
+
}, Or = class extends be {
|
|
3050
3243
|
constructor(e, t, n, r, i = n) {
|
|
3051
|
-
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
|
|
3244
|
+
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 wr(this.applyQualityParameters.bind(this)), this.freezeFrames = 0, this.freezeRenderTarget = new c(), this.debugRenderPass = new Er(), this.renderPipeline = new Me(t), this.applyToneMappingConfig(), this.enableDefaultRenderPasses(n, r, i), this._initData.webGpuConfig.autoDetectQualityLevel ? this.qualityManager.autoDetectInitialQualityLevel().then(() => this.qualityManager.applyCurrentQualityLevel(0)) : this.qualityManager.applyCurrentQualityLevel(0);
|
|
3052
3245
|
}
|
|
3053
3246
|
enableDefaultRenderPasses(e, t, n) {
|
|
3054
3247
|
let r = this._initData.webGpuConfig.fog.enabled, i = this._initData.transparentBackground;
|
|
@@ -3092,15 +3285,15 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
3092
3285
|
this.renderer.setRenderTarget(this.freezeRenderTarget), this.renderPipeline.render(), this.renderer.setRenderTarget(e);
|
|
3093
3286
|
}
|
|
3094
3287
|
updateCameraProjectionMatrix(e) {
|
|
3095
|
-
(e instanceof
|
|
3288
|
+
(e instanceof r || e instanceof E) && e.updateProjectionMatrix();
|
|
3096
3289
|
}
|
|
3097
3290
|
assembleRenderPasses(e, t) {
|
|
3098
|
-
let n =
|
|
3099
|
-
n.setMRT(
|
|
3100
|
-
output:
|
|
3101
|
-
diffuseColor:
|
|
3102
|
-
normal:
|
|
3103
|
-
velocity:
|
|
3291
|
+
let n = Pt(e, t), r = n;
|
|
3292
|
+
n.setMRT(We({
|
|
3293
|
+
output: vt,
|
|
3294
|
+
diffuseColor: nt,
|
|
3295
|
+
normal: kt(ct),
|
|
3296
|
+
velocity: He
|
|
3104
3297
|
}));
|
|
3105
3298
|
for (let i of this.renderPasses.values()) r = i.assemble(n, r, e, t, this.debugMode);
|
|
3106
3299
|
return this.debugRenderPass.assemble(n, r, e, t, this.debugMode);
|
|
@@ -3113,7 +3306,7 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
3113
3306
|
this.isConfiguratorMode && this._webGpuGroundShadowReflection.setReceiveShadow(e);
|
|
3114
3307
|
}
|
|
3115
3308
|
enableOutline(e, t) {
|
|
3116
|
-
this.getOutlinePassOrUndefined() || this.addRenderPass(new
|
|
3309
|
+
this.getOutlinePassOrUndefined() || this.addRenderPass(new tn({
|
|
3117
3310
|
selectedObjects: [],
|
|
3118
3311
|
visibleEdgeColor: e,
|
|
3119
3312
|
hiddenEdgeColor: t,
|
|
@@ -3123,13 +3316,13 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
3123
3316
|
}));
|
|
3124
3317
|
}
|
|
3125
3318
|
getOutlinePassOrUndefined() {
|
|
3126
|
-
let e = this.renderPasses.get(
|
|
3127
|
-
if (e && e instanceof
|
|
3319
|
+
let e = this.renderPasses.get(tn.passId);
|
|
3320
|
+
if (e && e instanceof tn) return e;
|
|
3128
3321
|
}
|
|
3129
3322
|
enableSsgiPass(e) {
|
|
3130
|
-
if (this.renderPasses.get(
|
|
3323
|
+
if (this.renderPasses.get(nr.passId)) return;
|
|
3131
3324
|
let t = this._initData.webGpuConfig.ssgi;
|
|
3132
|
-
this.addRenderPass(new
|
|
3325
|
+
this.addRenderPass(new nr({
|
|
3133
3326
|
sliceCount: 2,
|
|
3134
3327
|
stepCount: 12,
|
|
3135
3328
|
radius: 8,
|
|
@@ -3146,20 +3339,20 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
3146
3339
|
}));
|
|
3147
3340
|
}
|
|
3148
3341
|
enableTraaPass() {
|
|
3149
|
-
this.renderPasses.get(
|
|
3342
|
+
this.renderPasses.get(_r.passId) || this.addRenderPass(new _r());
|
|
3150
3343
|
}
|
|
3151
3344
|
enableFogPass() {
|
|
3152
|
-
if (this.renderPasses.get(
|
|
3345
|
+
if (this.renderPasses.get(Tr.passId)) return;
|
|
3153
3346
|
let e = this._initData.webGpuConfig.fog;
|
|
3154
|
-
this.addRenderPass(new
|
|
3347
|
+
this.addRenderPass(new Tr({
|
|
3155
3348
|
color: this._initData.colors.DEFAULT_BACKGROUND,
|
|
3156
3349
|
nearBlend: e.nearBlend,
|
|
3157
3350
|
farBlend: e.farBlend
|
|
3158
3351
|
}));
|
|
3159
3352
|
}
|
|
3160
3353
|
disableFogPass() {
|
|
3161
|
-
let e = this.renderPasses.get(
|
|
3162
|
-
!e || !(e instanceof
|
|
3354
|
+
let e = this.renderPasses.get(Tr.passId);
|
|
3355
|
+
!e || !(e instanceof Tr) || (e.removeSceneFog(), this.renderPasses.delete(Tr.passId));
|
|
3163
3356
|
}
|
|
3164
3357
|
applyQualityParameters(e, t) {
|
|
3165
3358
|
this.freezeFrames = Math.max(t, this.freezeFrames);
|
|
@@ -3167,17 +3360,17 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
3167
3360
|
this.renderer.setPixelRatio(Math.min(n, e.maxPixelRatio)), this.getSsgiPassOrUndefined()?.updatePerformanceParameters(e.ssgiPerformanceParameters), this.passNeedsReassembly = !0;
|
|
3168
3361
|
}
|
|
3169
3362
|
getSsgiPassOrUndefined() {
|
|
3170
|
-
let e = this.renderPasses.get(
|
|
3171
|
-
if (e && e instanceof
|
|
3363
|
+
let e = this.renderPasses.get(nr.passId);
|
|
3364
|
+
if (e && e instanceof nr) return e;
|
|
3172
3365
|
}
|
|
3173
3366
|
setShadingType(e) {
|
|
3174
3367
|
e !== ge.DEFAULT && console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
|
|
3175
3368
|
}
|
|
3176
3369
|
showGUI(e) {
|
|
3177
|
-
if (this.renderer.inspector instanceof
|
|
3370
|
+
if (this.renderer.inspector instanceof Hn) return;
|
|
3178
3371
|
let t = document.createElement("style");
|
|
3179
3372
|
t.innerText = ".profiler-toggle,\n .profiler-mini-panel {\n left: 15px;\n right: auto !important;\n }", document.head.appendChild(t);
|
|
3180
|
-
let n = new
|
|
3373
|
+
let n = new Hn();
|
|
3181
3374
|
this.renderer.inspector = n, this._domHelper.element?.appendChild(n.domElement), this.addDebugGUI(n, e), this.qualityManager.addGUI(n, e);
|
|
3182
3375
|
let r = n.createParameters("Render Pass Settings");
|
|
3183
3376
|
for (let t of this.renderPasses.values()) t.addParametersToGUI(r, e);
|
|
@@ -3204,7 +3397,7 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
3204
3397
|
}
|
|
3205
3398
|
applyToneMappingConfig() {
|
|
3206
3399
|
let { toneMapping: e, toneMappingExposure: t } = this._initData.webGpuConfig;
|
|
3207
|
-
this.renderer.toneMapping =
|
|
3400
|
+
this.renderer.toneMapping = Dr[e], this.renderer.toneMappingExposure = t;
|
|
3208
3401
|
}
|
|
3209
3402
|
addToneMappingSettings(e, t) {
|
|
3210
3403
|
let n = e.addFolder("Tone Mapping"), r = {
|
|
@@ -3227,7 +3420,7 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
3227
3420
|
}
|
|
3228
3421
|
getOrCreateGUIParameters(e) {
|
|
3229
3422
|
let t = this.renderer.inspector;
|
|
3230
|
-
if (t instanceof
|
|
3423
|
+
if (t instanceof Hn) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
|
|
3231
3424
|
throw Error("Inspector GUI is not initialized. Call showGUI() before creating parameter groups.");
|
|
3232
3425
|
}
|
|
3233
3426
|
createAndCacheGUIParameters(e, t) {
|
|
@@ -3235,8 +3428,8 @@ var nr = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [tr(t + 1, 2), tr(
|
|
|
3235
3428
|
return this.guiParameterGroups.set(t, n), n;
|
|
3236
3429
|
}
|
|
3237
3430
|
};
|
|
3238
|
-
ye([ve, _e("design:type", Object)],
|
|
3431
|
+
ye([ve, _e("design:type", Object)], Or.prototype, "_domHelper", void 0), ye([ve, _e("design:type", Object)], Or.prototype, "_webGpuGroundShadowReflection", void 0), ye([ve, _e("design:type", Object)], Or.prototype, "_webGpuSkyContainer", void 0), ye([ve, _e("design:type", Object)], Or.prototype, "_skyStateTracker", void 0), ye([ve, _e("design:type", Object)], Or.prototype, "_initData", void 0);
|
|
3239
3432
|
//#endregion
|
|
3240
|
-
export {
|
|
3433
|
+
export { Or as RoomleWebGPURenderer };
|
|
3241
3434
|
|
|
3242
|
-
//# sourceMappingURL=roomle-webgpu-renderer-
|
|
3435
|
+
//# sourceMappingURL=roomle-webgpu-renderer-BSvxbopA.mjs.map
|