@roomle/web-sdk 4.0.0 → 4.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{BufferGeometry-CnbfgBmz.mjs → BufferGeometry-DcRNeLZD.mjs} +2 -2
- package/lib/{BufferGeometry-CnbfgBmz.mjs.map → BufferGeometry-DcRNeLZD.mjs.map} +1 -1
- package/lib/{GLTFExporter-BxcjPMva.mjs → GLTFExporter-DdzTpCjW.mjs} +46 -46
- package/lib/{GLTFExporter-BxcjPMva.mjs.map → GLTFExporter-DdzTpCjW.mjs.map} +1 -1
- package/lib/{GaussianBlurNode-8gO-I1qG.mjs → GaussianBlurNode-CLuzhfDu.mjs} +19 -19
- package/lib/{GaussianBlurNode-8gO-I1qG.mjs.map → GaussianBlurNode-CLuzhfDu.mjs.map} +1 -1
- package/lib/{Object3D-DMaDdv-D.mjs → Object3D-CEXK2mMb.mjs} +1 -1
- package/lib/{Object3D-DMaDdv-D.mjs.map → Object3D-CEXK2mMb.mjs.map} +1 -1
- package/lib/Pass-C7MZilDW.mjs +53 -0
- package/lib/Pass-C7MZilDW.mjs.map +1 -0
- package/lib/{PointLightHelper-CahXSxiA.mjs → PointLightHelper-dDeo1kUI.mjs} +4 -4
- package/lib/{PointLightHelper-CahXSxiA.mjs.map → PointLightHelper-dDeo1kUI.mjs.map} +1 -1
- package/lib/{SpotLightHelper-BEqeYq1p.mjs → SpotLightHelper-BsMEPgVo.mjs} +3 -3
- package/lib/{SpotLightHelper-BEqeYq1p.mjs.map → SpotLightHelper-BsMEPgVo.mjs.map} +1 -1
- package/lib/{USDZExporter-ZZoG1mne.mjs → USDZExporter-BIDQSKG4.mjs} +3 -3
- package/lib/{USDZExporter-ZZoG1mne.mjs.map → USDZExporter-BIDQSKG4.mjs.map} +1 -1
- package/lib/{Vector4-BkA_VGid.mjs → Vector4-D-4p8rfn.mjs} +2 -2
- package/lib/{Vector4-BkA_VGid.mjs.map → Vector4-D-4p8rfn.mjs.map} +1 -1
- package/lib/{api-CUyBdNba.mjs → api-BEszDVqh.mjs} +10 -10
- package/lib/{api-CUyBdNba.mjs.map → api-BEszDVqh.mjs.map} +1 -1
- package/lib/{asset-loader.worker-C_5RQYHp.mjs → asset-loader.worker-eqHzNAwa.mjs} +1 -1
- package/lib/asset-loader.worker-eqHzNAwa.mjs.map +1 -0
- package/lib/{banana-for-scale-B77S3z9R.mjs → banana-for-scale-CiCouumi.mjs} +4 -4
- package/lib/{banana-for-scale-B77S3z9R.mjs.map → banana-for-scale-CiCouumi.mjs.map} +1 -1
- package/lib/{budgeteer.sw-DxeAvd0v.mjs → budgeteer.sw-BUMElkO1.mjs} +1 -1
- package/lib/budgeteer.sw-BUMElkO1.mjs.map +1 -0
- package/lib/{common-utils-BiOW17Ao.mjs → common-utils-CCzT4Gnn.mjs} +2 -2
- package/lib/{common-utils-BiOW17Ao.mjs.map → common-utils-CCzT4Gnn.mjs.map} +1 -1
- package/lib/{component-dimensioning-DPyPzSsa.mjs → component-dimensioning-DWEZ4jZg.mjs} +7 -7
- package/lib/{component-dimensioning-DPyPzSsa.mjs.map → component-dimensioning-DWEZ4jZg.mjs.map} +1 -1
- package/lib/{component-raycast-helper-RiQIybsX.mjs → component-raycast-helper-D2hyLpdX.mjs} +17 -17
- package/lib/{component-raycast-helper-RiQIybsX.mjs.map → component-raycast-helper-D2hyLpdX.mjs.map} +1 -1
- package/lib/configurator-BENT3shs.mjs +2 -0
- package/lib/{configurator-C_rsqn9l.mjs → configurator-BjLLdSf8.mjs} +16 -16
- package/lib/{configurator-C_rsqn9l.mjs.map → configurator-BjLLdSf8.mjs.map} +1 -1
- package/lib/{continuous-drawing-helper-C_Yc0uuv.mjs → continuous-drawing-helper-CCuU99Vh.mjs} +3 -3
- package/lib/{continuous-drawing-helper-C_Yc0uuv.mjs.map → continuous-drawing-helper-CCuU99Vh.mjs.map} +1 -1
- package/lib/{dat.gui.module-BLjoST8r.mjs → dat.gui.module-B2PXSbre.mjs} +1 -1
- package/lib/{dat.gui.module-BLjoST8r.mjs.map → dat.gui.module-B2PXSbre.mjs.map} +1 -1
- package/lib/{decorate-BAtqSPNS.mjs → decorate-CX1ZGuFY.mjs} +1 -1
- package/lib/{decorate-BAtqSPNS.mjs.map → decorate-CX1ZGuFY.mjs.map} +1 -1
- package/lib/{dimensioning-helper-D9oxGkry.mjs → dimensioning-helper-CjuQqjBn.mjs} +14 -14
- package/lib/{dimensioning-helper-D9oxGkry.mjs.map → dimensioning-helper-CjuQqjBn.mjs.map} +1 -1
- package/lib/dimensioning-helper-ImsWfczi.mjs +2 -0
- package/lib/{dist-DGov-RNo.mjs → dist-Blgk0vU0.mjs} +1 -1
- package/lib/{dist-DGov-RNo.mjs.map → dist-Blgk0vU0.mjs.map} +1 -1
- package/lib/{fflate.module-CTnSdWOb.mjs → fflate.module-DTkA0kF8.mjs} +1 -1
- package/lib/{fflate.module-CTnSdWOb.mjs.map → fflate.module-DTkA0kF8.mjs.map} +1 -1
- package/lib/{glb-viewer-A5vSLFZ5.mjs → glb-viewer-9Ata6ZNJ.mjs} +59 -45
- package/lib/glb-viewer-9Ata6ZNJ.mjs.map +1 -0
- package/lib/glb-viewer-CGqSGT38.mjs +2 -0
- package/lib/{highlight-coordinator-CZEJGeXA.mjs → highlight-coordinator-PyWNABN9.mjs} +3 -3
- package/lib/{highlight-coordinator-CZEJGeXA.mjs.map → highlight-coordinator-PyWNABN9.mjs.map} +1 -1
- package/lib/{homag-intelligence-BdCDX7LF.mjs → homag-intelligence-BNqPqVgE.mjs} +3 -3
- package/lib/{homag-intelligence-BdCDX7LF.mjs.map → homag-intelligence-BNqPqVgE.mjs.map} +1 -1
- package/lib/{imos-ix-poc-export-helper-CaXXDNvP.mjs → imos-ix-poc-export-helper-C1LfrtjM.mjs} +3 -3
- package/lib/{imos-ix-poc-export-helper-CaXXDNvP.mjs.map → imos-ix-poc-export-helper-C1LfrtjM.mjs.map} +1 -1
- package/lib/{kernel-utils-BYEsHVYJ.mjs → kernel-utils-Cn4evFqF.mjs} +2 -2
- package/lib/{kernel-utils-BYEsHVYJ.mjs.map → kernel-utils-Cn4evFqF.mjs.map} +1 -1
- package/lib/{layer-CIWL5ZW3.mjs → layer-DvZF9ur3.mjs} +1 -1
- package/lib/{layer-CIWL5ZW3.mjs.map → layer-DvZF9ur3.mjs.map} +1 -1
- package/lib/{main-BUl8iCi1.mjs → main-n3n3jdja.mjs} +1097 -1017
- package/lib/{main-BUl8iCi1.mjs.map → main-n3n3jdja.mjs.map} +1 -1
- package/lib/{material-viewer-C4SqVaGG.mjs → material-viewer-Cv5Awgwm.mjs} +24 -24
- package/lib/{material-viewer-C4SqVaGG.mjs.map → material-viewer-Cv5Awgwm.mjs.map} +1 -1
- package/lib/{packages-C9gO5mKk.mjs → packages-B3bi3adH.mjs} +5 -5
- package/lib/{packages-C9gO5mKk.mjs.map → packages-B3bi3adH.mjs.map} +1 -1
- package/lib/planner-DIT2VvMG.mjs +44 -0
- package/lib/{planner-t4QH26WW.mjs.map → planner-DIT2VvMG.mjs.map} +1 -1
- package/lib/planner-DaI8ZwEe.mjs +2 -0
- package/lib/{plugin-system-COZJdJH_.mjs → plugin-system-FuZpDWqv.mjs} +3 -3
- package/lib/{plugin-system-COZJdJH_.mjs.map → plugin-system-FuZpDWqv.mjs.map} +1 -1
- package/lib/roomle-headless-setup-CMHahWyC.mjs +612 -0
- package/lib/roomle-headless-setup-CMHahWyC.mjs.map +1 -0
- package/lib/roomle-headless.d.ts +113 -34
- package/lib/roomle-headless.js +433 -84
- package/lib/roomle-headless.js.map +1 -1
- package/lib/{roomle-renderer-DhLUaHJZ.mjs → roomle-renderer-BR0UKz2y.mjs} +2 -2
- package/lib/{roomle-renderer-DhLUaHJZ.mjs.map → roomle-renderer-BR0UKz2y.mjs.map} +1 -1
- package/lib/roomle-sdk.d.ts +37 -9
- package/lib/roomle-sdk.js +8 -8
- package/lib/{roomle-webgpu-renderer-CRGcdahn.mjs → roomle-webgpu-renderer-fOYJoKJU.mjs} +175 -173
- package/lib/roomle-webgpu-renderer-fOYJoKJU.mjs.map +1 -0
- package/lib/{scene-renderer-D5CfxCag.mjs → scene-renderer-CAzAJ4pS.mjs} +212 -211
- package/lib/{scene-renderer-D5CfxCag.mjs.map → scene-renderer-CAzAJ4pS.mjs.map} +1 -1
- package/lib/{script-loader-D6IuUFjw.mjs → script-loader-BAWHLt9q.mjs} +3 -3
- package/lib/{script-loader-D6IuUFjw.mjs.map → script-loader-BAWHLt9q.mjs.map} +1 -1
- package/lib/{shading-settings-BEMqEGzB.mjs → shading-settings-BPpgt0Fq.mjs} +101 -146
- package/lib/shading-settings-BPpgt0Fq.mjs.map +1 -0
- package/lib/{stats-helper-DAfbSToL.mjs → stats-helper-CqiTcJuc.mjs} +3 -3
- package/lib/{stats-helper-DAfbSToL.mjs.map → stats-helper-CqiTcJuc.mjs.map} +1 -1
- package/lib/{svgo.browser-DYieWzyw.mjs → svgo.browser-EB1zkPfG.mjs} +1 -1
- package/lib/{svgo.browser-DYieWzyw.mjs.map → svgo.browser-EB1zkPfG.mjs.map} +1 -1
- package/lib/{three.core-DjCexDCp.mjs → three.core-CmmDf_BZ.mjs} +73 -38
- package/lib/{three.core-DjCexDCp.mjs.map → three.core-CmmDf_BZ.mjs.map} +1 -1
- package/lib/{three.module-CuRNgijg.mjs → three.module-BkkLbA6n.mjs} +857 -857
- package/lib/{three.module-CuRNgijg.mjs.map → three.module-BkkLbA6n.mjs.map} +1 -1
- package/lib/three.tsl-8HwZJGJ8.mjs +2 -0
- package/lib/{three.tsl-BIBER8nk.mjs → three.tsl-Cw9IeeKW.mjs} +64 -52
- package/lib/{three.tsl-BIBER8nk.mjs.map → three.tsl-Cw9IeeKW.mjs.map} +1 -1
- package/lib/three.webgpu-Bw4_U6Q1.mjs +3 -0
- package/lib/{three.webgpu-Bz4Xtk0X.mjs → three.webgpu-DL5l_0xI.mjs} +1742 -1728
- package/lib/{three.webgpu-Bz4Xtk0X.mjs.map → three.webgpu-DL5l_0xI.mjs.map} +1 -1
- package/lib/{threejs-utils-Dpvg3Czz.mjs → threejs-utils-PRhv_eX3.mjs} +63 -63
- package/lib/{threejs-utils-Dpvg3Czz.mjs.map → threejs-utils-PRhv_eX3.mjs.map} +1 -1
- package/lib/{tools-core-BDOFf9le.mjs → tools-core-CmrXkw3J.mjs} +3 -3
- package/lib/{tools-core-BDOFf9le.mjs.map → tools-core-CmrXkw3J.mjs.map} +1 -1
- package/lib/webgpu-wkXAkJ6p.mjs +5084 -0
- package/lib/webgpu-wkXAkJ6p.mjs.map +1 -0
- package/lib/workers-YGDNEfpU.mjs +6 -0
- package/lib/{workers-DcgrO-z7.mjs.map → workers-YGDNEfpU.mjs.map} +1 -1
- package/package.json +5 -4
- package/lib/asset-loader.worker-C_5RQYHp.mjs.map +0 -1
- package/lib/budgeteer.sw-DxeAvd0v.mjs.map +0 -1
- package/lib/configurator-BBlZVIId.mjs +0 -2
- package/lib/dimensioning-helper-Bzf1sbpy.mjs +0 -2
- package/lib/glb-viewer-A5vSLFZ5.mjs.map +0 -1
- package/lib/glb-viewer-B4ILlvw0.mjs +0 -2
- package/lib/planner-49YwTdiA.mjs +0 -2
- package/lib/planner-t4QH26WW.mjs +0 -44
- package/lib/roomle-headless-setup-Cc8EAnVe.mjs +0 -1204
- package/lib/roomle-headless-setup-Cc8EAnVe.mjs.map +0 -1
- package/lib/roomle-webgpu-renderer-CRGcdahn.mjs.map +0 -1
- package/lib/shading-settings-BEMqEGzB.mjs.map +0 -1
- package/lib/three.tsl-Q-21y0pO.mjs +0 -2
- package/lib/three.webgpu-dtN0kDKB.mjs +0 -3
- package/lib/workers-DcgrO-z7.mjs +0 -6
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Ar as e, Br as t, Cr as n, En as r,
|
|
2
|
-
import { t as ce } from "./shading-settings-
|
|
3
|
-
import { n as le, r as ue, t as de } from "./decorate-
|
|
4
|
-
import { a as A, n as fe, r as pe } from "./roomle-renderer-
|
|
5
|
-
import {
|
|
6
|
-
import { $ as we, A as Te, B as Ee, C as De, Ct as
|
|
1
|
+
import { Ar as e, Br as t, Cr as n, En as r, Gi as i, Gn as a, J as o, Jr as s, Kn as c, On as l, Qt as u, Si as d, Tt as f, Ui as p, Y as m, _i as h, bi as g, ct as _, g as v, gi as y, hi as b, hr as x, ht as S, in as C, jr as w, kr as T, li as E, mi as ee, mr as te, q as ne, rt as D, sn as O, t as re, vi as ie, w as k, wr as ae, xi as oe, yi as se } from "./three.core-CmmDf_BZ.mjs";
|
|
2
|
+
import { t as ce } from "./shading-settings-BPpgt0Fq.mjs";
|
|
3
|
+
import { n as le, r as ue, t as de } from "./decorate-CX1ZGuFY.mjs";
|
|
4
|
+
import { a as A, n as fe, r as pe } from "./roomle-renderer-BR0UKz2y.mjs";
|
|
5
|
+
import { At as me, Kn as he, Mn as ge, Q as _e, Wt as ve, dn as ye, dr as be, mr as xe, x as Se, xn as j, yn as Ce, zt as M } from "./three.webgpu-DL5l_0xI.mjs";
|
|
6
|
+
import { $ as we, A as Te, At as N, B as Ee, C as De, Ct as P, D as Oe, Dt as ke, E as F, F as Ae, G as je, H as Me, I as Ne, J as Pe, K as Fe, M as Ie, Mt as Le, N as Re, Nt as ze, O as Be, P as Ve, Pt as He, Q as Ue, S as We, T as Ge, U as Ke, V as qe, W as Je, X as Ye, Y as Xe, Z as Ze, _ as Qe, _t as $e, a as et, at as tt, b as nt, bt as rt, c as it, ct as at, d as ot, dt as st, et as ct, f as lt, ft as ut, g as dt, h as ft, ht as pt, i as I, jt as L, k as mt, kt as R, l as ht, lt as gt, m as _t, mt as vt, n as z, nt as yt, o as bt, ot as xt, p as St, q as Ct, r as wt, rt as Tt, s as Et, t as Dt, u as Ot, ut as kt, v as At, vt as jt, w as B, wt as V, x as Mt, y as Nt, yt as H, z as U } from "./three.tsl-Cw9IeeKW.mjs";
|
|
7
7
|
//#region ../../node_modules/three/examples/jsm/tsl/display/OutlineNode.js
|
|
8
|
-
var W = /* @__PURE__ */ new
|
|
8
|
+
var W = /* @__PURE__ */ new ye(), Pt = /* @__PURE__ */ new d(), Ft = /* @__PURE__ */ new d(1, 0), It = /* @__PURE__ */ new d(0, 1), G, Lt = class extends he {
|
|
9
9
|
static get type() {
|
|
10
10
|
return "OutlineNode";
|
|
11
11
|
}
|
|
12
12
|
constructor(e, t, n = {}) {
|
|
13
13
|
super("vec4");
|
|
14
|
-
let { selectedObjects: r = [], edgeThickness: i =
|
|
15
|
-
this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode =
|
|
14
|
+
let { selectedObjects: r = [], edgeThickness: i = F(1), edgeGlow: a = F(0), downSampleRatio: o = 2 } = n;
|
|
15
|
+
this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode = Je(i), this.edgeGlowNode = Je(a), this.downSampleRatio = o, this.updateBeforeType = ve.FRAME, this._renderTargetDepthBuffer = new w(), this._renderTargetDepthBuffer.depthTexture = new m(), this._renderTargetDepthBuffer.depthTexture.type = _, this._renderTargetMaskBuffer = new w(), this._renderTargetMaskDownSampleBuffer = new w(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new w(1, 1, { depthBuffer: !1 }), this._cameraNear = Tt("near", "float", t), this._cameraFar = Tt("far", "float", t), this._blurDirection = V(new d()), this._depthTextureUniform = H(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = H(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = H(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = H(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = H(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = H(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = N(1, 0, 0), this._hiddenEdgeColor = N(0, 1, 0), this._depthMaterial = new M(), this._depthMaterial.colorNode = ft(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new ge(), this._depthSpriteMaterial.colorNode = ft(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new M(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new ge(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new M(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new M(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new M(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new M(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new M(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = Ye(this, this._renderTargetComposite.texture);
|
|
16
16
|
}
|
|
17
17
|
get visibleEdge() {
|
|
18
18
|
return this.r;
|
|
@@ -31,10 +31,10 @@ var W = /* @__PURE__ */ new xe(), Pt = /* @__PURE__ */ new k(), Ft = /* @__PURE_
|
|
|
31
31
|
updateBefore(e) {
|
|
32
32
|
let { renderer: t } = e, { camera: n, scene: r } = this;
|
|
33
33
|
if (this._updateSelectionCache(), this._selectionCache.size === 0) {
|
|
34
|
-
this._lastSelectionCount > 0 && (G =
|
|
34
|
+
this._lastSelectionCount > 0 && (G = j.resetRendererState(t, G), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), j.restoreRendererState(t, G), this._lastSelectionCount = 0);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
this._lastSelectionCount = this._selectionCache.size, G =
|
|
37
|
+
this._lastSelectionCount = this._selectionCache.size, G = j.resetRendererAndSceneState(t, r, G);
|
|
38
38
|
let i = t.getDrawingBufferSize(Pt);
|
|
39
39
|
this.setSize(i.width, i.height), t.setClearColor(16777215, 1);
|
|
40
40
|
let a = r.name;
|
|
@@ -48,33 +48,33 @@ var W = /* @__PURE__ */ new xe(), Pt = /* @__PURE__ */ new k(), Ft = /* @__PURE_
|
|
|
48
48
|
let a = e.isSprite ? this._prepareMaskSpriteMaterial : this._prepareMaskMaterial;
|
|
49
49
|
t.renderObject(e, n, r, i, a, o, s, c);
|
|
50
50
|
}
|
|
51
|
-
}), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(G.renderObjectFunction), this._selectionCache.clear(), r.name = a, W.material = this._materialCopy, W.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), W.render(t), W.material = this._edgeDetectionMaterial, W.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Ft), 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(It), t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Ft), 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(It), t.setRenderTarget(this._renderTargetEdgeBuffer2), W.render(t), W.material = this._compositeMaterial, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), W.render(t),
|
|
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(Ft), 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(It), t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Ft), 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(It), t.setRenderTarget(this._renderTargetEdgeBuffer2), W.render(t), W.material = this._compositeMaterial, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), W.render(t), j.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(gt), t;
|
|
56
|
+
return t = this.camera.isPerspectiveCamera ? Ze(e, this._cameraNear, this._cameraFar) : Ct(e, this._cameraNear, this._cameraFar), N(0, Ue.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 = z(() => {
|
|
60
|
+
let e = rt(this._maskTextureDownsSampleUniform), t = R(1).div(e).toVar(), n = L(1, 0, 0, 1).mul(L(t, t)), r = ke(), 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 = R(Ke(i.r.sub(a.r), .5), Ke(o.r.sub(s.r), .5)).length();
|
|
61
|
+
return L(Ee(Ee(i.g, a.g), Ee(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 = z(([e, t]) => F(.39894).mul(Ge(F(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = z(([e]) => {
|
|
65
|
+
let t = rt(this._maskTextureDownsSampleUniform), r = R(1).div(t).toVar(), i = ke(), 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 et({
|
|
67
|
+
start: Ie(1),
|
|
68
|
+
end: Ie(4),
|
|
69
69
|
type: "int",
|
|
70
70
|
condition: "<="
|
|
71
71
|
}, ({ i: t }) => {
|
|
72
|
-
let r = n(e.mul(
|
|
72
|
+
let r = n(e.mul(F(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 = z(() => {
|
|
78
78
|
let e = this._edge1TextureUniform, t = this._edge2TextureUniform, n = this._maskTextureUniform, r = e.add(t.mul(this.edgeGlowNode));
|
|
79
79
|
return n.r.mul(r);
|
|
80
80
|
});
|
|
@@ -93,21 +93,21 @@ var W = /* @__PURE__ */ new xe(), Pt = /* @__PURE__ */ new k(), Ft = /* @__PURE_
|
|
|
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 = V(t.edgeStrength), this.edgeGlow = V(t.edgeGlow), this.edgeThickness = V(t.edgeThickness), this.visibleEdgeColor = V(new k(t.visibleEdgeColor)), this.hiddenEdgeColor = V(new k(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 k(e), this.hiddenEdgeColor.value = new k(t);
|
|
103
103
|
}
|
|
104
104
|
assemble(e, t, n, r, i) {
|
|
105
105
|
let { visibleEdge: a, hiddenEdge: o } = Rt(n, r, {
|
|
106
106
|
selectedObjects: this.selectedObjects,
|
|
107
107
|
edgeThickness: this.edgeThickness,
|
|
108
108
|
edgeGlow: this.edgeGlow
|
|
109
|
-
}), s = a.mul(this.visibleEdgeColor).add(o.mul(this.hiddenEdgeColor)).mul(this.edgeStrength);
|
|
110
|
-
return i === "outline" ?
|
|
109
|
+
}), s = L(a.mul(this.visibleEdgeColor).add(o.mul(this.hiddenEdgeColor)).mul(this.edgeStrength), 0);
|
|
110
|
+
return i === "outline" ? L(0, 0, 0, 0).add(s) : t.add(s);
|
|
111
111
|
}
|
|
112
112
|
addParametersToGUI(e, n) {
|
|
113
113
|
let r = e.addFolder("Outline Settings");
|
|
@@ -130,7 +130,7 @@ var W = /* @__PURE__ */ new xe(), Pt = /* @__PURE__ */ new k(), Ft = /* @__PURE_
|
|
|
130
130
|
constructor(e, t) {
|
|
131
131
|
super(e, t.name), this.computeNode = t, this.isComputeStats = !0;
|
|
132
132
|
}
|
|
133
|
-
}, Wt = class extends
|
|
133
|
+
}, Wt = class extends _e {
|
|
134
134
|
constructor() {
|
|
135
135
|
super(), this.currentFrame = null, this.currentRender = null, this.currentNodes = null, this.lastFrame = null, this.frames = [], this.framesLib = {}, this.maxFrames = 512, this._lastFinishTime = 0, this._resolveTimestampPromise = null, this.isRendererInspector = !0;
|
|
136
136
|
}
|
|
@@ -178,8 +178,8 @@ var W = /* @__PURE__ */ new xe(), Pt = /* @__PURE__ */ new k(), Ft = /* @__PURE_
|
|
|
178
178
|
return this._resolveTimestampPromise === null && (this._resolveTimestampPromise = new Promise((e) => {
|
|
179
179
|
requestAnimationFrame(async () => {
|
|
180
180
|
let t = this.getRenderer();
|
|
181
|
-
await t.resolveTimestampsAsync(
|
|
182
|
-
let n = t.backend.getTimestampFrames(
|
|
181
|
+
await t.resolveTimestampsAsync(E.COMPUTE), await t.resolveTimestampsAsync(E.RENDER);
|
|
182
|
+
let n = t.backend.getTimestampFrames(E.COMPUTE), r = t.backend.getTimestampFrames(E.RENDER), i = [...new Set([...n, ...r])];
|
|
183
183
|
for (let e of i) {
|
|
184
184
|
let i = this.getFrameById(e);
|
|
185
185
|
if (i !== null) {
|
|
@@ -214,7 +214,7 @@ var W = /* @__PURE__ */ new xe(), Pt = /* @__PURE__ */ new k(), Ft = /* @__PURE_
|
|
|
214
214
|
}
|
|
215
215
|
inspect(e) {
|
|
216
216
|
let t = this.currentNodes;
|
|
217
|
-
t === null ?
|
|
217
|
+
t === null ? i("RendererInspector: Unable to inspect node outside of frame scope. Use \"renderer.setAnimationLoop()\".") : t.push(e);
|
|
218
218
|
}
|
|
219
219
|
beginCompute(e, t) {
|
|
220
220
|
let n = this.getFrame();
|
|
@@ -244,7 +244,7 @@ var W = /* @__PURE__ */ new xe(), Pt = /* @__PURE__ */ new k(), Ft = /* @__PURE_
|
|
|
244
244
|
let e = document.createElement("style");
|
|
245
245
|
e.id = "profiler-styles", e.textContent = "\n:root {\n --profiler-bg: #1e1e24f5;\n --profiler-header-bg: #2a2a33aa;\n --profiler-header: #2a2a33;\n --profiler-border: #4a4a5a;\n --text-primary: #e0e0e0;\n --text-secondary: #9a9aab;\n --accent-color: #00aaff;\n --color-green: #4caf50;\n --color-yellow: #ffc107;\n --color-red: #f44336;\n --color-fps: rgb(63, 81, 181);\n --color-call: rgba(255, 185, 34, 1);\n --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n --font-mono: 'Fira Code', 'Courier New', Courier, monospace;\n}\n\n@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Fira+Code&display=swap');\n\n#profiler-panel *, #profiler-toggle * {\n text-transform: initial;\n line-height: normal;\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n#profiler-toggle {\n position: fixed;\n top: 15px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 12px 6px 6px 12px;\n color: var(--text-primary);\n cursor: pointer;\n z-index: 1001;\n transition: all 0.2s ease-in-out;\n /*font-size: 14px;*/\n font-size: 15px;\n backdrop-filter: blur(8px);\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);\n display: flex;\n align-items: stretch;\n padding: 0;\n overflow: hidden;\n font-family: var(--font-family);\n}\n\n#profiler-toggle.position-right.panel-open {\n right: auto;\n left: 15px;\n border-radius: 6px 12px 12px 6px;\n flex-direction: row-reverse;\n}\n\n#profiler-toggle.position-right.panel-open #builtin-tabs-container {\n border-right: none;\n border-left: 1px solid #262636;\n}\n\n#profiler-toggle:hover {\n border-color: var(--accent-color);\n}\n\n#profiler-toggle.panel-open #toggle-icon {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--accent-color);\n}\n\n#toggle-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n font-size: 20px;\n transition: background-color 0.2s;\n}\n\n#profiler-toggle:hover #toggle-icon {\n background-color: rgba(255, 255, 255, 0.05);\n}\n\n#profiler-toggle.panel-open:hover #toggle-icon {\n background-color: rgba(0, 170, 255, 0.3);\n}\n\n.toggle-separator {\n width: 1px;\n background-color: var(--profiler-border);\n}\n\n#toggle-text {\n display: flex;\n align-items: baseline;\n padding: 8px 14px;\n min-width: 80px;\n justify-content: right;\n}\n\n#toggle-text .fps-label {\n font-size: 0.7em;\n margin-left: 10px;\n color: #999;\n}\n\n#builtin-tabs-container {\n display: flex;\n align-items: stretch;\n gap: 0;\n border-right: 1px solid #262636;\n order: -1;\n}\n\n.builtin-tab-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 8px 14px;\n font-family: var(--font-family);\n font-size: 13px;\n font-weight: 600;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 32px;\n position: relative;\n}\n\n.builtin-tab-btn svg {\n width: 20px;\n height: 20px;\n stroke: currentColor;\n}\n\n.builtin-tab-btn:hover {\n background-color: rgba(255, 255, 255, 0.08);\n color: var(--accent-color);\n}\n\n.builtin-tab-btn:active {\n background-color: rgba(255, 255, 255, 0.12);\n}\n\n.builtin-tab-btn.active {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--accent-color);\n}\n\n.builtin-tab-btn.active:hover {\n background-color: rgba(0, 170, 255, 0.3);\n}\n\n#profiler-mini-panel {\n position: fixed;\n top: 60px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 8px;\n color: var(--text-primary);\n z-index: 9999;\n backdrop-filter: blur(8px);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);\n font-family: var(--font-family);\n font-size: 11px;\n width: 350px;\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n overflow-x: hidden;\n display: none;\n opacity: 0;\n transform: translateY(-10px) scale(0.98);\n transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), \n transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n#profiler-mini-panel.position-right.panel-open {\n right: auto;\n left: 15px;\n}\n\n#profiler-mini-panel.visible {\n display: block;\n opacity: 1;\n transform: translateY(0) scale(1);\n}\n\n#profiler-mini-panel::-webkit-scrollbar {\n width: 6px;\n}\n\n#profiler-mini-panel::-webkit-scrollbar-track {\n background: transparent;\n}\n\n#profiler-mini-panel::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.15);\n border-radius: 3px;\n transition: background 0.2s;\n}\n\n#profiler-mini-panel::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.25);\n}\n\n.mini-panel-content {\n padding: 0;\n font-size: 11px;\n line-height: 1.5;\n font-family: var(--font-mono);\n letter-spacing: 0.3px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.mini-panel-content .profiler-content {\n display: block !important;\n background: transparent;\n}\n\n.mini-panel-content .list-scroll-wrapper {\n max-height: calc(100vh - 120px);\n overflow-y: auto;\n overflow-x: hidden;\n width: 100%;\n}\n\n.mini-panel-content .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n}\n\n.mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.1);\n border-radius: 2px;\n}\n\n.mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.mini-panel-content .parameters {\n background: transparent;\n border: none;\n box-shadow: none;\n padding: 4px;\n}\n\n.mini-panel-content .list-container.parameters {\n padding: 2px 6px 0px 6px !important;\n}\n\n.mini-panel-content .list-header {\n display: none;\n padding: 2px 4px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.mini-panel-content .list-item {\n border-bottom: 1px solid rgba(74, 74, 90, 0.2);\n transition: background-color 0.15s;\n}\n\n.mini-panel-content .list-item:last-child {\n border-bottom: none;\n}\n\n.mini-panel-content .list-item:hover {\n background-color: rgba(255, 255, 255, 0.04);\n}\n\n.mini-panel-content .list-item.actionable:hover {\n background-color: rgba(255, 255, 255, 0.06);\n cursor: pointer;\n}\n\n/* Style adjustments for lil-gui look */\n.mini-panel-content .item-row {\n padding: 3px 8px;\n min-height: 24px;\n}\n\n.mini-panel-content .list-item-row {\n padding: 1px 4px;\n gap: 8px;\n min-height: 21px;\n align-items: center;\n}\n\n.mini-panel-content input[type=\"checkbox\"] {\n width: 12px;\n height: 12px;\n}\n\n.mini-panel-content input[type=\"range\"] {\n height: 18px;\n}\n\n.mini-panel-content .value-number input,\n.mini-panel-content .value-slider input {\n background-color: rgba(0, 0, 0, 0.3);\n border: 1px solid rgba(74, 74, 90, 0.5);\n font-size: 10px;\n}\n\n.mini-panel-content .value-number input:focus,\n.mini-panel-content .value-slider input:focus {\n border-color: var(--accent-color);\n}\n\n.mini-panel-content .value-slider {\n gap: 6px;\n}\n\n/* Compact nested items */\n.mini-panel-content .list-item .list-item {\n margin-left: 8px;\n}\n\n.mini-panel-content .list-item .list-item .item-row,\n.mini-panel-content .list-item .list-item .list-item-row {\n padding: 2px 6px;\n min-height: 22px;\n}\n\n/* Compact collapsible headers */\n.mini-panel-content .collapsible .item-row,\n.mini-panel-content .list-item-row.collapsible {\n padding: 2px 8px;\n font-weight: 600;\n min-height: 16px;\n display: flex;\n align-items: center;\n}\n\n.mini-panel-content .collapsible-icon {\n font-size: 10px;\n width: 14px;\n height: 14px;\n}\n\n.mini-panel-content .param-control input[type=\"range\"] {\n height: 12px;\n margin-top: 1px;\n padding-top: 5px;\n user-select: none;\n -webkit-user-select: none;\n outline: none;\n}\n\n.mini-panel-content .param-control input[type=\"range\"]::-webkit-slider-thumb {\n width: 14px;\n height: 14px;\n margin-top: -5px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.mini-panel-content .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 14px;\n height: 14px;\n user-select: none;\n -moz-user-select: none;\n}\n\n.mini-panel-content .list-children-container {\n padding-left: 0;\n}\n\n.mini-panel-content .param-control input[type=\"number\"] {\n flex-basis: 60px !important;\n}\n\n.mini-panel-content .param-control {\n align-items: center;\n}\n\n.mini-panel-content .param-control select {\n font-size: 11px;\n}\n\n.mini-panel-content .list-item-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n#profiler-panel {\n position: fixed;\n z-index: 1001 !important;\n bottom: 0;\n left: 0;\n right: 0;\n height: 350px;\n background-color: var(--profiler-bg);\n backdrop-filter: blur(8px);\n border-top: 2px solid var(--profiler-border);\n color: var(--text-primary);\n display: flex;\n flex-direction: column;\n z-index: 1000;\n /*box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);*/\n transform: translateY(100%);\n transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.3s ease-out, width 0.3s ease-out;\n font-family: var(--font-mono);\n}\n\n#profiler-panel.resizing,\n#profiler-panel.dragging {\n transition: none;\n}\n\n#profiler-panel.visible {\n transform: translateY(0);\n}\n\n#profiler-panel.maximized {\n height: 100vh;\n}\n\n/* Position-specific styles */\n#profiler-panel.position-top {\n bottom: auto;\n top: 0;\n border-top: none;\n border-bottom: 2px solid var(--profiler-border);\n transform: translateY(-100%);\n}\n\n#profiler-panel.position-top.visible {\n transform: translateY(0);\n}\n\n#profiler-panel.position-bottom {\n /* Default position - already defined above */\n}\n\n#profiler-panel.position-left {\n top: 0;\n bottom: 0;\n left: 0;\n right: auto;\n width: 350px;\n height: 100%;\n border-top: none;\n border-right: 2px solid var(--profiler-border);\n transform: translateX(-100%);\n}\n\n#profiler-panel.position-left.visible {\n transform: translateX(0);\n}\n\n#profiler-panel.position-right {\n top: 0;\n bottom: 0;\n left: auto;\n right: 0;\n width: 350px;\n height: 100%;\n border-top: none;\n border-left: 2px solid var(--profiler-border);\n transform: translateX(100%);\n}\n\n#profiler-panel.position-right.visible {\n transform: translateX(0);\n}\n\n#profiler-panel.position-floating {\n border: 2px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);\n transform: none !important;\n overflow: hidden;\n}\n\n#profiler-panel.position-floating.visible {\n transform: none !important;\n}\n\n#profiler-panel.position-floating .profiler-header {\n border-radius: 6px 6px 0 0;\n}\n\n#profiler-panel.position-floating .panel-resizer {\n bottom: 0;\n right: 0;\n top: auto;\n left: auto;\n width: 16px;\n height: 16px;\n cursor: nwse-resize;\n border-radius: 0 0 6px 0;\n}\n\n#profiler-panel.position-floating .panel-resizer::after {\n content: '';\n position: absolute;\n right: 2px;\n bottom: 2px;\n width: 10px;\n height: 10px;\n background: linear-gradient(135deg, transparent 0%, transparent 45%, var(--profiler-border) 45%, var(--profiler-border) 55%, transparent 55%);\n}\n\n\n.panel-resizer {\n position: absolute;\n top: -2px;\n left: 0;\n width: 100%;\n height: 5px;\n cursor: ns-resize;\n z-index: 1001;\n touch-action: none;\n}\n\n#profiler-panel.position-top .panel-resizer {\n top: auto;\n bottom: -2px;\n}\n\n#profiler-panel.position-left .panel-resizer {\n top: 0;\n left: auto;\n right: -2px;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n}\n\n#profiler-panel.position-right .panel-resizer {\n top: 0;\n left: -2px;\n right: auto;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n}\n\n.profiler-header {\n display: flex;\n background-color: var(--profiler-header-bg);\n border-bottom: 1px solid var(--profiler-border);\n flex-shrink: 0;\n justify-content: space-between;\n align-items: stretch;\n\n overflow-x: auto;\n overflow-y: hidden;\n width: calc(100% - 134px);\n height: 38px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n/* Adjust header width based on panel position */\n#profiler-panel.position-right .profiler-header,\n#profiler-panel.position-left .profiler-header {\n width: calc(100% - 134px);\n}\n\n#profiler-panel.position-bottom .profiler-header,\n#profiler-panel.position-top .profiler-header {\n width: calc(100% - 134px);\n}\n\n/* Adjust header width when position toggle button is hidden (mobile) */\n#profiler-panel.hide-position-toggle .profiler-header {\n width: calc(100% - 90px);\n}\n\n/* ===== RULES FOR WHEN THERE ARE NO TABS ===== */\n\n/* Horizontal mode (bottom/top) without tabs */\n#profiler-panel.position-bottom.no-tabs:not(.maximized),\n#profiler-panel.position-top.no-tabs:not(.maximized) {\n height: 38px !important;\n min-height: 38px !important;\n}\n\n#profiler-panel.position-bottom.no-tabs .profiler-header,\n#profiler-panel.position-top.no-tabs .profiler-header {\n width: 100%;\n height: 38px;\n border-bottom: none;\n}\n\n#profiler-panel.position-bottom.no-tabs .profiler-content-wrapper,\n#profiler-panel.position-top.no-tabs .profiler-content-wrapper {\n display: none;\n}\n\n#profiler-panel.position-bottom.no-tabs .panel-resizer,\n#profiler-panel.position-top.no-tabs .panel-resizer {\n display: none;\n}\n\n/* Vertical mode (right/left) without tabs */\n#profiler-panel.position-right.no-tabs:not(.maximized),\n#profiler-panel.position-left.no-tabs:not(.maximized) {\n width: 45px !important;\n min-width: 45px !important;\n}\n\n/* Vertical layout for header when no tabs */\n#profiler-panel.position-right.no-tabs .profiler-header,\n#profiler-panel.position-left.no-tabs .profiler-header {\n width: 100%;\n flex-direction: column;\n height: 100%;\n border-bottom: none;\n}\n\n/* Vertical layout for controls when no tabs */\n#profiler-panel.position-right.no-tabs .profiler-controls,\n#profiler-panel.position-left.no-tabs .profiler-controls {\n position: static;\n flex-direction: column-reverse;\n justify-content: flex-end;\n width: 100%;\n height: 100%;\n border-bottom: none;\n border-left: none;\n background: transparent;\n}\n\n#profiler-panel.position-right.no-tabs .profiler-controls button,\n#profiler-panel.position-left.no-tabs .profiler-controls button {\n width: 100%;\n height: 45px;\n border-left: none;\n border-top: none;\n border-bottom: 1px solid var(--profiler-border);\n}\n\n#profiler-panel.position-right.no-tabs .profiler-content-wrapper,\n#profiler-panel.position-left.no-tabs .profiler-content-wrapper {\n display: none;\n}\n\n#profiler-panel.position-right.no-tabs .profiler-tabs,\n#profiler-panel.position-left.no-tabs .profiler-tabs {\n display: none;\n}\n\n#profiler-panel.position-right.no-tabs .panel-resizer,\n#profiler-panel.position-left.no-tabs .panel-resizer {\n display: none;\n}\n\n/* Hide position toggle on mobile without tabs */\n#profiler-panel.hide-position-toggle.position-right.no-tabs:not(.maximized),\n#profiler-panel.hide-position-toggle.position-left.no-tabs:not(.maximized) {\n width: 45px !important;\n min-width: 45px !important;\n}\n\n/* Hide drag indicator on mobile devices */\n#profiler-panel.is-mobile .tab-btn.active::before {\n display: none;\n}\n\n.profiler-header::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.profiler-header::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.profiler-header::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.profiler-header::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.profiler-header::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n#profiler-panel.dragging .profiler-header {\n cursor: grabbing !important;\n}\n\n#profiler-panel.dragging {\n opacity: 0.8;\n}\n\n.profiler-tabs {\n display: flex;\n cursor: grab;\n position: relative;\n}\n\n.profiler-tabs:active {\n cursor: grabbing;\n}\n\n.profiler-tabs::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.profiler-tabs::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.profiler-tabs::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.profiler-tabs::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.profiler-tabs::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n.profiler-controls {\n display: flex;\n position: absolute;\n right: 0;\n top: 0;\n height: 38px;\n background: var(--profiler-header-bg);\n border-bottom: 1px solid var(--profiler-border);\n}\n\n.tab-btn {\n position: relative;\n background: transparent;\n border: none;\n /*border-right: 1px solid var(--profiler-border);*/\n color: var(--text-secondary);\n padding: 8px 18px;\n cursor: default;\n display: flex;\n align-items: center;\n font-family: var(--font-family);\n font-weight: 600;\n font-size: 14px;\n user-select: none;\n transition: opacity 0.2s, transform 0.2s;\n touch-action: pan-x;\n}\n\n.tab-btn.active {\n border-bottom: 2px solid var(--accent-color);\n color: white;\n}\n\n.tab-btn.active::before {\n content: '⋮⋮';\n position: absolute;\n left: 3px;\n top: calc(50% - .1rem);\n transform: translateY(-50%);\n color: var(--profiler-border);\n font-size: 18px;\n letter-spacing: -2px;\n opacity: 0.6;\n}\n\n.tab-btn.no-detach.active::before {\n display: none;\n}\n\n#floating-btn,\n#maximize-btn,\n#hide-panel-btn {\n background: transparent;\n border: none;\n border-left: 1px solid var(--profiler-border);\n color: var(--text-secondary);\n width: 45px;\n height: 100%;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n/* Disable transitions in vertical mode to avoid broken animations */\n#profiler-panel.position-right #floating-btn,\n#profiler-panel.position-right #maximize-btn,\n#profiler-panel.position-right #hide-panel-btn,\n#profiler-panel.position-left #floating-btn,\n#profiler-panel.position-left #maximize-btn,\n#profiler-panel.position-left #hide-panel-btn {\n transition: background-color 0.2s, color 0.2s;\n}\n\n#floating-btn:hover,\n#maximize-btn:hover,\n#hide-panel-btn:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-primary);\n}\n\n/* Hide maximize button when there are no tabs */\n#profiler-panel.position-right.no-tabs #maximize-btn,\n#profiler-panel.position-left.no-tabs #maximize-btn,\n#profiler-panel.position-bottom.no-tabs #maximize-btn,\n#profiler-panel.position-top.no-tabs #maximize-btn {\n display: none !important;\n}\n\n.profiler-content-wrapper {\n flex-grow: 1;\n overflow: hidden;\n position: relative;\n}\n\n.profiler-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n font-size: 13px;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s, visibility 0.2s;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.profiler-content.active {\n visibility: visible;\n opacity: 1;\n}\n\n.profiler-content {\n overflow: auto; /* make sure scrollbars can appear */\n}\n\n.profiler-content::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.profiler-content::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.profiler-content::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.profiler-content::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.profiler-content::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n.profiler-content {\n scrollbar-width: thin; /* \"auto\" | \"thin\" */\n scrollbar-color: rgba(0, 0, 0, 0.25) transparent;\n}\n\n.list-item-row {\n display: grid;\n align-items: center;\n padding: 4px 8px;\n border-radius: 3px;\n transition: background-color 0.2s;\n gap: 10px;\n border-bottom: none;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.parameters .list-item-row {\n min-height: 31px;\n}\n\n.mini-panel-content .parameters .list-item-row {\n min-height: 21px;\n}\n\n.list-item-wrapper {\n margin-top: 2px;\n margin-bottom: 2px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.list-item-wrapper:first-child {\n /*margin-top: 0;*/\n}\n\n.list-item-wrapper:not(.header-wrapper):nth-child(odd) > .list-item-row {\n background-color: rgba(0,0,0,0.1);\n}\n\n.list-item-wrapper.header-wrapper>.list-item-row {\n color: var(--accent-color);\n background-color: rgba(0, 170, 255, 0.1);\n}\n\n.list-item-wrapper.header-wrapper>.list-item-row>.list-item-cell:first-child {\n font-weight: 600;\n line-height: 1;\n}\n\n.list-item-row.collapsible,\n.list-item-row.actionable {\n cursor: pointer;\n}\n\n.list-item-row.collapsible {\n background-color: rgba(0, 170, 255, 0.15) !important;\n min-height: 23px;\n}\n\n.list-item-row.collapsible.alert,\n.list-item-row.alert {\n background-color: rgba(244, 67, 54, 0.1) !important;\n}\n\n@media (hover: hover) {\n\n .list-item-row:hover:not(.collapsible):not(.no-hover),\n .list-item-row:hover:not(.no-hover),\n .list-item-row.actionable:hover,\n .list-item-row.collapsible.actionable:hover {\n background-color: rgba(255, 255, 255, 0.05) !important;\n }\n\n .list-item-row.collapsible:hover {\n background-color: rgba(0, 170, 255, 0.25) !important;\n }\n\n}\n\n.list-item-cell {\n white-space: pre;\n display: flex;\n align-items: center;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.list-item-cell:not(:first-child) {\n justify-content: flex-end;\n font-weight: 600;\n}\n\n.list-header {\n display: grid;\n align-items: center;\n padding: 4px 8px;\n font-weight: 600;\n color: var(--text-secondary);\n padding-bottom: 6px;\n border-bottom: 1px solid var(--profiler-border);\n margin-bottom: 5px;\n gap: 10px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.list-item-wrapper.section-start {\n margin-top: 5px;\n margin-bottom: 5px;\n}\n\n.list-header .list-header-cell:not(:first-child) {\n text-align: right;\n}\n\n.list-children-container {\n padding-left: 1.5em;\n overflow: hidden;\n transition: max-height 0.1s ease-out;\n margin-top: 2px;\n}\n\n.list-children-container.closed {\n max-height: 0;\n}\n\n.item-toggler {\n display: inline-block;\n margin-right: 0.8em;\n text-align: left;\n}\n\n.list-item-row.open .item-toggler::before {\n content: '-';\n}\n\n.list-item-row:not(.open) .item-toggler::before {\n content: '+';\n}\n\n.list-item-cell .value.good {\n color: var(--color-green);\n}\n\n.list-item-cell .value.warn {\n color: var(--color-yellow);\n}\n\n.list-item-cell .value.bad {\n color: var(--color-red);\n}\n\n.list-scroll-wrapper {\n width: max-content;\n min-width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 100%;\n}\n\n.list-container.parameters .list-item-row:not(.collapsible) {\n}\n\n.graph-container {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 0;\n position: relative;\n}\n\n.graph-svg {\n width: 100%;\n height: 80px;\n background-color: var(--profiler-header);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n}\n\n.graph-path {\n stroke-width: 2;\n fill-opacity: 0.4;\n}\n\n.console-header {\n padding: 10px;\n border-bottom: 1px solid var(--profiler-border);\n display: flex;\n gap: 20px;\n flex-shrink: 0;\n align-items: center;\n justify-content: space-between;\n}\n\n.console-buttons-group {\n display: flex;\n gap: 20px;\n}\n\n.console-filter-input {\n background-color: var(--profiler-bg);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 8px;\n font-family: var(--font-mono);\n flex-grow: 1;\n max-width: 300px;\n border-radius: 15px;\n}\n\n.console-filter-input:focus {\n outline: none;\n border-color: var(--text-secondary);\n}\n\n.console-copy-button {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: color 0.2s, background-color 0.2s;\n}\n\n.console-copy-button:hover {\n color: var(--text-primary);\n background-color: var(--profiler-hover);\n}\n\n.console-copy-button.copied {\n color: var(--color-green);\n}\n\n#console-log {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px;\n overflow-y: auto;\n flex-grow: 1;\n user-select: text;\n -webkit-user-select: text;\n}\n\n.log-message {\n padding: 2px 5px;\n white-space: pre-wrap;\n word-break: break-all;\n border-radius: 3px;\n line-height: 1.5 !important;\n}\n\n.log-message.hidden {\n display: none;\n}\n\n.log-message.info {\n color: var(--text-primary);\n}\n\n.log-message.warn {\n color: var(--color-yellow);\n}\n\n.log-message.error {\n color: #f9dedc;\n background-color: rgba(244, 67, 54, 0.1);\n}\n\n.log-prefix {\n color: var(--text-secondary);\n margin-right: 8px;\n}\n\n.log-code {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 3px;\n padding: 1px 4px;\n}\n\n.thumbnail-container {\n display: flex;\n align-items: center;\n}\n\n.thumbnail-svg {\n width: 40px;\n height: 22.5px;\n flex-shrink: 0;\n margin-right: 8px;\n}\n\n.param-control {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n width: 100%;\n}\n\n.param-control input,\n.param-control select,\n.param-control button {\n background-color: var(--profiler-bg);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 6px;\n padding-bottom: 2px;\n font-family: var(--font-mono);\n width: 100%;\n box-sizing: border-box;\n}\n\n.param-control input:focus {\n outline: none;\n border-color: var(--accent-color);\n}\n\n.param-control select {\n padding-top: 3px;\n padding-bottom: 1px;\n}\n\n.param-control input[type=\"number\"] {\n cursor: ns-resize;\n}\n\n.param-control input[type=\"color\"] {\n padding: 2px;\n}\n\n.param-control button {\n cursor: pointer;\n transition: background-color 0.2s;\n}\n\n.param-control button:hover {\n background-color: var(--profiler-header);\n}\n\n.param-control-vector {\n display: flex;\n gap: 5px;\n}\n\n.custom-checkbox {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n gap: 8px;\n will-change: transform;\n}\n\n.custom-checkbox input {\n display: none;\n}\n\n.custom-checkbox .checkmark {\n width: 14px;\n height: 14px;\n border: 1px solid var(--accent-color);\n border-radius: 3px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n transition: background-color 0.2s, border-color 0.2s;\n}\n\n.custom-checkbox .checkmark::after {\n content: '';\n width: 6px;\n height: 6px;\n background-color: var(--accent-color);\n border-radius: 1px;\n display: block;\n transform: scale(0);\n transition: transform 0.2s;\n}\n\n.custom-checkbox input:checked+.checkmark {\n border-color: var(--accent-color);\n}\n\n.custom-checkbox input:checked+.checkmark::after {\n transform: scale(1);\n}\n\n.param-control input[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n outline: none;\n padding: 0px;\n padding-top: 8px;\n}\n\n.param-control input[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n background: var(--profiler-bg);\n border: 1px solid var(--accent-color);\n border-radius: 3px;\n cursor: pointer;\n margin-top: -8px;\n}\n\n.param-control input[type=\"range\"]::-moz-range-thumb {\n width: 18px;\n height: 18px;\n background: var(--profiler-bg);\n border: 2px solid var(--accent-color);\n border-radius: 3px;\n cursor: pointer;\n}\n\n.param-control input[type=\"range\"]::-moz-range-track {\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n}\n\n/* Override .param-control styles for mini-panel-content */\n.mini-panel-content input,\n.mini-panel-content select,\n.mini-panel-content button {\n padding: 2px 4px;\n height: 21px;\n line-height: 1.4;\n padding-top: 4px;\n}\n\n.mini-panel-content .param-control input,\n.mini-panel-content .param-control select,\n.mini-panel-content .param-control button {\n background-color: #1e1e24c2;\n line-height: 1.0;\n}\n\n.mini-panel-content .param-control select {\n padding: 2px 2px;\n padding-top: 3px;\n}\n\n.mini-panel-content .param-control input[type=\"number\"]::-webkit-outer-spin-button,\n.mini-panel-content .param-control input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.mini-panel-content .param-control input[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\n.mini-panel-content .list-item-cell span {\n position: relative;\n top: 1px;\n margin-left: 2px;\n}\n\n.mini-panel-content .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n margin-bottom: 2px;\n will-change: transform;\n}\n\n.mini-panel-content .list-container.parameters .list-item-row:not(.collapsible) {\n margin-bottom: 2px;\n}\n\n@media screen and (max-width: 450px) and (orientation: portrait) {\n\n .console-filter-input {\n max-width: 100px;\n }\n\n}\n\n/* Touch device optimizations */\n@media (hover: none) and (pointer: coarse) {\n\n .panel-resizer {\n top: -10px !important;\n height: 20px !important;\n }\n\n #profiler-panel.position-top .panel-resizer {\n top: auto !important;\n bottom: -10px !important;\n height: 20px !important;\n }\n\n #profiler-panel.position-left .panel-resizer {\n right: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n #profiler-panel.position-right .panel-resizer {\n left: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .detached-tab-resizer-top,\n .detached-tab-resizer-bottom {\n height: 10px !important;\n }\n\n .detached-tab-resizer-left,\n .detached-tab-resizer-right {\n width: 10px !important;\n }\n\n}\n\n.drag-preview-indicator {\n position: fixed;\n background-color: rgba(0, 170, 255, 0.2);\n border: 2px dashed var(--accent-color);\n z-index: 999;\n pointer-events: none;\n transition: all 0.2s ease-out;\n}\n\n/* Detached Tab Windows */\n.detached-tab-panel {\n position: fixed;\n width: 500px;\n height: 400px;\n background: var(--profiler-bg);\n border: 1px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);\n z-index: 1002;\n display: flex;\n flex-direction: column;\n backdrop-filter: blur(10px);\n overflow: hidden;\n opacity: 1;\n visibility: visible;\n transition: opacity 0.2s, visibility 0.2s;\n}\n\n#profiler-panel:not(.visible) ~ * .detached-tab-panel,\nbody:has(#profiler-panel:not(.visible)) .detached-tab-panel {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.detached-tab-header {\n background: var(--profiler-header-bg);\n padding: 0 7px 0 15px;\n font-family: var(--font-family);\n font-size: 14px;\n color: var(--text-primary);\n font-weight: 600;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--profiler-border);\n cursor: grab;\n user-select: none;\n height: 38px;\n flex-shrink: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n touch-action: none;\n}\n\n.detached-tab-header:active {\n cursor: grabbing;\n}\n\n.detached-header-controls {\n display: flex;\n gap: 5px;\n}\n\n.detached-reattach-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n font-family: var(--font-family);\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.detached-reattach-btn:hover {\n background: rgba(0, 170, 255, 0.2);\n color: var(--accent-color);\n}\n\n.detached-tab-content {\n flex: 1;\n overflow: auto;\n position: relative;\n background: var(--profiler-bg);\n}\n\n.detached-tab-content::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.detached-tab-content::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.detached-tab-content::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.detached-tab-content::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.detached-tab-content::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n.detached-tab-content .profiler-content {\n display: block !important;\n height: 100%;\n visibility: visible !important;\n opacity: 1 !important;\n position: relative !important;\n}\n\n.detached-tab-content .profiler-content > * {\n font-family: var(--font-mono);\n color: var(--text-primary);\n}\n\n.detached-tab-resizer {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 20px;\n height: 20px;\n cursor: nwse-resize;\n z-index: 10;\n touch-action: none;\n}\n\n.detached-tab-resizer::after {\n content: '';\n position: absolute;\n bottom: 2px;\n right: 2px;\n width: 12px;\n height: 12px;\n border-right: 2px solid var(--profiler-border);\n border-bottom: 2px solid var(--profiler-border);\n border-bottom-right-radius: 6px;\n opacity: 0.5;\n}\n\n.detached-tab-resizer:hover::after {\n opacity: 1;\n border-color: var(--accent-color);\n}\n\n/* Edge resizers */\n.detached-tab-resizer-top {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n}\n\n.detached-tab-resizer-right {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n}\n\n.detached-tab-resizer-bottom {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n}\n\n.detached-tab-resizer-left {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n}\n\n/* Input number spin buttons - hide arrows */\n/* Chrome, Safari, Edge, Opera */\n#profiler-panel input[type=\"number\"]::-webkit-outer-spin-button,\n#profiler-panel input[type=\"number\"]::-webkit-inner-spin-button,\n.detached-tab-content input[type=\"number\"]::-webkit-outer-spin-button,\n.detached-tab-content input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\n#profiler-panel input[type=\"number\"],\n.detached-tab-content input[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\n.panel-action-btn {\n background: transparent;\n color: var(--text-primary);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: 12px;\n transition: background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.panel-action-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n}\n", document.head.appendChild(e);
|
|
246
246
|
}
|
|
247
|
-
}, Kt = class extends
|
|
247
|
+
}, Kt = class extends D {
|
|
248
248
|
constructor(e) {
|
|
249
249
|
super(), this.inspector = e, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, Gt.init(), this.setupShell(), this.setupResizing(), this.setupWindowResizeListener(), this.setupOrientationListener();
|
|
250
250
|
}
|
|
@@ -659,7 +659,7 @@ var W = /* @__PURE__ */ new xe(), Pt = /* @__PURE__ */ new k(), Ft = /* @__PURE_
|
|
|
659
659
|
this.updatePanelSize();
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
}, qt = class extends
|
|
662
|
+
}, qt = class extends D {
|
|
663
663
|
constructor(e, t = {}) {
|
|
664
664
|
super(), this.id = e.toLowerCase(), this.button = document.createElement("button"), this.button.className = "tab-btn", this.button.textContent = e, this.content = document.createElement("div"), this.content.id = `${this.id}-content`, this.content.className = "profiler-content", this._isActive = !1, this.isVisible = !0, this.isDetached = !1, this.detachedWindow = null, this.allowDetach = t.allowDetach === void 0 ? !0 : t.allowDetach, this.builtin = t.builtin === void 0 ? !1 : t.builtin, this.icon = t.icon || null, this.builtinButton = null, this.miniContent = null, this.profiler = null, this.onVisibilityChange = null;
|
|
665
665
|
}
|
|
@@ -984,7 +984,7 @@ var Qt = class extends qt {
|
|
|
984
984
|
let r = this.filters[e], i = t.toLowerCase().includes(this.filterText);
|
|
985
985
|
n.classList.toggle("hidden", !(r && i)), this.logContainer.appendChild(n), this.logContainer.scrollTop = this.logContainer.scrollHeight, this.logContainer.children.length > 200 && this.logContainer.removeChild(this.logContainer.firstChild);
|
|
986
986
|
}
|
|
987
|
-
}, X = class extends
|
|
987
|
+
}, X = class extends D {
|
|
988
988
|
constructor() {
|
|
989
989
|
super(), this.domElement = document.createElement("div"), this.domElement.className = "param-control", this._onChangeFunction = null, this.addEventListener("change", (e) => {
|
|
990
990
|
requestAnimationFrame(() => {
|
|
@@ -1264,15 +1264,15 @@ var Qt = class extends qt {
|
|
|
1264
1264
|
let t = new ln(this, e);
|
|
1265
1265
|
return this.paramList.add(t.paramList), this.groups.push(t), t;
|
|
1266
1266
|
}
|
|
1267
|
-
}, dn = "../extensions/extensions.json", fn =
|
|
1267
|
+
}, dn = "../extensions/extensions.json", fn = xe.prototype.init;
|
|
1268
1268
|
function pn(e) {
|
|
1269
|
-
e ?
|
|
1269
|
+
e ? xe.prototype.init = async function() {
|
|
1270
1270
|
if (this.backend.isWebGLBackend !== !0) {
|
|
1271
1271
|
let e = this.backend.parameters;
|
|
1272
1272
|
this.backend = new be(e);
|
|
1273
1273
|
}
|
|
1274
1274
|
return fn.call(this);
|
|
1275
|
-
} :
|
|
1275
|
+
} : xe.prototype.init = fn;
|
|
1276
1276
|
}
|
|
1277
1277
|
var Z = null;
|
|
1278
1278
|
function mn() {
|
|
@@ -1282,7 +1282,7 @@ function mn() {
|
|
|
1282
1282
|
forceWebGL: e.forceWebGL === void 0 ? !1 : e.forceWebGL,
|
|
1283
1283
|
captureStackTrace: e.captureStackTrace === void 0 ? !1 : e.captureStackTrace,
|
|
1284
1284
|
activeExtensions: e.activeExtensions === void 0 ? {} : e.activeExtensions
|
|
1285
|
-
}, Z.forceWebGL && pn(!0), Z.captureStackTrace && (
|
|
1285
|
+
}, Z.forceWebGL && pn(!0), Z.captureStackTrace && (me.captureStackTrace = !0), Z;
|
|
1286
1286
|
}
|
|
1287
1287
|
function hn() {
|
|
1288
1288
|
wn("settings", {
|
|
@@ -1299,7 +1299,7 @@ var gn = class extends un {
|
|
|
1299
1299
|
t.add(e, "forceWebGL").name("Force WebGL").onChange((e) => {
|
|
1300
1300
|
pn(e), hn(), location.reload();
|
|
1301
1301
|
}), t.add(e, "captureStackTrace").name("Capture Stack Trace").onChange((e) => {
|
|
1302
|
-
|
|
1302
|
+
me.captureStackTrace = e, hn(), location.reload();
|
|
1303
1303
|
});
|
|
1304
1304
|
}
|
|
1305
1305
|
init() {
|
|
@@ -1340,14 +1340,14 @@ var gn = class extends un {
|
|
|
1340
1340
|
let e = new URL(dn, import.meta.url);
|
|
1341
1341
|
return await fetch(e).then((e) => e.json());
|
|
1342
1342
|
}
|
|
1343
|
-
}, _n = /* @__PURE__ */
|
|
1344
|
-
let n =
|
|
1345
|
-
|
|
1343
|
+
}, _n = /* @__PURE__ */ z(([e, t]) => {
|
|
1344
|
+
let n = V(0);
|
|
1345
|
+
Et(() => {
|
|
1346
1346
|
let { width: e, height: r } = t.value;
|
|
1347
1347
|
n.value = e / r;
|
|
1348
1348
|
});
|
|
1349
|
-
let r = e.sub(.5), i =
|
|
1350
|
-
return
|
|
1349
|
+
let r = e.sub(.5), i = R(r.x.div(n), r.y).add(.5);
|
|
1350
|
+
return N(i, pt(0, i.x).mul(pt(i.x, 1)).mul(pt(0, i.y)).mul(pt(i.y, 1)));
|
|
1351
1351
|
}), vn = class extends qt {
|
|
1352
1352
|
constructor(e = {}) {
|
|
1353
1353
|
super("Viewer", e);
|
|
@@ -1373,16 +1373,16 @@ var gn = class extends un {
|
|
|
1373
1373
|
getCanvasDataByNode(e, t) {
|
|
1374
1374
|
let n = this.canvasNodes.get(t);
|
|
1375
1375
|
if (n === void 0) {
|
|
1376
|
-
let r = new
|
|
1376
|
+
let r = new Se(document.createElement("canvas"));
|
|
1377
1377
|
r.setPixelRatio(window.devicePixelRatio), r.setSize(140, 140);
|
|
1378
|
-
let i = t.id, { path: a, name: o } = Xt(Zt(t.getName() || "(unnamed)")), s =
|
|
1379
|
-
let t = _n(
|
|
1378
|
+
let i = t.id, { path: a, name: o } = Xt(Zt(t.getName() || "(unnamed)")), s = L(N(t.context({ getUV: (e) => {
|
|
1379
|
+
let t = _n(gt, e), n = t.xy, r = t.z;
|
|
1380
1380
|
return n.mul(r);
|
|
1381
1381
|
} })), 1);
|
|
1382
|
-
s =
|
|
1383
|
-
let c = new
|
|
1382
|
+
s = tt(s, 0, e.outputColorSpace), s = s.context({ inspector: !0 });
|
|
1383
|
+
let c = new M();
|
|
1384
1384
|
c.outputNode = s;
|
|
1385
|
-
let l = new
|
|
1385
|
+
let l = new ye(c);
|
|
1386
1386
|
l.name = "Viewer - " + o, n = {
|
|
1387
1387
|
id: i,
|
|
1388
1388
|
name: o,
|
|
@@ -1418,8 +1418,8 @@ var gn = class extends un {
|
|
|
1418
1418
|
a[o] === void 0 && (a[o] = 0), (e.parent === null || n.parent !== e || e.children.indexOf(n) !== a[o]) && e.add(n), a[o]++;
|
|
1419
1419
|
} else n.parent || this.nodes.add(n);
|
|
1420
1420
|
this.currentDataList = r;
|
|
1421
|
-
let s =
|
|
1422
|
-
t.toneMapping = 0, t.outputColorSpace = u, t.setCanvasTarget(e.canvasTarget), e.quad.render(t), t.setCanvasTarget(i),
|
|
1421
|
+
let s = j.resetRendererState(t);
|
|
1422
|
+
t.toneMapping = 0, t.outputColorSpace = u, t.setCanvasTarget(e.canvasTarget), e.quad.render(t), t.setCanvasTarget(i), j.restoreRendererState(t, s);
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
1425
|
}, yn = 500, bn = 60, xn = class extends qt {
|
|
@@ -1598,48 +1598,48 @@ var gn = class extends un {
|
|
|
1598
1598
|
r.href = n, r.download = "threejs-timeline.json", r.click(), URL.revokeObjectURL(n);
|
|
1599
1599
|
}
|
|
1600
1600
|
getRenderTargetDetails(t) {
|
|
1601
|
-
let r = t.textures,
|
|
1601
|
+
let r = t.textures, i = [], l = (e) => {
|
|
1602
1602
|
switch (e.type) {
|
|
1603
1603
|
case v:
|
|
1604
|
-
case
|
|
1604
|
+
case ee: return "8";
|
|
1605
1605
|
case s:
|
|
1606
|
-
case
|
|
1606
|
+
case oe:
|
|
1607
1607
|
case S:
|
|
1608
|
-
case
|
|
1609
|
-
case
|
|
1610
|
-
case
|
|
1611
|
-
case
|
|
1608
|
+
case se:
|
|
1609
|
+
case g: return "16";
|
|
1610
|
+
case f:
|
|
1611
|
+
case ie:
|
|
1612
1612
|
case _:
|
|
1613
|
-
case b:
|
|
1614
1613
|
case y:
|
|
1615
|
-
case
|
|
1614
|
+
case h:
|
|
1615
|
+
case b: return "32";
|
|
1616
1616
|
default: return "?";
|
|
1617
1617
|
}
|
|
1618
1618
|
}, u = (t) => {
|
|
1619
1619
|
switch (t.format) {
|
|
1620
|
-
case
|
|
1620
|
+
case re: return "a";
|
|
1621
1621
|
case T:
|
|
1622
1622
|
case e: return "r";
|
|
1623
1623
|
case n:
|
|
1624
|
-
case
|
|
1624
|
+
case ae: return "rg";
|
|
1625
1625
|
case te:
|
|
1626
1626
|
case x: return "rgb";
|
|
1627
|
-
case
|
|
1627
|
+
case ne: return "depth";
|
|
1628
1628
|
case o: return "depth-stencil";
|
|
1629
|
-
case
|
|
1629
|
+
case a:
|
|
1630
1630
|
case c:
|
|
1631
1631
|
default: return "rgba";
|
|
1632
1632
|
}
|
|
1633
1633
|
};
|
|
1634
1634
|
for (let e = 0; e < r.length; e++) {
|
|
1635
|
-
let t = r[e], n = l(t),
|
|
1636
|
-
t.name && !(t.isDepthTexture && t.name === "depth") && (o += ` ${t.name}`), o += ` ${
|
|
1635
|
+
let t = r[e], n = l(t), a = u(t), o = `[${e}]`;
|
|
1636
|
+
t.name && !(t.isDepthTexture && t.name === "depth") && (o += ` ${t.name}`), o += ` ${a} ${n} bpc`, i.push(o);
|
|
1637
1637
|
}
|
|
1638
|
-
let
|
|
1638
|
+
let d = {
|
|
1639
1639
|
target: t.name || "RenderTarget",
|
|
1640
|
-
[`attachments(${r.length})`]:
|
|
1640
|
+
[`attachments(${r.length})`]: i.join(", ")
|
|
1641
1641
|
};
|
|
1642
|
-
return t.depthTexture && (
|
|
1642
|
+
return t.depthTexture && (d.depth = `${l(t.depthTexture)} bpc`), d;
|
|
1643
1643
|
}
|
|
1644
1644
|
getCallDetail(e, t) {
|
|
1645
1645
|
switch (e) {
|
|
@@ -2006,7 +2006,7 @@ var gn = class extends un {
|
|
|
2006
2006
|
e.backend.isWebGPUBackend ? t += "WebGPU" : e.backend.isWebGLBackend && (t += "WebGL2"), t += "\" ]", this.console.addMessage("info", t), e.inspector.domElement.parentElement === null && e.domElement.parentElement !== null && e.domElement.parentElement.appendChild(e.inspector.domElement);
|
|
2007
2007
|
}
|
|
2008
2008
|
setRenderer(e) {
|
|
2009
|
-
return super.setRenderer(e), e !== null && (
|
|
2009
|
+
return super.setRenderer(e), e !== null && (p(this.resolveConsole.bind(this)), this.isAvailable && (e.init().then(() => {
|
|
2010
2010
|
e.backend.trackTimestamp = !0, e.hasFeature("timestamp-query") !== !0 && this.console.addMessage("error", "THREE.Inspector: GPU Timestamp Queries not available.");
|
|
2011
2011
|
}), this.timeline.setRenderer(e))), this;
|
|
2012
2012
|
}
|
|
@@ -2075,7 +2075,7 @@ function wn(e, t) {
|
|
|
2075
2075
|
}
|
|
2076
2076
|
//#endregion
|
|
2077
2077
|
//#region ../../node_modules/three/examples/jsm/tsl/display/SSGINode.js
|
|
2078
|
-
var Tn = /* @__PURE__ */ new
|
|
2078
|
+
var Tn = /* @__PURE__ */ new ye(), En = /* @__PURE__ */ new d(), Dn = [
|
|
2079
2079
|
60,
|
|
2080
2080
|
300,
|
|
2081
2081
|
180,
|
|
@@ -2092,7 +2092,7 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2092
2092
|
return "SSGINode";
|
|
2093
2093
|
}
|
|
2094
2094
|
constructor(e, t, n, r) {
|
|
2095
|
-
super("vec4"), this.beautyNode = e, this.depthNode = t, this.normalNode = n, this.updateBeforeType =
|
|
2095
|
+
super("vec4"), this.beautyNode = e, this.depthNode = t, this.normalNode = n, this.updateBeforeType = bt.FRAME, this.sliceCount = V(1, "uint"), this.stepCount = V(12, "uint"), this.aoIntensity = V(1, "float"), this.giIntensity = V(10, "float"), this.radius = V(12, "float"), this.useScreenSpaceSampling = V(!0, "bool"), this.expFactor = V(2, "float"), this.thickness = V(1, "float"), this.useLinearThickness = V(!1, "bool"), this.backfaceLighting = V(0, "float"), this.useTemporalFiltering = !0, this._resolution = V(new d()), this._halfProjScale = V(1), this._temporalDirection = V(0), this._temporalOffset = V(0), this._cameraProjectionMatrix = V(r.projectionMatrix), this._cameraProjectionMatrixInverse = V(r.projectionMatrixInverse), this._cameraNear = Tt("near", "float", r), this._cameraFar = Tt("far", "float", r), this._camera = r, this._ssgiRenderTarget = new w(1, 1, { depthBuffer: !1 }), this._ssgiRenderTarget.texture.name = "SSGI", this._material = new M(), this._material.name = "SSGI", this._textureNode = Ye(this, this._ssgiRenderTarget.texture);
|
|
2096
2096
|
}
|
|
2097
2097
|
getTextureNode() {
|
|
2098
2098
|
return this._textureNode;
|
|
@@ -2102,28 +2102,28 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2102
2102
|
}
|
|
2103
2103
|
updateBefore(e) {
|
|
2104
2104
|
let { renderer: t } = e;
|
|
2105
|
-
kn =
|
|
2105
|
+
kn = j.resetRendererState(t, kn);
|
|
2106
2106
|
let n = t.getDrawingBufferSize(En);
|
|
2107
2107
|
if (this.setSize(n.width, n.height), this.useTemporalFiltering === !0) {
|
|
2108
2108
|
let t = e.frameId;
|
|
2109
2109
|
this._temporalDirection.value = Dn[t % 6] / 360, this._temporalOffset.value = On[t % 4];
|
|
2110
2110
|
} else this._temporalDirection.value = 1, this._temporalOffset.value = 1;
|
|
2111
|
-
Tn.material = this._material, Tn.name = "SSGI", t.setClearColor(0, 1), t.setRenderTarget(this._ssgiRenderTarget), Tn.render(t),
|
|
2111
|
+
Tn.material = this._material, Tn.name = "SSGI", t.setClearColor(0, 1), t.setRenderTarget(this._ssgiRenderTarget), Tn.render(t), j.restoreRendererState(t, kn);
|
|
2112
2112
|
}
|
|
2113
2113
|
setup(e) {
|
|
2114
|
-
let t =
|
|
2114
|
+
let t = ke(), n = P(32), r = P(0), i = (t) => {
|
|
2115
2115
|
let n = this.depthNode.sample(t).r;
|
|
2116
|
-
return e.renderer.logarithmicDepthBuffer === !0 ?
|
|
2117
|
-
}, a = (e) => this.normalNode === null ?
|
|
2116
|
+
return e.renderer.logarithmicDepthBuffer === !0 ? He(Ae(n, this._cameraNear, this._cameraFar), this._cameraNear, this._cameraFar) : n;
|
|
2117
|
+
}, a = (e) => this.normalNode === null ? mt(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), o = (e) => this.beautyNode.sample(e), s = z(([e]) => F(.25).mul(jt(e.y, e.x).bitAnd(3))).setLayout({
|
|
2118
2118
|
name: "spatialOffsets",
|
|
2119
2119
|
type: "float",
|
|
2120
2120
|
inputs: [{
|
|
2121
2121
|
name: "position",
|
|
2122
2122
|
type: "vec2"
|
|
2123
2123
|
}]
|
|
2124
|
-
}), c =
|
|
2125
|
-
let t =
|
|
2126
|
-
return t.mulAssign(
|
|
2124
|
+
}), c = z(([e]) => {
|
|
2125
|
+
let t = ht(e).mul(F(-.156583)).add(wt);
|
|
2126
|
+
return t.mulAssign(vt(ht(e).oneMinus())), R(e.x.greaterThanEqual(0).select(t.x, it.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, it.sub(t.y)));
|
|
2127
2127
|
}).setLayout({
|
|
2128
2128
|
name: "GTAOFastAcos",
|
|
2129
2129
|
type: "vec2",
|
|
@@ -2131,67 +2131,67 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2131
2131
|
name: "value",
|
|
2132
2132
|
type: "vec2"
|
|
2133
2133
|
}]
|
|
2134
|
-
}), l =
|
|
2135
|
-
let h = this.stepCount.toConst(), g = this.expFactor.toConst(), _ = this.thickness.toConst(), v = this.backfaceLighting.toConst(), y =
|
|
2136
|
-
|
|
2137
|
-
y.assign(t.mul(this._resolution.x.div(2)).div(
|
|
2134
|
+
}), l = z(([e, t, s, l, u, d, f, p, m]) => {
|
|
2135
|
+
let h = this.stepCount.toConst(), g = this.expFactor.toConst(), _ = this.thickness.toConst(), v = this.backfaceLighting.toConst(), y = F(0);
|
|
2136
|
+
I(this.useScreenSpaceSampling.equal(!0), () => {
|
|
2137
|
+
y.assign(t.mul(this._resolution.x.div(2)).div(F(16)));
|
|
2138
2138
|
}).Else(() => {
|
|
2139
|
-
y.assign(
|
|
2140
|
-
}), y.divAssign(
|
|
2141
|
-
let b =
|
|
2142
|
-
return
|
|
2143
|
-
start:
|
|
2139
|
+
y.assign(U(t.mul(this._halfProjScale).div(s.z.negate()), F(h)));
|
|
2140
|
+
}), y.divAssign(F(h).add(1));
|
|
2141
|
+
let b = U(1, F(h.sub(1))).mul(y), x = e.equal(!0).select(R(1, -1), R(-1, 1)), S = e.equal(!0).select(1, -1), C = N(0);
|
|
2142
|
+
return et({
|
|
2143
|
+
start: P(0),
|
|
2144
2144
|
end: h,
|
|
2145
2145
|
type: "uint",
|
|
2146
2146
|
condition: "<"
|
|
2147
2147
|
}, ({ i: t }) => {
|
|
2148
|
-
let h =
|
|
2149
|
-
|
|
2150
|
-
|
|
2148
|
+
let h = ct(ht(Ke(y, F(t).add(u)).div(b)), g).mul(b).toConst(), w = l.mul(U(h, F(t).add(1))).toConst(), T = d.add(w.mul(x)).toConst();
|
|
2149
|
+
I(T.x.lessThanEqual(0).or(T.y.lessThanEqual(0)).or(T.x.greaterThanEqual(1)).or(T.y.greaterThanEqual(1)), () => {
|
|
2150
|
+
Dt();
|
|
2151
2151
|
});
|
|
2152
|
-
let
|
|
2153
|
-
|
|
2154
|
-
let
|
|
2155
|
-
|
|
2156
|
-
let
|
|
2157
|
-
|
|
2152
|
+
let E = Te(T, i(T), this._cameraProjectionMatrixInverse).toConst(), ee = E.sub(s).normalize().toConst(), te = this.useLinearThickness.equal(!0).select(E.z.negate().div(this._cameraFar).clamp().mul(100), F(1)), ne = Fe(E.sub(te.mul(f).mul(_)).sub(s)), D = R(B(ee, f), B(ne, f));
|
|
2153
|
+
D = c(_t(D, -1, 1)), D = _t(De(Ke(S, D.negate()).sub(m.sub(wt)), it)), D = e.equal(!0).select(D.yx, D.xy);
|
|
2154
|
+
let O = D.x.toConst(), re = D.y.toConst(), ie = P(D.mul(F(n))).toConst(), k = P(St(re.sub(O).mul(F(n)))).toConst(), ae = k.greaterThan(P(0)).select(P(kt(P(4294967295), P(32).sub(n).add(n.sub(k)))), P(0)).toConst().shiftLeft(ie);
|
|
2155
|
+
ae = ae.bitAnd(r.bitNot()), r.assign(r.bitOr(ae));
|
|
2156
|
+
let oe = Nt(ae);
|
|
2157
|
+
I(oe.greaterThan(0), () => {
|
|
2158
2158
|
let e = o(T);
|
|
2159
|
-
|
|
2160
|
-
let t =
|
|
2161
|
-
|
|
2162
|
-
let i = a(T), o =
|
|
2163
|
-
o = v.greaterThan(0).and(
|
|
2159
|
+
I(Ne(e).greaterThan(.001), () => {
|
|
2160
|
+
let t = Fe(ee), r = _t(B(p, t));
|
|
2161
|
+
I(r.greaterThan(.001), () => {
|
|
2162
|
+
let i = a(T), o = B(i, t.negate()), s = st(o).lessThan(0).select(ht(o).mul(v), ht(o));
|
|
2163
|
+
o = v.greaterThan(0).and(B(i, f).greaterThan(0)).select(s, _t(o)), C.rgb.addAssign(F(oe).div(F(n)).mul(e).mul(r).mul(o));
|
|
2164
2164
|
});
|
|
2165
2165
|
});
|
|
2166
2166
|
});
|
|
2167
|
-
}),
|
|
2168
|
-
}), u =
|
|
2167
|
+
}), N(C);
|
|
2168
|
+
}), u = z(() => {
|
|
2169
2169
|
let e = i(t).toVar();
|
|
2170
2170
|
e.greaterThanEqual(1).discard();
|
|
2171
|
-
let o = Te(t, e, this._cameraProjectionMatrixInverse).toVar(), c = a(t).toVar(), u =
|
|
2172
|
-
|
|
2173
|
-
start:
|
|
2171
|
+
let o = Te(t, e, this._cameraProjectionMatrixInverse).toVar(), c = a(t).toVar(), u = Fe(o.xyz.negate()).toVar(), d = s(at), f = Re(at), p = this._temporalDirection.mul(.02), m = Be(d.add(this._temporalOffset)).add(yt(t.add(p).mul(2).sub(1))), h = F(0), g = N(0), _ = this.sliceCount.toConst(), v = this.aoIntensity.toConst(), y = this.giIntensity.toConst(), b = this.radius.toConst();
|
|
2172
|
+
et({
|
|
2173
|
+
start: P(0),
|
|
2174
2174
|
end: _,
|
|
2175
2175
|
type: "uint",
|
|
2176
2176
|
condition: "<"
|
|
2177
2177
|
}, ({ i: e }) => {
|
|
2178
|
-
let i =
|
|
2179
|
-
r.assign(0), g.addAssign(l(
|
|
2180
|
-
}), h.divAssign(
|
|
2181
|
-
let x =
|
|
2182
|
-
return g.mulAssign(C),
|
|
2178
|
+
let i = Ke(F(e).add(f).add(this._temporalDirection), it.div(F(_))).toConst(), a = N(R(At(i), ut(i)), 0).toConst(), s = a.xy.mul(F(1).div(this._resolution)).toConst(), d = Fe(nt(a, u)).toConst(), p = nt(u, d).toConst(), v = c.sub(d.mul(B(c, d))).toConst(), y = _t(B(Fe(v).toConst(), u), -1, 1).toConst(), x = st(B(v, p)).negate().mul(Ot(y)).toConst();
|
|
2179
|
+
r.assign(0), g.addAssign(l(lt(!0), b, o, s, m, t, u, c, x)), g.addAssign(l(lt(!1), b, o, s, m, t, u, c, x)), h.addAssign(F(Nt(r)).div(F(n)));
|
|
2180
|
+
}), h.divAssign(F(_)), h.assign(ct(h.clamp().oneMinus(), v).clamp()), g.divAssign(F(_)), g.mulAssign(y);
|
|
2181
|
+
let x = F(7).toConst(), S = Ne(g), C = S.greaterThan(x).select(x.div(S), F(1));
|
|
2182
|
+
return g.mulAssign(C), L(g, h);
|
|
2183
2183
|
});
|
|
2184
2184
|
return this._material.fragmentNode = u().context(e.getSharedContext()), this._material.needsUpdate = !0, this._textureNode;
|
|
2185
2185
|
}
|
|
2186
2186
|
dispose() {
|
|
2187
2187
|
this._ssgiRenderTarget.dispose(), this._material.dispose();
|
|
2188
2188
|
}
|
|
2189
|
-
}, jn = (e, t, n, r) => new An(
|
|
2189
|
+
}, jn = (e, t, n, r) => new An(Qe(e), t, n, r), Mn = class e extends zt {
|
|
2190
2190
|
static {
|
|
2191
2191
|
this.passId = "SsgiRenderPass";
|
|
2192
2192
|
}
|
|
2193
2193
|
constructor(t) {
|
|
2194
|
-
super(), this.passId = e.passId, this.sliceCount =
|
|
2194
|
+
super(), this.passId = e.passId, this.sliceCount = V(t.sliceCount, "uint"), this.stepCount = V(t.stepCount, "uint"), this.radius = V(t.radius), this.expFactor = V(t.expFactor), this.thickness = V(t.thickness), this.backfaceLighting = V(t.backfaceLighting), this.aoIntensity = V(t.aoIntensity), this.giIntensity = V(t.giIntensity), this.useLinearThickness = V(t.useLinearThickness), this.useScreenSpaceSampling = V(t.useScreenSpaceSampling), this.useTemporalFiltering = t.useTemporalFiltering;
|
|
2195
2195
|
}
|
|
2196
2196
|
updatePerformanceParameters(e) {
|
|
2197
2197
|
this.sliceCount.value = e.sliceCount, this.stepCount.value = e.stepCount;
|
|
@@ -2202,30 +2202,30 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2202
2202
|
}
|
|
2203
2203
|
assemble(e, t, n, r, i) {
|
|
2204
2204
|
if (!(r instanceof l)) return t;
|
|
2205
|
-
e.setMRT(
|
|
2206
|
-
output:
|
|
2207
|
-
diffuseColor:
|
|
2208
|
-
normal:
|
|
2209
|
-
velocity:
|
|
2205
|
+
e.setMRT(Me({
|
|
2206
|
+
output: Pe,
|
|
2207
|
+
diffuseColor: Mt,
|
|
2208
|
+
normal: We(je),
|
|
2209
|
+
velocity: Le
|
|
2210
2210
|
}));
|
|
2211
|
-
let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), u = jn(a, s,
|
|
2212
|
-
u.sliceCount = this.sliceCount, u.stepCount = this.stepCount, u.radius = this.radius, u.expFactor = this.expFactor, u.thickness = this.thickness, u.backfaceLighting = this.backfaceLighting, u.aoIntensity = this.aoIntensity, u.giIntensity = this.giIntensity, u.useLinearThickness = this.useLinearThickness, u.useScreenSpaceSampling = this.useScreenSpaceSampling;
|
|
2213
|
-
let d = u.rgb, f = u.a, p =
|
|
2214
|
-
return p.name = "Ssgi Composite", i === "ao only" ?
|
|
2211
|
+
let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), u = jn(a, s, xt((e) => dt(c.sample(e))), r);
|
|
2212
|
+
u.sliceCount = this.sliceCount, u.stepCount = this.stepCount, u.radius = this.radius, u.expFactor = this.expFactor, u.thickness = this.thickness, u.backfaceLighting = this.backfaceLighting, u.aoIntensity = this.aoIntensity, u.giIntensity = this.giIntensity, u.useLinearThickness = this.useLinearThickness, u.useScreenSpaceSampling = this.useScreenSpaceSampling, u.useTemporalFiltering = this.useTemporalFiltering;
|
|
2213
|
+
let d = u.rgb, f = u.a, p = L(ot(a.rgb.mul(f), o.rgb.mul(d)), a.a);
|
|
2214
|
+
return p.name = "Ssgi Composite", i === "ao only" ? L(N(f), 1) : i === "gi only" ? L(d, 1) : i === "direct lighting only" ? a : p;
|
|
2215
2215
|
}
|
|
2216
|
-
}, Nn = /* @__PURE__ */ new
|
|
2216
|
+
}, Nn = /* @__PURE__ */ new ye(), Pn = /* @__PURE__ */ new d(), Fn, In = class extends he {
|
|
2217
2217
|
static get type() {
|
|
2218
2218
|
return "TRAANode";
|
|
2219
2219
|
}
|
|
2220
2220
|
constructor(e, t, n, r) {
|
|
2221
|
-
super("vec4"), this.isTRAANode = !0, this.updateBeforeType =
|
|
2221
|
+
super("vec4"), this.isTRAANode = !0, this.updateBeforeType = ve.FRAME, this.beautyNode = e, this.depthNode = t, this.velocityNode = n, this.camera = r, this.depthThreshold = 5e-4, this.edgeDepthDiff = .001, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = V(new d()), this._historyRenderTarget = new w(1, 1, {
|
|
2222
2222
|
depthBuffer: !1,
|
|
2223
2223
|
type: S,
|
|
2224
|
-
depthTexture: new
|
|
2224
|
+
depthTexture: new m()
|
|
2225
2225
|
}), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new w(1, 1, {
|
|
2226
2226
|
depthBuffer: !1,
|
|
2227
2227
|
type: S
|
|
2228
|
-
}), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new
|
|
2228
|
+
}), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new M(), this._resolveMaterial.name = "TRAA.resolve", this._textureNode = Ye(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new O(), this._cameraNearFar = V(new d()), this._cameraWorldMatrix = V(new O()), this._cameraWorldMatrixInverse = V(new O()), this._cameraProjectionMatrixInverse = V(new O()), this._previousCameraWorldMatrix = V(new O()), this._previousCameraProjectionMatrixInverse = V(new O()), this._previousDepthNode = H(new m(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
|
|
2229
2229
|
}
|
|
2230
2230
|
getTextureNode() {
|
|
2231
2231
|
return this._textureNode;
|
|
@@ -2252,7 +2252,7 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2252
2252
|
let { renderer: t } = e;
|
|
2253
2253
|
this._previousCameraWorldMatrix.value.copy(this._cameraWorldMatrix.value), this._previousCameraProjectionMatrixInverse.value.copy(this._cameraProjectionMatrixInverse.value), this._cameraNearFar.value.set(this.camera.near, this.camera.far), this._cameraWorldMatrix.value.copy(this.camera.matrixWorld), this._cameraWorldMatrixInverse.value.copy(this.camera.matrixWorldInverse), this._cameraProjectionMatrixInverse.value.copy(this.camera.projectionMatrixInverse);
|
|
2254
2254
|
let n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, r = n.texture.width, i = n.texture.height;
|
|
2255
|
-
this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), Fn =
|
|
2255
|
+
this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), Fn = j.resetRendererState(t, Fn);
|
|
2256
2256
|
let a = this._historyRenderTarget.width !== r || this._historyRenderTarget.height !== i;
|
|
2257
2257
|
this.setSize(r, i), a === !0 && (t.initRenderTarget(this._historyRenderTarget), t.initRenderTarget(this._resolveRenderTarget), t.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), t.setRenderTarget(this._resolveRenderTarget), Nn.material = this._resolveMaterial, Nn.name = "TRAA", Nn.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
|
|
2258
2258
|
let o = t.getDrawingBufferSize(Pn);
|
|
@@ -2260,7 +2260,7 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2260
2260
|
let e = this.depthNode.value;
|
|
2261
2261
|
t.copyTextureToTexture(e, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
|
|
2262
2262
|
}
|
|
2263
|
-
|
|
2263
|
+
j.restoreRendererState(t, Fn);
|
|
2264
2264
|
}
|
|
2265
2265
|
setup(e) {
|
|
2266
2266
|
let t = e.context.renderPipeline;
|
|
@@ -2269,21 +2269,21 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2269
2269
|
this.setViewOffset(t.width, t.height);
|
|
2270
2270
|
}, t.context.onAfterRenderPipeline = () => {
|
|
2271
2271
|
this.clearViewOffset();
|
|
2272
|
-
}), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = _), e.context.velocity === void 0 ? this._velocityNode =
|
|
2272
|
+
}), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = _), e.context.velocity === void 0 ? this._velocityNode = Le : this._velocityNode = e.context.velocity;
|
|
2273
2273
|
let n = (e) => {
|
|
2274
2274
|
let { x: t, y: n } = this._cameraNearFar;
|
|
2275
|
-
return
|
|
2276
|
-
}, r =
|
|
2275
|
+
return He(Ae(e, t, n), t, n);
|
|
2276
|
+
}, r = $e({
|
|
2277
2277
|
closestDepth: "float",
|
|
2278
2278
|
closestPositionTexel: "vec2",
|
|
2279
2279
|
farthestDepth: "float"
|
|
2280
|
-
}), i =
|
|
2281
|
-
let i =
|
|
2280
|
+
}), i = z(([t]) => {
|
|
2281
|
+
let i = F(2).toVar(), a = R(0).toVar(), o = F(-1).toVar();
|
|
2282
2282
|
for (let r = -1; r <= 1; ++r) for (let s = -1; s <= 1; ++s) {
|
|
2283
|
-
let c = t.add(
|
|
2284
|
-
e.renderer.reversedDepthBuffer && (l = l.oneMinus()), e.renderer.logarithmicDepthBuffer && (l = n(l)), l = l.toVar(),
|
|
2283
|
+
let c = t.add(R(r, s)).toVar(), l = this.depthNode.load(c).r;
|
|
2284
|
+
e.renderer.reversedDepthBuffer && (l = l.oneMinus()), e.renderer.logarithmicDepthBuffer && (l = n(l)), l = l.toVar(), I(l.lessThan(i), () => {
|
|
2285
2285
|
i.assign(l), a.assign(c);
|
|
2286
|
-
}),
|
|
2286
|
+
}), I(l.greaterThan(o), () => {
|
|
2287
2287
|
o.assign(l);
|
|
2288
2288
|
});
|
|
2289
2289
|
}
|
|
@@ -2291,11 +2291,11 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2291
2291
|
}), a = (t) => {
|
|
2292
2292
|
let r = this._previousDepthNode.sample(t).r;
|
|
2293
2293
|
e.renderer.logarithmicDepthBuffer && (r = n(r));
|
|
2294
|
-
let i = Te(t, r, this._previousCameraProjectionMatrixInverse), a = this._previousCameraWorldMatrix.mul(
|
|
2295
|
-
return this.camera.isOrthographicCamera ?
|
|
2296
|
-
}, o =
|
|
2297
|
-
let i = r.rgb.add(n.rgb).mul(.5), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7), o = t.sub(
|
|
2298
|
-
return c.greaterThan(1).select(
|
|
2294
|
+
let i = Te(t, r, this._previousCameraProjectionMatrixInverse), a = this._previousCameraWorldMatrix.mul(L(i, 1)).xyz, o = this._cameraWorldMatrixInverse.mul(L(a, 1)).z;
|
|
2295
|
+
return this.camera.isOrthographicCamera ? ze(o, this._cameraNearFar.x, this._cameraNearFar.y) : He(o, this._cameraNearFar.x, this._cameraNearFar.y);
|
|
2296
|
+
}, o = z(([e, t, n, r]) => {
|
|
2297
|
+
let i = r.rgb.add(n.rgb).mul(.5), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7), o = t.sub(L(i, e.a)), s = o.xyz.div(a).abs(), c = U(s.x, s.y, s.z);
|
|
2298
|
+
return c.greaterThan(1).select(L(i, e.a).add(o.div(c)), t);
|
|
2299
2299
|
}).setLayout({
|
|
2300
2300
|
name: "clipAABB",
|
|
2301
2301
|
type: "vec4",
|
|
@@ -2317,7 +2317,7 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2317
2317
|
type: "vec4"
|
|
2318
2318
|
}
|
|
2319
2319
|
]
|
|
2320
|
-
}), s =
|
|
2320
|
+
}), s = z(([e, t, n, r]) => {
|
|
2321
2321
|
let i = [
|
|
2322
2322
|
[-1, -1],
|
|
2323
2323
|
[-1, 1],
|
|
@@ -2329,13 +2329,13 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2329
2329
|
[-1, 0]
|
|
2330
2330
|
], a = t.toVar(), s = t.pow2().toVar();
|
|
2331
2331
|
for (let [t, n] of i) {
|
|
2332
|
-
let r = this.beautyNode.offset(
|
|
2332
|
+
let r = this.beautyNode.offset(Ve(t, n)).load(e).max(0);
|
|
2333
2333
|
a.addAssign(r), s.addAssign(r.pow2());
|
|
2334
2334
|
}
|
|
2335
|
-
let c =
|
|
2335
|
+
let c = F(i.length + 1), l = a.div(c), u = s.div(c).sub(l.pow2()).max(0).sqrt().mul(r), d = l.sub(u), f = l.add(u);
|
|
2336
2336
|
return o(l.clamp(d, f), n, d, f);
|
|
2337
|
-
}), c =
|
|
2338
|
-
let n = e.mul(t).fract().abs(), r =
|
|
2337
|
+
}), c = z(([e, t]) => {
|
|
2338
|
+
let n = e.mul(t).fract().abs(), r = U(n, n.oneMinus());
|
|
2339
2339
|
return r.x.mul(r.y).oneMinus().div(.75);
|
|
2340
2340
|
}).setLayout({
|
|
2341
2341
|
name: "subpixelCorrection",
|
|
@@ -2347,12 +2347,12 @@ var Tn = /* @__PURE__ */ new xe(), En = /* @__PURE__ */ new k(), Dn = [
|
|
|
2347
2347
|
name: "textureSize",
|
|
2348
2348
|
type: "ivec2"
|
|
2349
2349
|
}]
|
|
2350
|
-
}), l =
|
|
2351
|
-
let r = n.oneMinus(), i = e.mul(
|
|
2352
|
-
return n.mulAssign(
|
|
2353
|
-
}), u =
|
|
2354
|
-
let e =
|
|
2355
|
-
return this.useSubpixelCorrection && C.addAssign(c(p, t).mul(.25)), C.assign(y.select(C.add(S).saturate(), 1)), l(b, s(n, b, x,
|
|
2350
|
+
}), l = z(([e, t, n]) => {
|
|
2351
|
+
let r = n.oneMinus(), i = e.mul(F(1).div(U(e.r, e.g, e.b).add(1))), a = t.mul(F(1).div(U(t.r, t.g, t.b).add(1))), o = Ne(i.rgb), s = Ne(a.rgb);
|
|
2352
|
+
return n.mulAssign(F(1).div(o.add(1))), r.mulAssign(F(1).div(s.add(1))), ot(e.mul(n), t.mul(r)).div(U(n.add(r), 1e-5)).toVar();
|
|
2353
|
+
}), u = H(this._historyRenderTarget.texture), d = z(() => {
|
|
2354
|
+
let e = ke(), 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(R(.5, -.5)), m = e.sub(p), h = a(m), g = m.greaterThanEqual(0).all().and(m.lessThanEqual(1).all()), _ = f.sub(o).greaterThan(this.edgeDepthDiff), v = o.sub(h).greaterThan(this.depthThreshold), y = g.and(_.or(v.not())), b = this.beautyNode.sample(e), x = u.sample(e.sub(p)), S = e.sub(m).mul(t).length().div(this.maxVelocityLength).saturate(), C = F(.05).toVar();
|
|
2355
|
+
return this.useSubpixelCorrection && C.addAssign(c(p, t).mul(.25)), C.assign(y.select(C.add(S).saturate(), 1)), l(b, s(n, b, x, qe(.5, 1, S.oneMinus().pow2())), C);
|
|
2356
2356
|
});
|
|
2357
2357
|
return this._resolveMaterial.colorNode = d(), this._textureNode;
|
|
2358
2358
|
}
|
|
@@ -2365,7 +2365,7 @@ function Ln(e, t) {
|
|
|
2365
2365
|
for (; e > 0;) n /= t, r += e % t * n, e = Math.floor(e / t);
|
|
2366
2366
|
return r;
|
|
2367
2367
|
}
|
|
2368
|
-
var Rn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Ln(t + 1, 2), Ln(t + 1, 3)]), zn = (e, t, n, r) => new In(
|
|
2368
|
+
var Rn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Ln(t + 1, 2), Ln(t + 1, 3)]), zn = (e, t, n, r) => new In(Qe(e), t, n, r), Bn = class e extends zt {
|
|
2369
2369
|
constructor(...t) {
|
|
2370
2370
|
super(...t), this.passId = e.passId;
|
|
2371
2371
|
}
|
|
@@ -2511,7 +2511,7 @@ var Rn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Ln(t + 1, 2), Ln(
|
|
|
2511
2511
|
t && this.applyQualityParametersCallback(t, e);
|
|
2512
2512
|
}
|
|
2513
2513
|
async autoDetectInitialQualityLevel() {
|
|
2514
|
-
let { getGPUTier: e } = await import("./dist-
|
|
2514
|
+
let { getGPUTier: e } = await import("./dist-Blgk0vU0.mjs"), t = await e({ benchmarksURL: "./benchmarks" });
|
|
2515
2515
|
if (!t || !t.fps) {
|
|
2516
2516
|
console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel = Un;
|
|
2517
2517
|
return;
|
|
@@ -2523,18 +2523,18 @@ var Rn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Ln(t + 1, 2), Ln(
|
|
|
2523
2523
|
this.passId = "FogRenderPass";
|
|
2524
2524
|
}
|
|
2525
2525
|
constructor(t) {
|
|
2526
|
-
super(), this.passId = e.passId, this.sceneWithFog = void 0, this.fogColor =
|
|
2526
|
+
super(), this.passId = e.passId, this.sceneWithFog = void 0, this.fogColor = V(new k(t.color)), this.fogNearBlend = V(t.nearBlend), this.fogFarBlend = V(t.farBlend);
|
|
2527
2527
|
}
|
|
2528
2528
|
assemble(e, t, n, r, i) {
|
|
2529
2529
|
if (!(r instanceof l) || i === "no fog") return this.removeSceneFog(), t;
|
|
2530
2530
|
let a = e.getTextureNode("depth");
|
|
2531
|
-
if (i === "depth") return this.removeSceneFog(),
|
|
2532
|
-
let o =
|
|
2533
|
-
return this.addSceneFog(n, u, c),
|
|
2531
|
+
if (i === "depth") return this.removeSceneFog(), L(N(a.r), 1);
|
|
2532
|
+
let o = V(r.projectionMatrixInverse), s = V(r.matrixWorld), c = Ee(V(r.far).onRenderUpdate(() => r.far), 50).sub(this.fogFarBlend), u = c.sub(this.fogNearBlend), d = L(gt.x.mul(2).sub(1), gt.y.mul(2).sub(1), a.r, 1), f = o.mul(d), p = f.xyz.div(f.w), m = s.mul(L(p, 1)).xyz.xz.length(), h = c.sub(m).div(c.sub(u)).clamp(0, 1);
|
|
2533
|
+
return this.addSceneFog(n, u, c), qe(L(this.fogColor, 1), t, h);
|
|
2534
2534
|
}
|
|
2535
2535
|
addSceneFog(e, t, n) {
|
|
2536
|
-
let r =
|
|
2537
|
-
e.fogNode =
|
|
2536
|
+
let r = we.xz.length(), i = n.sub(r).div(n.sub(t)).clamp(0, 1).oneMinus();
|
|
2537
|
+
e.fogNode = Oe(this.fogColor, i), this.sceneWithFog = e;
|
|
2538
2538
|
}
|
|
2539
2539
|
removeSceneFog() {
|
|
2540
2540
|
this.sceneWithFog &&= (this.sceneWithFog.fogNode = null, void 0);
|
|
@@ -2554,11 +2554,12 @@ var Rn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Ln(t + 1, 2), Ln(
|
|
|
2554
2554
|
[A.AGX]: 6,
|
|
2555
2555
|
[A.NEUTRAL]: 7
|
|
2556
2556
|
}, Xn = class extends fe {
|
|
2557
|
-
constructor(e, t, n, r) {
|
|
2558
|
-
super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.qualityManager = new qn(this.applyQualityParameters.bind(this)), this.freezeFrames = 0, this.freezeRenderTarget = new w(), this.renderPipeline = new
|
|
2557
|
+
constructor(e, t, n, r, i = n) {
|
|
2558
|
+
super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.qualityManager = new qn(this.applyQualityParameters.bind(this)), this.freezeFrames = 0, this.freezeRenderTarget = new w(), this.renderPipeline = new Ce(t), this.applyToneMappingConfig(), this.enableDefaultRenderPasses(n, r, i), this._initData.webGpuConfig.autoDetectQualityLevel ? this.qualityManager.autoDetectInitialQualityLevel().then(() => this.qualityManager.applyCurrentQualityLevel(0)) : this.qualityManager.applyCurrentQualityLevel(0);
|
|
2559
2559
|
}
|
|
2560
|
-
enableDefaultRenderPasses(e, t) {
|
|
2561
|
-
|
|
2560
|
+
enableDefaultRenderPasses(e, t, n) {
|
|
2561
|
+
let r = this._initData.webGpuConfig.fog.enabled, i = this._initData.transparentBackground;
|
|
2562
|
+
e && this.enableSsgiPass(n), t && this.enableOutline(t.outlineVisibleEdgeColor, t.outlineHiddenEdgeColor), n && !i && this.enableTraaPass(), r && !i && this.enableFogPass();
|
|
2562
2563
|
}
|
|
2563
2564
|
async addGroundShadowLightAndFloor(e) {
|
|
2564
2565
|
await this._webGpuGroundShadowReflection.addToScene(e);
|
|
@@ -2573,7 +2574,7 @@ var Rn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Ln(t + 1, 2), Ln(
|
|
|
2573
2574
|
super.setCameraType(e), this.passNeedsReassembly = !0;
|
|
2574
2575
|
}
|
|
2575
2576
|
switchToConfigurator() {
|
|
2576
|
-
super.switchToConfigurator(), this._webGpuGroundShadowReflection.setVisible(!0), this._initData.webGpuConfig.fog.enabled && this.enableFogPass(), this.passNeedsReassembly = !0;
|
|
2577
|
+
super.switchToConfigurator(), this._webGpuGroundShadowReflection.setVisible(!0), this._initData.webGpuConfig.fog.enabled && !this._initData.transparentBackground && this.enableFogPass(), this.passNeedsReassembly = !0;
|
|
2577
2578
|
}
|
|
2578
2579
|
switchToPlanner(e) {
|
|
2579
2580
|
super.switchToPlanner(e), this._webGpuGroundShadowReflection.setVisible(!1), this.disableFogPass(), this.passNeedsReassembly = !0;
|
|
@@ -2596,7 +2597,7 @@ var Rn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Ln(t + 1, 2), Ln(
|
|
|
2596
2597
|
(e instanceof r || e instanceof l) && e.updateProjectionMatrix();
|
|
2597
2598
|
}
|
|
2598
2599
|
assembleRenderPasses(e, t) {
|
|
2599
|
-
let n =
|
|
2600
|
+
let n = Xe(e, t), r = n;
|
|
2600
2601
|
for (let i of this.renderPasses.values()) r = i.assemble(n, r, e, t, this.debugMode);
|
|
2601
2602
|
return r;
|
|
2602
2603
|
}
|
|
@@ -2621,7 +2622,7 @@ var Rn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Ln(t + 1, 2), Ln(
|
|
|
2621
2622
|
let e = this.renderPasses.get(Bt.passId);
|
|
2622
2623
|
if (e && e instanceof Bt) return e;
|
|
2623
2624
|
}
|
|
2624
|
-
enableSsgiPass() {
|
|
2625
|
+
enableSsgiPass(e) {
|
|
2625
2626
|
this.renderPasses.get(Mn.passId) || this.addRenderPass(new Mn({
|
|
2626
2627
|
sliceCount: 2,
|
|
2627
2628
|
stepCount: 12,
|
|
@@ -2632,7 +2633,8 @@ var Rn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Ln(t + 1, 2), Ln(
|
|
|
2632
2633
|
aoIntensity: .6,
|
|
2633
2634
|
giIntensity: 4,
|
|
2634
2635
|
useLinearThickness: !1,
|
|
2635
|
-
useScreenSpaceSampling: !0
|
|
2636
|
+
useScreenSpaceSampling: !0,
|
|
2637
|
+
useTemporalFiltering: e
|
|
2636
2638
|
}));
|
|
2637
2639
|
}
|
|
2638
2640
|
enableTraaPass() {
|
|
@@ -2726,4 +2728,4 @@ de([ue, le("design:type", Object)], Xn.prototype, "_domHelper", void 0), de([ue,
|
|
|
2726
2728
|
//#endregion
|
|
2727
2729
|
export { Xn as RoomleWebGPURenderer };
|
|
2728
2730
|
|
|
2729
|
-
//# sourceMappingURL=roomle-webgpu-renderer-
|
|
2731
|
+
//# sourceMappingURL=roomle-webgpu-renderer-fOYJoKJU.mjs.map
|