@roomle/web-sdk 5.1.0-alpha.8 → 5.1.0-alpha.9
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/{api-CNS40jV7.mjs → api-DBo4bqkV.mjs} +2 -2
- package/lib/{api-CNS40jV7.mjs.map → api-DBo4bqkV.mjs.map} +1 -1
- package/lib/asset-loader.worker-CE4O0JU-.mjs.map +1 -1
- package/lib/common-utils-CNGLvAo_.mjs +320 -0
- package/lib/common-utils-CNGLvAo_.mjs.map +1 -0
- package/lib/{component-raycast-helper-CTx3r9Si.mjs → component-raycast-helper-razJrkD8.mjs} +3 -3
- package/lib/{component-raycast-helper-CTx3r9Si.mjs.map → component-raycast-helper-razJrkD8.mjs.map} +1 -1
- package/lib/{configurator-eoTp9VBB.mjs → configurator-Bfbi3q7X.mjs} +4 -4
- package/lib/{configurator-eoTp9VBB.mjs.map → configurator-Bfbi3q7X.mjs.map} +1 -1
- package/lib/configurator-BxIDaIsx.mjs +2 -0
- package/lib/{glb-viewer-BMN5bmtQ.mjs → glb-viewer-CP0TDbjo.mjs} +5 -5
- package/lib/{glb-viewer-BMN5bmtQ.mjs.map → glb-viewer-CP0TDbjo.mjs.map} +1 -1
- package/lib/glb-viewer-DYkOoOv-.mjs +2 -0
- package/lib/{highlight-coordinator-VvPNsuCv.mjs → highlight-coordinator-DwIDs-5n.mjs} +3 -3
- package/lib/{highlight-coordinator-VvPNsuCv.mjs.map → highlight-coordinator-DwIDs-5n.mjs.map} +1 -1
- package/lib/{homag-intelligence-BaZMJh4H.mjs → homag-intelligence-1GdmdIBg.mjs} +3 -3
- package/lib/{homag-intelligence-BaZMJh4H.mjs.map → homag-intelligence-1GdmdIBg.mjs.map} +1 -1
- package/lib/{imos-ix-poc-export-helper-CSuMX4o4.mjs → imos-ix-poc-export-helper-DLaYjLvF.mjs} +2 -2
- package/lib/{imos-ix-poc-export-helper-CSuMX4o4.mjs.map → imos-ix-poc-export-helper-DLaYjLvF.mjs.map} +1 -1
- package/lib/{material-viewer-0urPSGjB.mjs → material-viewer-DJEEvr_2.mjs} +5 -5
- package/lib/{material-viewer-0urPSGjB.mjs.map → material-viewer-DJEEvr_2.mjs.map} +1 -1
- package/lib/{packages-HyyuVpoW.mjs → packages-Da2aAUP6.mjs} +6 -5
- package/lib/{packages-HyyuVpoW.mjs.map → packages-Da2aAUP6.mjs.map} +1 -1
- package/lib/{planner-BAAunRfK.mjs → planner-B3gmGQ5h.mjs} +3 -3
- package/lib/{planner-BAAunRfK.mjs.map → planner-B3gmGQ5h.mjs.map} +1 -1
- package/lib/planner-BpzUs9MN.mjs +2 -0
- package/lib/roomle-headless.d.ts +16 -1
- package/lib/roomle-headless.js +97 -97
- package/lib/roomle-headless.js.map +1 -1
- package/lib/{roomle-sdk-gECTnB0n.mjs → roomle-sdk-B7kJPhbu.mjs} +218 -182
- package/lib/roomle-sdk-B7kJPhbu.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +16 -1
- package/lib/roomle-sdk.js +9 -8
- package/lib/{roomle-webgpu-renderer-dKboJY9a.mjs → roomle-webgpu-renderer-C26OAfkn.mjs} +297 -297
- package/lib/{roomle-webgpu-renderer-dKboJY9a.mjs.map → roomle-webgpu-renderer-C26OAfkn.mjs.map} +1 -1
- package/lib/{scene-renderer-CoPV8z_q.mjs → scene-renderer-CHMngNZI.mjs} +3 -3
- package/lib/{scene-renderer-CoPV8z_q.mjs.map → scene-renderer-CHMngNZI.mjs.map} +1 -1
- package/lib/{script-loader-LvvacdJd.mjs → script-loader-Bgt0r8D_.mjs} +2 -2
- package/lib/{script-loader-LvvacdJd.mjs.map → script-loader-Bgt0r8D_.mjs.map} +1 -1
- package/lib/{shading-settings-dogROhBy.mjs → shading-settings-DJ4kY2Cn.mjs} +2 -2
- package/lib/{shading-settings-dogROhBy.mjs.map → shading-settings-DJ4kY2Cn.mjs.map} +1 -1
- package/lib/{stats-helper-CESAA1or.mjs → stats-helper-CuB9x20N.mjs} +2 -2
- package/lib/{stats-helper-CESAA1or.mjs.map → stats-helper-CuB9x20N.mjs.map} +1 -1
- package/lib/{threejs-utils-Dpa_VhZx.mjs → threejs-utils-CrP6G-ow.mjs} +2 -2
- package/lib/{threejs-utils-Dpa_VhZx.mjs.map → threejs-utils-CrP6G-ow.mjs.map} +1 -1
- package/lib/{tools-core-BwoUD8EO.mjs → tools-core-Bo2DwzBG.mjs} +3 -3
- package/lib/{tools-core-BwoUD8EO.mjs.map → tools-core-Bo2DwzBG.mjs.map} +1 -1
- package/package.json +2 -2
- package/lib/common-utils-Cn03WfRo.mjs +0 -206
- package/lib/common-utils-Cn03WfRo.mjs.map +0 -1
- package/lib/configurator-DsD-u9YC.mjs +0 -2
- package/lib/glb-viewer-yvDgqhGa.mjs +0 -2
- package/lib/planner-C05yEzOU.mjs +0 -2
- package/lib/roomle-sdk-gECTnB0n.mjs.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { $t as e, Ar as t, Ci as n, Dn as r, Ei as i, Hr as a, J as o, Kn as s, Nr as c, Pr as l, Si as u, Ti as d, Tr as f, Tt as p, V as m, Vi as h, Xr as g, Y as _, Yi as v, _i as y, an as b, bi as ee, cn as x, ct as S, fi as C, g as w, gr as
|
|
2
|
-
import { h as he, t as ge } from "./shading-settings-
|
|
1
|
+
import { $t as e, Ar as t, Ci as n, Dn as r, Ei as i, Hr as a, J as o, Kn as s, Nr as c, Pr as l, Si as u, Ti as d, Tr as f, Tt as p, V as m, Vi as h, Xr as g, Y as _, Yi as v, _i as y, an as b, bi as ee, cn as x, ct as S, fi as C, g as w, gr as T, hr as E, ht as te, jr as ne, kn as D, q as re, qi as ie, qn as ae, rt as oe, t as se, un as ce, vi as le, w as ue, wi as de, wr as fe, xi as pe, yi as me } from "./three.core-BTUCraWz.mjs";
|
|
2
|
+
import { h as he, t as ge } from "./shading-settings-DJ4kY2Cn.mjs";
|
|
3
3
|
import { n as _e, r as ve, t as ye } from "./decorate-CjaqqbUP.mjs";
|
|
4
|
-
import { a as O, n as be, r as xe } from "./roomle-renderer-nCUrLU_S.mjs";
|
|
5
|
-
import { Dt as
|
|
6
|
-
import { $ as
|
|
4
|
+
import { a as O, n as be, r as xe, t as Se } from "./roomle-renderer-nCUrLU_S.mjs";
|
|
5
|
+
import { Dt as Ce, It as k, Jn as we, Mn as Te, Q as Ee, Sn as A, Vt as De, _r as Oe, mr as ke, un as Ae, vt as je, x as Me, yn as Ne } from "./three.webgpu-DTO8skiU.mjs";
|
|
6
|
+
import { $ as Pe, B as j, Bt as M, C as Fe, Ct as Ie, D as N, Dt as Le, E as Re, Et as ze, Ft as Be, G as Ve, Ht as He, I as Ue, J as We, K as Ge, L as Ke, Lt as qe, M as Je, Mt as P, N as Ye, Nt as F, O as Xe, Ot as I, P as Ze, Pt as Qe, Q as $e, R as et, S as tt, T as nt, Ut as rt, V as it, Vt as L, W as R, Wt as at, X as ot, Y as st, Z as ct, _ as lt, _t as ut, a as dt, at as ft, b as pt, bt as mt, c as ht, ct as gt, d as z, dt as _t, et as vt, f as yt, ft as bt, g as xt, ht as St, i as B, it as Ct, j as wt, k as V, kt as Tt, l as Et, m as Dt, mt as Ot, n as H, nt as kt, o as At, ot as jt, p as Mt, r as Nt, rt as Pt, s as Ft, st as It, t as Lt, tt as Rt, u as zt, ut as Bt, v as Vt, vt as Ht, w as Ut, wt as Wt, x as Gt, xt as Kt, y as qt, yt as Jt, z as Yt, zt as U } from "./three.tsl-kYk-mr3-.mjs";
|
|
7
7
|
//#region ../../node_modules/three/examples/jsm/tsl/display/OutlineNode.js
|
|
8
|
-
var W = /* @__PURE__ */ new
|
|
8
|
+
var W = /* @__PURE__ */ new Ae(), Xt = /* @__PURE__ */ new d(), Zt = /* @__PURE__ */ new d(1, 0), Qt = /* @__PURE__ */ new d(0, 1), G, $t = class extends we {
|
|
9
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 = ot(i), this.edgeGlowNode = ot(a), this.downSampleRatio = o, this.updateBeforeType =
|
|
14
|
+
let { selectedObjects: r = [], edgeThickness: i = V(1), edgeGlow: a = V(0), downSampleRatio: o = 2 } = n;
|
|
15
|
+
this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode = ot(i), this.edgeGlowNode = ot(a), this.downSampleRatio = o, this.updateBeforeType = De.FRAME, this._renderTargetDepthBuffer = new c(), this._renderTargetDepthBuffer.depthTexture = new _(), this._renderTargetDepthBuffer.depthTexture.type = S, this._renderTargetMaskBuffer = new c(), this._renderTargetMaskDownSampleBuffer = new c(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new c(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new c(1, 1, { depthBuffer: !1 }), this._cameraNear = bt("near", "float", t), this._cameraFar = bt("far", "float", t), this._blurDirection = F(new d()), this._depthTextureUniform = I(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = I(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = I(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = I(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = I(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = I(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = M(1, 0, 0), this._hiddenEdgeColor = M(0, 1, 0), this._depthMaterial = new k(), this._depthMaterial.colorNode = Vt(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new Te(), this._depthSpriteMaterial.colorNode = Vt(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new k(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new Te(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new k(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new k(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new k(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new k(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new k(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = Ct(this, this._renderTargetComposite.texture);
|
|
16
16
|
}
|
|
17
17
|
get visibleEdge() {
|
|
18
18
|
return this.r;
|
|
@@ -35,7 +35,7 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
this._lastSelectionCount = this._selectionCache.size, G = A.resetRendererAndSceneState(t, r, G);
|
|
38
|
-
let i = t.getDrawingBufferSize(
|
|
38
|
+
let i = t.getDrawingBufferSize(Xt);
|
|
39
39
|
this.setSize(i.width, i.height), t.setClearColor(16777215, 1);
|
|
40
40
|
let a = r.name;
|
|
41
41
|
t.setRenderTarget(this._renderTargetDepthBuffer), t.setRenderObjectFunction((e, n, r, i, a, o, s, c) => {
|
|
@@ -48,20 +48,20 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__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(
|
|
51
|
+
}), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(G.renderObjectFunction), this._selectionCache.clear(), r.name = a, W.material = this._materialCopy, W.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), W.render(t), W.material = this._edgeDetectionMaterial, W.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Zt), W.material = this._separableBlurMaterial, W.name = "Outline [ Blur Half Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer1.texture, this._blurDirection.value.copy(Qt), t.setRenderTarget(this._renderTargetEdgeBuffer1), W.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Zt), W.material = this._separableBlurMaterial2, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer2), W.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer2.texture, this._blurDirection.value.copy(Qt), t.setRenderTarget(this._renderTargetEdgeBuffer2), W.render(t), W.material = this._compositeMaterial, W.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), W.render(t), A.restoreRendererAndSceneState(t, r, G);
|
|
52
52
|
}
|
|
53
53
|
setup() {
|
|
54
54
|
let e = () => {
|
|
55
|
-
let e = this._depthTextureUniform.sample(
|
|
56
|
-
return t = this.camera.isPerspectiveCamera ? ft(e, this._cameraNear, this._cameraFar) :
|
|
55
|
+
let e = this._depthTextureUniform.sample(Ht), t;
|
|
56
|
+
return t = this.camera.isPerspectiveCamera ? ft(e, this._cameraNear, this._cameraFar) : Pe(e, this._cameraNear, this._cameraFar), M(0, jt.z.lessThanEqual(t).select(1, 0), 1);
|
|
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 = Tt(this._maskTextureDownsSampleUniform), t = U(1).div(e).toVar(), n =
|
|
61
|
-
return
|
|
59
|
+
let t = H(() => {
|
|
60
|
+
let e = Tt(this._maskTextureDownsSampleUniform), t = U(1).div(e).toVar(), n = L(1, 0, 0, 1).mul(L(t, t)), r = qe(), i = this._maskTextureDownsSampleUniform.sample(r.add(n.xy)).toVar(), a = this._maskTextureDownsSampleUniform.sample(r.sub(n.xy)).toVar(), o = this._maskTextureDownsSampleUniform.sample(r.add(n.yw)).toVar(), s = this._maskTextureDownsSampleUniform.sample(r.sub(n.yw)).toVar(), c = U(st(i.r.sub(a.r), .5), st(o.r.sub(s.r), .5)).length();
|
|
61
|
+
return L(Ve(Ve(i.g, a.g), Ve(o.g, s.g)).oneMinus().greaterThan(.001).select(this._visibleEdgeColor, this._hiddenEdgeColor), 1).mul(c);
|
|
62
62
|
});
|
|
63
63
|
this._edgeDetectionMaterial.fragmentNode = t(), this._edgeDetectionMaterial.needsUpdate = !0;
|
|
64
|
-
let n =
|
|
64
|
+
let n = H(([e, t]) => V(.39894).mul(Xe(V(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = H(([e]) => {
|
|
65
65
|
let t = Tt(this._maskTextureDownsSampleUniform), r = U(1).div(t).toVar(), i = qe(), a = e.div(2).toVar(), o = n(0, a).toVar(), s = this._blurColorTextureUniform.sample(i).mul(o).toVar(), c = this._blurDirection.mul(r).mul(e).div(4).toVar(), l = c.toVar();
|
|
66
66
|
return dt({
|
|
67
67
|
start: Ue(1),
|
|
@@ -69,12 +69,12 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
69
69
|
type: "int",
|
|
70
70
|
condition: "<="
|
|
71
71
|
}, ({ i: t }) => {
|
|
72
|
-
let r = n(e.mul(
|
|
72
|
+
let r = n(e.mul(V(t)).div(4), a), u = this._blurColorTextureUniform.sample(i.add(l)), d = this._blurColorTextureUniform.sample(i.sub(l));
|
|
73
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 = H(() => {
|
|
78
78
|
let e = this._edge1TextureUniform, t = this._edge2TextureUniform, n = this._maskTextureUniform, r = e.add(t.mul(this.edgeGlowNode));
|
|
79
79
|
return n.r.mul(r);
|
|
80
80
|
});
|
|
@@ -88,26 +88,26 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
88
88
|
(e.isMesh || e.isSprite) && this._selectionCache.add(e);
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
},
|
|
91
|
+
}, en = (e, t, n) => new $t(e, t, n), tn = class {}, nn = class e extends tn {
|
|
92
92
|
static {
|
|
93
93
|
this.passId = "OutlineRenderPass";
|
|
94
94
|
}
|
|
95
95
|
constructor(t) {
|
|
96
|
-
super(), this.passId = e.passId, this.selectedObjects = t.selectedObjects, this.edgeStrength =
|
|
96
|
+
super(), this.passId = e.passId, this.selectedObjects = t.selectedObjects, this.edgeStrength = F(t.edgeStrength), this.edgeGlow = F(t.edgeGlow), this.edgeThickness = F(t.edgeThickness), this.visibleEdgeColor = F(new ue(t.visibleEdgeColor)), this.hiddenEdgeColor = F(new ue(t.hiddenEdgeColor));
|
|
97
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 ue(e), this.hiddenEdgeColor.value = new ue(t);
|
|
103
103
|
}
|
|
104
104
|
assemble(e, t, n, r, i) {
|
|
105
|
-
let { visibleEdge: a, hiddenEdge: o } =
|
|
105
|
+
let { visibleEdge: a, hiddenEdge: o } = en(n, r, {
|
|
106
106
|
selectedObjects: this.selectedObjects,
|
|
107
107
|
edgeThickness: this.edgeThickness,
|
|
108
108
|
edgeGlow: this.edgeGlow
|
|
109
|
-
}), s =
|
|
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, t) {
|
|
113
113
|
let n = e.addFolder("Outline Settings");
|
|
@@ -117,21 +117,21 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
117
117
|
this.hiddenEdgeColor.value.set(e), t();
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, rn = class {
|
|
121
121
|
constructor(e, t) {
|
|
122
122
|
this.uid = e, this.cid = e.match(/^(.*):f(\d+)$/)[1], this.name = t, this.timestamp = 0, this.cpu = 0, this.gpu = 0, this.fps = 0, this.children = [], this.parent = null;
|
|
123
123
|
}
|
|
124
|
-
},
|
|
124
|
+
}, an = class extends rn {
|
|
125
125
|
constructor(e, t, n, r) {
|
|
126
126
|
let i = t.name;
|
|
127
127
|
i === "" && (t.isScene ? i = "Scene" : t.isQuadMesh && (i = "QuadMesh")), super(e, i), this.scene = t, this.camera = n, this.renderTarget = r, this.isRenderStats = !0;
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, on = class extends rn {
|
|
130
130
|
constructor(e, t) {
|
|
131
131
|
let n = t.name || (t.isComputeNode ? "Compute" : "Compute Group");
|
|
132
132
|
super(e, n), this.computeNode = t, this.isComputeStats = !0;
|
|
133
133
|
}
|
|
134
|
-
},
|
|
134
|
+
}, sn = class extends Ee {
|
|
135
135
|
constructor() {
|
|
136
136
|
super(), this.currentFrame = null, this.currentContext = null, this.currentRender = null, this.currentCompute = null, this.currentNodes = null, this.lastFrame = null, this.frames = [], this.framesLib = {}, this.maxFrames = 512, this._lastFinishTime = 0, this._resolveTimestampPromise = null, this._rAFId = null, this.overdraw = !1, this._overdrawMaterial = null, this.isRendererInspector = !0;
|
|
137
137
|
}
|
|
@@ -150,8 +150,8 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
150
150
|
let t = this.getPrimaryPass();
|
|
151
151
|
if (t === null) return;
|
|
152
152
|
let n = this.getRenderer();
|
|
153
|
-
this._overdrawMaterial === null && (this._overdrawMaterial = new
|
|
154
|
-
colorNode:
|
|
153
|
+
this._overdrawMaterial === null && (this._overdrawMaterial = new je({
|
|
154
|
+
colorNode: M(.25),
|
|
155
155
|
blending: 2,
|
|
156
156
|
depthTest: !0,
|
|
157
157
|
depthWrite: !0
|
|
@@ -263,7 +263,7 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
263
263
|
beginCompute(e, t) {
|
|
264
264
|
let n = this.getFrame();
|
|
265
265
|
if (!n) return;
|
|
266
|
-
let r = new
|
|
266
|
+
let r = new on(e, t);
|
|
267
267
|
r.timestamp = performance.now(), r.parent = this.getParent(), n.computes.push(r), r.parent.children.push(r), this.currentCompute = r, this.currentContext = r;
|
|
268
268
|
}
|
|
269
269
|
finishCompute() {
|
|
@@ -274,7 +274,7 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
274
274
|
beginRender(e, t, n, r) {
|
|
275
275
|
let i = this.getFrame();
|
|
276
276
|
if (!i) return;
|
|
277
|
-
let a = new
|
|
277
|
+
let a = new an(e, t, n, r);
|
|
278
278
|
a.timestamp = performance.now(), a.parent = this.getParent(), i.renders.push(a), a.parent.children.push(a), this.currentRender = a, this.currentContext = a;
|
|
279
279
|
}
|
|
280
280
|
finishRender() {
|
|
@@ -285,12 +285,12 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
285
285
|
dispose() {
|
|
286
286
|
this._rAFId !== null && (cancelAnimationFrame(this._rAFId), this._rAFId = null), this._resolveTimestampPromise = null, this._overdrawMaterial !== null && (this._overdrawMaterial.dispose(), this._overdrawMaterial = null), super.dispose();
|
|
287
287
|
}
|
|
288
|
-
},
|
|
288
|
+
}, cn = class {
|
|
289
289
|
static init(e, t = null) {
|
|
290
290
|
let n = document.createElement("style");
|
|
291
291
|
t && (n.nonce = t), n.textContent = "\n@scope (.three-inspector) {\n\n :scope {\n --profiler-background: #1e1e24f5;\n --profiler-header-background: #2a2a33aa;\n --profiler-header: #2a2a33;\n --profiler-border: #4a4a5a;\n --text-primary: #e0e0e0;\n --text-secondary: #9a9aab;\n --color-accent: #00aaff;\n --color-green: #4caf50;\n --color-yellow: #ffc107;\n --color-red: #f44336;\n --color-fps: rgb(63, 81, 181);\n --color-call: rgba(255, 185, 34, 1);\n --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n --font-mono: 'Courier New', Courier, monospace;\n\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 1000;\n overflow: hidden;\n color-scheme: dark;\n }\n\n :scope * {\n pointer-events: auto;\n }\n\n .profiler-panel, .profiler-toggle, .detached-tab-panel,\n .profiler-panel *, .profiler-toggle *, .detached-tab-panel * {\n text-transform: initial;\n line-height: normal;\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n }\n\n .profiler-toggle {\n position: absolute;\n top: 15px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 12px 6px 6px 12px;\n color: var(--text-primary);\n cursor: pointer;\n z-index: 1002;\n transition: all 0.2s ease-in-out;\n /*font-size: 14px;*/\n font-size: 15px;\n backdrop-filter: blur(8px);\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);\n display: flex;\n align-items: stretch;\n padding: 0;\n overflow: hidden;\n font-family: var(--font-family);\n }\n\n .profiler-toggle-graph {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 0;\n pointer-events: none;\n background: transparent;\n border: none;\n border-radius: inherit;\n opacity: 0.5;\n }\n\n .profiler-toggle.toggle-left {\n right: auto;\n left: 15px;\n border-radius: 6px 12px 12px 6px;\n flex-direction: row-reverse;\n }\n\n .profiler-toggle.toggle-left .builtin-tabs-container {\n border-right: none;\n border-left: 1px solid #262636;\n }\n\n .profiler-toggle:hover {\n border-color: var(--color-accent);\n }\n\n .profiler-toggle.panel-open .toggle-icon {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .toggle-icon {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n font-size: 20px;\n transition: background-color 0.2s;\n }\n\n .console-badge-container {\n position: absolute;\n top: 2px;\n right: 2px;\n display: flex;\n gap: 2px;\n pointer-events: none;\n }\n\n .console-badge,\n .tab-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 14px;\n height: 14px;\n padding: 0 4px;\n border-radius: 7px;\n font-size: 9px;\n font-weight: bold;\n color: #ffffff;\n line-height: 1;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n\n .tab-badge-container {\n position: absolute;\n top: 1px;\n right: 3px;\n display: flex;\n gap: 2px;\n pointer-events: none;\n }\n\n .console-badge.error,\n .tab-badge.error {\n background-color: var(--color-red);\n }\n\n .console-badge.warn,\n .tab-badge.warn {\n background-color: var(--color-yellow);\n color: #111111;\n }\n\n .profiler-toggle:hover .toggle-icon {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .profiler-toggle.panel-open:hover .toggle-icon {\n background-color: rgba(0, 170, 255, 0.3);\n }\n\n .toggle-separator {\n width: 1px;\n background-color: var(--profiler-border);\n }\n\n .toggle-text {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: baseline;\n padding: 8px 14px;\n min-width: 80px;\n justify-content: right;\n }\n\n .toggle-text .fps-label {\n font-size: 0.7em;\n margin-left: 10px;\n color: #999;\n }\n\n .builtin-tabs-container {\n position: relative;\n z-index: 1;\n display: flex;\n align-items: stretch;\n gap: 0;\n border-right: 1px solid #262636;\n order: -1;\n }\n\n .builtin-tab-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 8px 14px;\n font-family: var(--font-family);\n font-size: 13px;\n font-weight: 600;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 32px;\n position: relative;\n }\n\n .builtin-tab-btn svg {\n width: 20px;\n height: 20px;\n stroke: currentColor;\n }\n\n .builtin-tab-btn:hover {\n background-color: rgba(255, 255, 255, 0.08);\n color: var(--color-accent);\n }\n\n .builtin-tab-btn:active {\n background-color: rgba(255, 255, 255, 0.12);\n }\n\n .builtin-tab-btn.active {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .builtin-tab-btn.active:hover {\n background-color: rgba(0, 170, 255, 0.3);\n }\n\n .profiler-mini-panel {\n position: absolute;\n top: 60px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 8px;\n color: var(--text-primary);\n z-index: 9999;\n backdrop-filter: blur(8px);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);\n font-family: var(--font-family);\n font-size: 11px;\n width: 350px;\n max-width: calc(100vw - 30px);\n min-width: 170px;\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n overflow-x: hidden;\n display: none;\n opacity: 0;\n transform: translateY(-10px) scale(0.98);\n transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), \n transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n .profiler-mini-panel.toggle-left {\n right: auto;\n left: 15px;\n }\n\n .profiler-mini-panel.visible {\n display: block;\n opacity: 1;\n transform: translateY(0) scale(1);\n }\n\n .profiler-toggle.toggle-bottom {\n top: auto;\n bottom: 15px;\n }\n\n .profiler-mini-panel.toggle-bottom {\n top: auto;\n bottom: 60px;\n }\n\n .profiler-mini-panel::-webkit-scrollbar {\n width: 6px;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.15);\n border-radius: 3px;\n transition: background 0.2s;\n }\n\n .profiler-mini-panel::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.25);\n }\n\n .mini-panel-content {\n padding: 0;\n font-size: 11px;\n line-height: 1.5;\n font-family: var(--font-mono);\n letter-spacing: 0.3px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .mini-panel-content .profiler-content {\n display: block !important;\n background: transparent;\n }\n\n .mini-panel-content .list-scroll-wrapper {\n max-height: calc(100vh - 120px);\n overflow-y: auto;\n overflow-x: hidden;\n width: 100%;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.1);\n border-radius: 2px;\n }\n\n .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.2);\n }\n\n .mini-panel-content .parameters {\n background: transparent;\n border: none;\n box-shadow: none;\n padding: 4px;\n }\n\n @media screen and (max-width: 340px) {\n\n .mini-panel-content .parameters {\n min-width: 0 !important;\n }\n\n .mini-panel-content .list-container.parameters .list-item-row,\n .mini-panel-content .list-container.parameters .list-header {\n grid-template-columns: minmax(0, .5fr) minmax(0, 1fr) !important;\n }\n\n }\n\n .mini-panel-content .list-container.parameters {\n padding: 2px 6px 0px 6px !important;\n }\n\n .mini-panel-content .list-header {\n display: none;\n padding: 2px 4px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n\n .mini-panel-content .list-item {\n border-bottom: 1px solid rgba(74, 74, 90, 0.2);\n transition: background-color 0.15s;\n }\n\n .mini-panel-content .list-item:last-child {\n border-bottom: none;\n }\n\n .mini-panel-content .list-item:hover {\n background-color: rgba(255, 255, 255, 0.04);\n }\n\n .mini-panel-content .list-item.actionable:hover {\n background-color: rgba(255, 255, 255, 0.06);\n cursor: pointer;\n }\n\n .info-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-secondary);\n font-size: 10px;\n font-style: italic;\n margin-left: 6px;\n cursor: help;\n position: relative;\n vertical-align: middle;\n top: -1px;\n }\n\n .info-icon.active {\n background-color: var(--color-accent);\n color: white;\n }\n\n @media (hover: hover) {\n .info-icon:hover {\n background-color: var(--color-accent);\n color: white;\n }\n }\n\n .info-tooltip {\n position: fixed;\n transform: translate(-50%, -100%);\n background-color: rgba(30, 30, 36, 0.95);\n border: 1px solid var(--profiler-border);\n border-radius: 6px;\n padding: 10px 14px;\n color: var(--text-primary);\n font-size: 12px;\n width: max-content;\n max-width: 250px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s, visibility 0.2s;\n z-index: 999999;\n font-style: normal;\n font-family: var(--font-family);\n text-align: left;\n white-space: normal;\n }\n\n .info-tooltip h3 {\n margin: 0 0 6px 0;\n font-size: 13px;\n color: var(--color-accent);\n }\n\n .info-tooltip strong {\n font-weight: 600;\n color: white;\n }\n\n /* Style adjustments for lil-gui look */\n .mini-panel-content .item-row {\n padding: 3px 8px;\n min-height: 24px;\n }\n\n .mini-panel-content .list-item-row {\n padding: 1px 4px;\n gap: 8px;\n min-height: 21px;\n align-items: center;\n }\n\n .mini-panel-content input[type=\"checkbox\"] {\n width: 12px;\n height: 12px;\n }\n\n .mini-panel-content input[type=\"range\"] {\n height: 18px;\n }\n\n .mini-panel-content .value-number input,\n .mini-panel-content .value-slider input {\n background-color: rgba(0, 0, 0, 0.3);\n border: 1px solid rgba(74, 74, 90, 0.5);\n font-size: 10px;\n }\n\n .mini-panel-content .value-number input:focus,\n .mini-panel-content .value-slider input:focus {\n border-color: var(--color-accent);\n }\n\n .mini-panel-content .value-slider {\n gap: 6px;\n }\n\n /* Compact nested items */\n .mini-panel-content .list-item .list-item {\n margin-left: 8px;\n }\n\n .mini-panel-content .list-item .list-item .item-row,\n .mini-panel-content .list-item .list-item .list-item-row {\n padding: 2px 6px;\n min-height: 22px;\n }\n\n /* Compact collapsible headers */\n .mini-panel-content .collapsible .item-row,\n .mini-panel-content .list-item-row.collapsible {\n padding: 2px 8px;\n font-weight: 600;\n min-height: 16px;\n display: flex;\n align-items: center;\n line-height: 1;\n }\n\n .mini-panel-content .collapsible-icon {\n font-size: 10px;\n width: 14px;\n height: 14px;\n }\n\n .mini-panel-content .param-control input[type=\"range\"] {\n height: 12px;\n margin-top: 1px;\n padding-top: 5px;\n user-select: none;\n -webkit-user-select: none;\n outline: none;\n }\n\n .mini-panel-content .param-control input[type=\"range\"]::-webkit-slider-thumb {\n width: 14px;\n height: 14px;\n margin-top: -5px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .mini-panel-content .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 14px;\n height: 14px;\n user-select: none;\n -moz-user-select: none;\n }\n\n .mini-panel-content .list-children-container {\n padding-left: 0;\n }\n\n .mini-panel-content .param-control input[type=\"number\"] {\n flex-basis: 60px !important;\n }\n\n .mini-panel-content .param-control {\n align-items: center;\n }\n\n .mini-panel-content .param-control select {\n font-size: 11px;\n }\n\n .mini-panel-content .list-item-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .profiler-panel {\n position: absolute;\n z-index: 1001 !important;\n bottom: 0;\n left: 0;\n right: 0;\n height: 350px;\n background-color: var(--profiler-background);\n backdrop-filter: blur(8px);\n border-top: 2px solid var(--profiler-border);\n color: var(--text-primary);\n display: flex;\n flex-direction: column;\n z-index: 1000;\n /*box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);*/\n transform: translateY(100%);\n transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.3s ease-out, width 0.3s ease-out;\n font-family: var(--font-mono);\n }\n\n .profiler-panel.resizing,\n .profiler-panel.dragging {\n transition: none;\n }\n\n .profiler-panel.visible {\n transform: translateY(0);\n }\n\n .profiler-panel.maximized {\n height: 100%;\n z-index: 10000 !important;\n }\n\n /* Position-specific styles */\n .profiler-panel.position-top {\n bottom: auto;\n top: 0;\n border-top: none;\n border-bottom: 2px solid var(--profiler-border);\n transform: translateY(-100%);\n }\n\n .profiler-panel.position-top.visible {\n transform: translateY(0);\n }\n\n .profiler-panel.position-bottom {\n /* Default position - already defined above */\n }\n\n .profiler-panel.position-left {\n top: 0;\n bottom: 0;\n left: 0;\n right: auto;\n width: 350px;\n height: 100%;\n border-top: none;\n border-right: 2px solid var(--profiler-border);\n transform: translateX(-100%);\n }\n\n .profiler-panel.position-left.visible {\n transform: translateX(0);\n }\n\n .profiler-panel.position-right {\n top: 0;\n bottom: 0;\n left: auto;\n right: 0;\n width: 350px;\n height: 100%;\n border-top: none;\n border-left: 2px solid var(--profiler-border);\n transform: translateX(100%);\n }\n\n .profiler-panel.position-right.visible {\n transform: translateX(0);\n }\n\n .profiler-panel.position-floating {\n border: 2px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);\n transform: none !important;\n overflow: hidden;\n }\n\n .profiler-panel.position-floating.visible {\n transform: none !important;\n }\n\n .profiler-panel.position-floating .profiler-header {\n border-radius: 6px 6px 0 0;\n }\n\n .profiler-panel.position-floating .panel-resizer {\n bottom: 0;\n right: 0;\n top: auto;\n left: auto;\n width: 16px;\n height: 16px;\n cursor: nwse-resize;\n border-radius: 0 0 6px 0;\n }\n\n .profiler-panel.position-floating .panel-resizer::after {\n content: '';\n position: absolute;\n right: 2px;\n bottom: 2px;\n width: 10px;\n height: 10px;\n background: linear-gradient(135deg, transparent 0%, transparent 45%, var(--profiler-border) 45%, var(--profiler-border) 55%, transparent 55%);\n }\n\n\n .panel-resizer {\n position: absolute;\n top: -2px;\n left: 0;\n width: 100%;\n height: 5px;\n cursor: ns-resize;\n z-index: 1001;\n touch-action: none;\n }\n\n .profiler-panel.position-top .panel-resizer {\n top: auto;\n bottom: -2px;\n }\n\n .profiler-panel.position-left .panel-resizer {\n top: 0;\n left: auto;\n right: -2px;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n }\n\n .profiler-panel.position-right .panel-resizer {\n top: 0;\n left: -2px;\n right: auto;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n }\n\n .profiler-header {\n display: flex;\n background-color: var(--profiler-header-background);\n border-bottom: 1px solid var(--profiler-border);\n flex-shrink: 0;\n justify-content: space-between;\n align-items: stretch;\n\n overflow-x: auto;\n overflow-y: hidden;\n width: calc(100% - 120px);\n height: 32px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .profiler-panel.has-horizontal-scroll .profiler-header {\n height: 38px;\n }\n\n /* Adjust header width based on panel position */\n .profiler-panel.position-right .profiler-header,\n .profiler-panel.position-left .profiler-header {\n width: calc(100% - 120px);\n }\n\n .profiler-panel.position-bottom .profiler-header,\n .profiler-panel.position-top .profiler-header {\n width: calc(100% - 120px);\n }\n\n /* Adjust header width when position toggle button is hidden (mobile) */\n .profiler-panel.hide-position-toggle .profiler-header {\n width: calc(100% - 80px);\n }\n\n /* Adjust header width when maximized (floating position toggle button is hidden) */\n .profiler-panel.maximized .profiler-header {\n width: calc(100% - 80px);\n }\n\n /* ===== RULES FOR WHEN THERE ARE NO TABS ===== */\n\n /* Horizontal mode (bottom/top) without tabs */\n .profiler-panel.position-bottom.no-tabs:not(.maximized),\n .profiler-panel.position-top.no-tabs:not(.maximized) {\n height: 32px !important;\n min-height: 32px !important;\n }\n\n .profiler-panel.position-bottom.no-tabs .profiler-header,\n .profiler-panel.position-top.no-tabs .profiler-header {\n width: 100%;\n height: 32px;\n border-bottom: none;\n }\n\n .profiler-panel.position-bottom.no-tabs .profiler-content-wrapper,\n .profiler-panel.position-top.no-tabs .profiler-content-wrapper {\n display: none;\n }\n\n .profiler-panel.position-bottom.no-tabs .panel-resizer,\n .profiler-panel.position-top.no-tabs .panel-resizer {\n display: none;\n }\n\n /* Vertical mode (right/left) without tabs */\n .profiler-panel.position-right.no-tabs:not(.maximized),\n .profiler-panel.position-left.no-tabs:not(.maximized) {\n width: 40px !important;\n min-width: 40px !important;\n }\n\n /* Vertical layout for header when no tabs */\n .profiler-panel.position-right.no-tabs .profiler-header,\n .profiler-panel.position-left.no-tabs .profiler-header {\n width: 100%;\n flex-direction: column;\n height: 100%;\n border-bottom: none;\n }\n\n /* Vertical layout for controls when no tabs */\n .profiler-panel.position-right.no-tabs .profiler-controls,\n .profiler-panel.position-left.no-tabs .profiler-controls {\n position: static;\n flex-direction: column-reverse;\n justify-content: flex-end;\n width: 100%;\n height: 100%;\n border-bottom: none;\n border-left: none;\n background: transparent;\n }\n\n .profiler-panel.position-right.no-tabs .profiler-controls button,\n .profiler-panel.position-left.no-tabs .profiler-controls button {\n width: 100%;\n height: 40px;\n border-left: none;\n border-top: none;\n border-bottom: 1px solid var(--profiler-border);\n }\n\n .profiler-panel.position-right.no-tabs .profiler-content-wrapper,\n .profiler-panel.position-left.no-tabs .profiler-content-wrapper {\n display: none;\n }\n\n .profiler-panel.position-right.no-tabs .profiler-tabs,\n .profiler-panel.position-left.no-tabs .profiler-tabs {\n display: none;\n padding-left: 2px;\n }\n\n .profiler-panel.position-right.no-tabs .panel-resizer,\n .profiler-panel.position-left.no-tabs .panel-resizer {\n display: none;\n }\n\n /* Hide position toggle on mobile without tabs */\n .profiler-panel.hide-position-toggle.position-right.no-tabs:not(.maximized),\n .profiler-panel.hide-position-toggle.position-left.no-tabs:not(.maximized) {\n width: 40px !important;\n min-width: 40px !important;\n }\n\n /* Hide drag indicator on mobile devices */\n .profiler-panel.is-mobile .tab-btn.active::before {\n display: none;\n }\n\n .profiler-header::-webkit-scrollbar,\n .profiler-tabs::-webkit-scrollbar,\n .profiler-content::-webkit-scrollbar,\n .detached-tab-content::-webkit-scrollbar,\n .console-log::-webkit-scrollbar,\n .timelineTrack::-webkit-scrollbar,\n .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n }\n\n .profiler-header::-webkit-scrollbar-track,\n .profiler-tabs::-webkit-scrollbar-track,\n .profiler-content::-webkit-scrollbar-track,\n .detached-tab-content::-webkit-scrollbar-track,\n .console-log::-webkit-scrollbar-track,\n .timelineTrack::-webkit-scrollbar-track,\n .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n }\n\n .profiler-header::-webkit-scrollbar-thumb,\n .profiler-tabs::-webkit-scrollbar-thumb,\n .profiler-content::-webkit-scrollbar-thumb,\n .detached-tab-content::-webkit-scrollbar-thumb,\n .console-log::-webkit-scrollbar-thumb,\n .timelineTrack::-webkit-scrollbar-thumb,\n .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background-color: rgba(255, 255, 255, 0.15);\n border-radius: 2px;\n }\n\n .profiler-header::-webkit-scrollbar-thumb:hover,\n .profiler-tabs::-webkit-scrollbar-thumb:hover,\n .profiler-content::-webkit-scrollbar-thumb:hover,\n .detached-tab-content::-webkit-scrollbar-thumb:hover,\n .console-log::-webkit-scrollbar-thumb:hover,\n .timelineTrack::-webkit-scrollbar-thumb:hover,\n .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background-color: rgba(255, 255, 255, 0.3);\n }\n\n .profiler-header::-webkit-scrollbar-corner,\n .profiler-tabs::-webkit-scrollbar-corner,\n .profiler-content::-webkit-scrollbar-corner,\n .detached-tab-content::-webkit-scrollbar-corner,\n .console-log::-webkit-scrollbar-corner,\n .timelineTrack::-webkit-scrollbar-corner,\n .list-scroll-wrapper::-webkit-scrollbar-corner {\n background: transparent;\n }\n\n .profiler-header,\n .profiler-tabs,\n .profiler-content,\n .detached-tab-content,\n .console-log,\n .timelineTrack,\n .list-scroll-wrapper {\n scrollbar-width: thin;\n scrollbar-color: rgba(255, 255, 255, 0.15) transparent;\n }\n\n .profiler-panel.dragging .profiler-header {\n cursor: grabbing !important;\n }\n\n .profiler-panel.dragging {\n opacity: 0.8;\n }\n\n .profiler-tabs {\n display: flex;\n cursor: grab;\n position: relative;\n margin-left: 2px;\n }\n\n .profiler-tabs:active {\n cursor: grabbing;\n }\n\n\n .profiler-controls {\n display: flex;\n position: absolute;\n right: 0;\n top: 0;\n height: 32px;\n background: var(--profiler-header-background);\n border-bottom: 1px solid var(--profiler-border);\n }\n\n .profiler-panel.has-horizontal-scroll .profiler-controls {\n height: 38px;\n }\n\n .tab-btn {\n position: relative;\n background: transparent;\n border: none;\n /*border-right: 1px solid var(--profiler-border);*/\n color: var(--text-secondary);\n padding: 0 15px 2px 15px;\n height: 100%;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n align-items: center;\n font-family: var(--font-family);\n font-weight: 600;\n font-size: 13px;\n user-select: none;\n transition: opacity 0.2s, transform 0.2s;\n touch-action: pan-x;\n white-space: nowrap;\n }\n\n .tab-btn.active {\n border-bottom: 2px solid var(--color-accent);\n color: white;\n }\n\n .tab-btn.active::before {\n content: '';\n position: absolute;\n left: 2px;\n top: 50%;\n transform: translateY(-50%);\n width: 8px;\n height: 14px;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='14' viewBox='0 0 8 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='3' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='2' cy='7' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='2' cy='11' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='3' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='7' r='1' fill='%234a4a5a'/%3E%3Ccircle cx='6' cy='11' r='1' fill='%234a4a5a'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: center;\n opacity: 0.6;\n }\n\n .tab-btn.no-detach.active::before {\n display: none;\n }\n\n .floating-btn,\n .maximize-btn,\n .hide-panel-btn {\n background: transparent;\n border: none;\n border-left: 1px solid var(--profiler-border);\n color: var(--text-secondary);\n width: 40px;\n height: 100%;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n }\n\n /* Disable transitions in vertical mode to avoid broken animations */\n .profiler-panel.position-right .floating-btn,\n .profiler-panel.position-right .maximize-btn,\n .profiler-panel.position-right .hide-panel-btn,\n .profiler-panel.position-left .floating-btn,\n .profiler-panel.position-left .maximize-btn,\n .profiler-panel.position-left .hide-panel-btn {\n transition: background-color 0.2s, color 0.2s;\n }\n\n .floating-btn:hover,\n .maximize-btn:hover,\n .hide-panel-btn:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-primary);\n }\n\n /* Hide maximize button when there are no tabs */\n .profiler-panel.position-right.no-tabs .maximize-btn,\n .profiler-panel.position-left.no-tabs .maximize-btn,\n .profiler-panel.position-bottom.no-tabs .maximize-btn,\n .profiler-panel.position-top.no-tabs .maximize-btn {\n display: none !important;\n }\n\n /* Hide floating button when maximized */\n .profiler-panel.maximized .floating-btn {\n display: none !important;\n }\n\n .profiler-content-wrapper {\n flex-grow: 1;\n overflow: hidden;\n position: relative;\n }\n\n .profiler-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n font-size: 13px;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s, visibility 0.2s;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .profiler-content.active {\n visibility: visible;\n opacity: 1;\n }\n\n .profiler-content {\n overflow: auto; /* make sure scrollbars can appear */\n }\n\n\n .list-item-row {\n display: grid;\n grid-template-columns: var(--list-grid-template, none);\n align-items: center;\n padding: 4px 8px;\n border-radius: 3px;\n transition: background-color 0.2s;\n gap: 10px;\n border-bottom: none;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .parameters .list-item-row {\n min-height: 23px;\n }\n\n .mini-panel-content .parameters .list-item-row {\n min-height: 21px;\n }\n\n .list-item-wrapper {\n margin-top: 2px;\n margin-bottom: 2px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-wrapper:has(> .list-item-row .graph-container) {\n margin-left: -1.5em;\n }\n\n .list-item-wrapper:first-child {\n /*margin-top: 0;*/\n }\n\n .list-item-wrapper:not(.header-wrapper):nth-child(odd) > .list-item-row {\n background-color: rgba(0,0,0,0.1);\n }\n\n .list-item-wrapper.header-wrapper>.list-item-row {\n color: var(--color-accent);\n background-color: rgba(0, 170, 255, 0.1);\n }\n\n .list-item-wrapper.header-wrapper>.list-item-row>.list-item-cell:first-child {\n font-weight: 600;\n }\n\n .list-item-row.collapsible,\n .list-item-row.actionable {\n cursor: pointer;\n }\n\n .list-item-row.collapsible {\n background-color: rgba(0, 170, 255, 0.15) !important;\n min-height: 23px;\n }\n\n .list-item-row.collapsible.alert,\n .list-item-row.alert {\n background-color: rgba(244, 67, 54, 0.1) !important;\n }\n\n @media (hover: hover) {\n\n .list-item-row:hover:not(.collapsible):not(.no-hover),\n .list-item-row:hover:not(.no-hover),\n .list-item-row.actionable:hover,\n .list-item-row.collapsible.actionable:hover {\n background-color: rgba(255, 255, 255, 0.05) !important;\n }\n\n .list-item-row.collapsible:hover {\n background-color: rgba(0, 170, 255, 0.25) !important;\n }\n\n }\n\n .list-item-cell {\n white-space: pre;\n display: flex;\n align-items: center;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-cell:not(:first-child) {\n justify-content: flex-end;\n font-weight: 600;\n }\n\n .list-header {\n display: grid;\n grid-template-columns: var(--list-grid-template, none);\n align-items: center;\n padding: 4px 8px;\n font-weight: 600;\n color: var(--text-secondary);\n padding-bottom: 6px;\n border-bottom: 1px solid var(--profiler-border);\n margin-bottom: 5px;\n gap: 10px;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .list-item-wrapper.section-start {\n margin-top: 5px;\n margin-bottom: 5px;\n }\n\n .list-header .list-header-cell:not(:first-child) {\n text-align: right;\n }\n\n .list-children-container {\n padding-left: 1.5em;\n overflow: hidden;\n transition: max-height 0.1s ease-out;\n margin-top: 2px;\n }\n\n .list-children-container.closed {\n max-height: 0;\n display: none !important;\n }\n\n .item-toggler {\n display: inline-block;\n margin-right: 0.8em;\n text-align: left;\n }\n\n .list-item-row.open .item-toggler::before {\n content: '-';\n }\n\n .list-item-row:not(.open) .item-toggler::before {\n content: '+';\n }\n\n .list-item-cell .value.good {\n color: var(--color-green);\n }\n\n .list-item-cell .value.warn {\n color: var(--color-yellow);\n }\n\n .list-item-cell .value.bad {\n color: var(--color-red);\n }\n\n .list-scroll-wrapper {\n width: max-content;\n min-width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 100%;\n }\n\n .list-container.parameters .list-item-row:not(.collapsible) {\n }\n\n .graph-container {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 0;\n position: relative;\n }\n\n .graph-svg, .graph-canvas {\n width: 0;\n min-width: 100%;\n height: 80px;\n background-color: var(--profiler-header);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n display: block;\n }\n\n .graph-path {\n stroke-width: 2;\n fill-opacity: 0.4;\n }\n\n .console-buttons-group {\n display: flex;\n gap: 20px;\n }\n\n .console-filter-input {\n background-color: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 10px 2px 10px;\n font-family: var(--font-mono);\n flex-grow: 1;\n max-width: 300px;\n border-radius: 15px;\n }\n\n .console-filter-input:focus {\n outline: none;\n border-color: var(--text-secondary);\n }\n\n .console-copy-button {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: color 0.2s, background-color 0.2s;\n }\n\n .console-copy-button:hover {\n color: var(--text-primary);\n background-color: var(--profiler-hover);\n }\n\n .console-copy-button.copied {\n color: var(--color-green);\n }\n\n .console-log {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px;\n overflow-y: auto;\n flex-grow: 1;\n user-select: text;\n -webkit-user-select: text;\n }\n\n .log-message {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n padding: 3px 5px;\n border-radius: 3px;\n line-height: 1.5 !important;\n }\n\n .log-count-badge {\n display: inline-block;\n text-align: center;\n min-width: 14px;\n height: 14px;\n border-radius: 7px;\n padding: 0 3px;\n font-size: 9px;\n font-weight: bold;\n line-height: 14px;\n box-sizing: border-box;\n margin-top: 0;\n flex-shrink: 0;\n }\n\n .log-icon {\n display: inline-block;\n text-align: center;\n width: 14px;\n height: 14px;\n font-size: 11px;\n line-height: 14px;\n margin-top: 0;\n flex-shrink: 0;\n }\n\n .log-body {\n flex-grow: 1;\n white-space: pre-wrap;\n word-break: break-all;\n }\n\n .log-message.info .log-count-badge {\n background-color: rgba(255, 255, 255, 0.12);\n border: 1px solid rgba(255, 255, 255, 0.2);\n color: var(--text-secondary);\n }\n\n .log-message.warn .log-count-badge {\n background-color: rgba(255, 193, 7, 0.18);\n border: 1px solid rgba(255, 193, 7, 0.35);\n color: var(--color-yellow);\n }\n\n .log-message.error .log-count-badge {\n background-color: rgba(244, 67, 54, 0.18);\n border: 1px solid rgba(244, 67, 54, 0.35);\n color: #ff8a80;\n }\n\n .log-message.hidden {\n display: none;\n }\n\n .log-message.info {\n color: var(--text-primary);\n }\n\n .log-message.warn {\n color: var(--color-yellow);\n }\n\n .log-message.error {\n color: #f9dedc;\n background-color: rgba(244, 67, 54, 0.1);\n }\n\n .log-prefix {\n color: var(--text-secondary);\n margin-right: 8px;\n }\n\n .log-code {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 3px;\n padding: 1px 4px;\n }\n\n .thumbnail-container {\n display: flex;\n align-items: center;\n }\n\n .thumbnail-svg {\n width: 40px;\n height: 22.5px;\n flex-shrink: 0;\n margin-right: 8px;\n }\n\n .param-control {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n width: 100%;\n }\n\n .param-control input,\n .param-control select,\n .param-control button {\n background-color: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 6px;\n padding-bottom: 2px;\n font-family: var(--font-mono);\n width: 100%;\n box-sizing: border-box;\n color-scheme: dark;\n }\n\n .param-control input:focus {\n outline: none;\n border-color: var(--color-accent);\n }\n\n .param-control select {\n padding-top: 3px;\n padding-bottom: 1px;\n }\n\n .param-control input[type=\"number\"] {\n cursor: ns-resize;\n }\n\n .param-control input[type=\"color\"] {\n padding: 2px;\n }\n\n .param-control button {\n cursor: pointer;\n transition: background-color 0.2s;\n }\n\n .param-control button:hover {\n background-color: var(--profiler-header);\n }\n\n .param-control-vector {\n display: flex;\n gap: 5px;\n }\n\n .custom-checkbox {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n gap: 8px;\n will-change: transform;\n font-size: 12px;\n }\n\n .custom-checkbox input {\n display: none;\n }\n\n .custom-checkbox .checkmark {\n width: 14px;\n height: 14px;\n border: 1px solid var(--color-accent);\n border-radius: 3px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n transition: background-color 0.2s, border-color 0.2s;\n }\n\n .custom-checkbox .checkbox-text {\n font-size: 12px;\n margin-top: 1px;\n color: inherit;\n }\n\n .custom-checkbox .checkmark::after {\n content: '';\n width: 6px;\n height: 6px;\n background-color: var(--color-accent);\n border-radius: 1px;\n display: block;\n transform: scale(0);\n transition: transform 0.2s;\n }\n\n .list-container .custom-checkbox .checkmark {\n width: 13px;\n height: 13px;\n }\n\n .list-container .custom-checkbox .checkmark::after {\n width: 7px;\n height: 7px;\n }\n\n .custom-checkbox input:checked+.checkmark {\n border-color: var(--color-accent);\n }\n\n .custom-checkbox input:checked+.checkmark::after {\n transform: scale(1);\n }\n\n .param-control input[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n outline: none;\n padding: 0px;\n padding-top: 8px;\n }\n\n .param-control input[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n background: var(--profiler-background);\n border: 1px solid var(--color-accent);\n border-radius: 3px;\n cursor: pointer;\n margin-top: -8px;\n }\n\n .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 18px;\n height: 18px;\n background: var(--profiler-background);\n border: 2px solid var(--color-accent);\n border-radius: 3px;\n cursor: pointer;\n }\n\n .param-control input[type=\"range\"]::-moz-range-track {\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n }\n\n /* Override .param-control styles for mini-panel-content */\n .mini-panel-content input,\n .mini-panel-content select,\n .mini-panel-content button {\n padding: 2px 4px;\n height: 21px;\n line-height: 1.4;\n padding-top: 4px;\n }\n\n .mini-panel-content .param-control input,\n .mini-panel-content .param-control select,\n .mini-panel-content .param-control button {\n background-color: #1e1e24c2;\n line-height: 1.0;\n }\n\n .mini-panel-content .param-control select {\n padding: 2px 2px;\n padding-top: 3px;\n }\n\n .mini-panel-content .param-control input[type=\"number\"]::-webkit-outer-spin-button,\n .mini-panel-content .param-control input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .mini-panel-content .param-control input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n .mini-panel-content .list-item-cell span {\n position: relative;\n top: 1px;\n margin-left: 2px;\n }\n\n @media screen and (max-width: 340px) {\n\n .mini-panel-content .list-item-cell:first-child {\n display: flex;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n width: 100%;\n }\n\n .mini-panel-content .list-item-cell:first-child .value {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1 1 0%;\n min-width: 0;\n }\n\n .mini-panel-content .list-item-cell:first-child .info-icon {\n flex-shrink: 0;\n }\n\n }\n\n .mini-panel-content .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n margin-bottom: 2px;\n will-change: transform;\n }\n\n .mini-panel-content .list-container.parameters .list-item-row:not(.collapsible) {\n margin-bottom: 2px;\n }\n\n .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:first-child:has(> .list-item-row:not(.collapsible)) {\n margin-top: 2px;\n }\n\n .mini-panel-content .list-container.parameters .list-children-container > .list-item-wrapper:last-child:has(> .list-item-row:not(.collapsible)) {\n margin-bottom: 4px;\n }\n\n @media screen and (max-width: 450px) and (orientation: portrait) {\n\n .console-filter-input {\n max-width: 100px;\n }\n\n }\n\n /* Touch device optimizations */\n @media (hover: none) and (pointer: coarse) {\n\n .panel-resizer {\n top: -10px !important;\n height: 20px !important;\n }\n\n .profiler-panel.position-top .panel-resizer {\n top: auto !important;\n bottom: -10px !important;\n height: 20px !important;\n }\n\n .profiler-panel.position-left .panel-resizer {\n right: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .profiler-panel.position-right .panel-resizer {\n left: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .detached-tab-resizer-top,\n .detached-tab-resizer-bottom {\n height: 10px !important;\n }\n\n .detached-tab-resizer-left,\n .detached-tab-resizer-right {\n width: 10px !important;\n }\n\n }\n\n .drag-preview-indicator {\n position: absolute;\n background-color: rgba(0, 170, 255, 0.2);\n border: 2px dashed var(--color-accent);\n z-index: 999;\n pointer-events: none;\n transition: all 0.2s ease-out;\n }\n\n /* Detached Tab Windows */\n .detached-tab-panel {\n position: absolute;\n width: 500px;\n height: 400px;\n background: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);\n z-index: 1002;\n display: flex;\n flex-direction: column;\n backdrop-filter: blur(10px);\n overflow: hidden;\n opacity: 1;\n visibility: visible;\n transition: opacity 0.2s, visibility 0.2s;\n font-family: var(--font-mono);\n font-size: 13px;\n }\n\n\n .detached-tab-header {\n background: var(--profiler-header-background);\n padding: 0 3px 0 10px;\n font-family: var(--font-family);\n font-size: 13px;\n color: var(--text-primary);\n font-weight: 600;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--profiler-border);\n cursor: grab;\n user-select: none;\n height: 32px;\n flex-shrink: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n touch-action: none;\n }\n\n .detached-tab-header:active {\n cursor: grabbing;\n }\n\n .detached-header-controls {\n display: flex;\n gap: 5px;\n }\n\n .detached-reattach-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n font-family: var(--font-family);\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n .detached-reattach-btn:hover {\n background: rgba(0, 170, 255, 0.2);\n color: var(--color-accent);\n }\n\n .detached-tab-content {\n flex: 1;\n overflow: hidden;\n position: relative;\n background: var(--profiler-background);\n }\n\n\n .detached-tab-content .profiler-content {\n display: flex !important;\n flex-direction: column !important;\n height: 100%;\n visibility: visible !important;\n opacity: 1 !important;\n position: relative !important;\n }\n\n .detached-tab-content .profiler-content > * {\n font-family: var(--font-mono);\n color: var(--text-primary);\n }\n\n .detached-tab-resizer {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 20px;\n height: 20px;\n cursor: nwse-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer::after {\n content: '';\n position: absolute;\n bottom: 2px;\n right: 2px;\n width: 12px;\n height: 12px;\n border-right: 2px solid var(--profiler-border);\n border-bottom: 2px solid var(--profiler-border);\n border-bottom-right-radius: 6px;\n opacity: 0.5;\n }\n\n .detached-tab-resizer:hover::after {\n opacity: 1;\n border-color: var(--color-accent);\n }\n\n /* Edge resizers */\n .detached-tab-resizer-top {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-right {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-bottom {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n }\n\n .detached-tab-resizer-left {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n }\n\n /* Input number spin buttons - hide arrows */\n /* Chrome, Safari, Edge, Opera */\n .profiler-panel input[type=\"number\"]::-webkit-outer-spin-button,\n .profiler-panel input[type=\"number\"]::-webkit-inner-spin-button,\n .detached-tab-content input[type=\"number\"]::-webkit-outer-spin-button,\n .detached-tab-content input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n .profiler-panel input[type=\"number\"],\n .detached-tab-content input[type=\"number\"] {\n -moz-appearance: textfield;\n }\n\n .panel-action-btn {\n background: transparent;\n color: var(--text-primary);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: 12px;\n transition: background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .panel-action-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n .node-canvas-wrapper {\n touch-action: none;\n }\n\n .node-canvas-wrapper .node-canvas-detach-btn {\n position: absolute;\n top: 5px;\n right: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-detach-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .node-canvas-wrapper .node-canvas-fullscreen-btn {\n position: absolute;\n bottom: 5px;\n right: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-fullscreen-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .profiler-panel.maximized .node-canvas-fullscreen-btn {\n display: none;\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 32px;\n padding: 4px 6px;\n border-bottom: 1px solid var(--profiler-border);\n background: var(--profiler-header-background);\n flex-shrink: 0;\n box-sizing: border-box;\n gap: 16px;\n }\n\n .toolbar span {\n color: var(--text-secondary);\n font-size: 12px;\n font-weight: 600;\n }\n\n .toolbar .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n border-radius: 4px;\n }\n\n .viewer-content .toolbar {\n justify-content: flex-end;\n }\n\n .viewer-back-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n padding: 4px 8px;\n border-radius: 4px;\n margin-right: auto;\n transition: color 0.2s, background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .viewer-back-btn:hover {\n color: var(--text-primary);\n background-color: rgba(255, 255, 255, 0.05);\n }\n\n select {\n color-scheme: dark;\n }\n\n select option,\n option {\n background-color: #1e1e24;\n color: var(--text-primary);\n }\n\n .select {\n background: var(--profiler-background);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 16px 2px 6px;\n font-family: var(--font-mono);\n font-size: 12px;\n outline: none;\n cursor: pointer;\n color-scheme: dark;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0e0e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right 5px center;\n background-size: 10px;\n }\n\n .select:focus {\n border-color: var(--color-accent);\n }\n\n .full-viewer-container {\n display: none;\n flex-grow: 1;\n width: 100%;\n height: 100%;\n overflow: hidden;\n position: relative;\n touch-action: none;\n }\n\n .node-canvas-wrapper .node-canvas-split-btn {\n position: absolute;\n top: 5px;\n left: 5px;\n background: rgba(30, 30, 36, 0.85);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px;\n cursor: pointer;\n opacity: 1;\n transition: background-color 0.2s, border-color 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 10;\n }\n\n .node-canvas-wrapper .node-canvas-split-btn:hover {\n background-color: var(--color-accent);\n border-color: var(--color-accent);\n color: white;\n }\n\n .node-canvas-wrapper .node-canvas-split-btn.active,\n .node-canvas-wrapper .node-canvas-fullscreen-btn.active {\n background-color: var(--color-accent) !important;\n border-color: var(--color-accent) !important;\n color: white !important;\n }\n\n .split-screen-overlay {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none !important;\n z-index: 999;\n touch-action: none;\n overflow: hidden;\n }\n\n .split-screen-line {\n position: absolute;\n top: 0;\n bottom: 0;\n width: 1px;\n left: 50%;\n background-color: transparent;\n cursor: ew-resize;\n pointer-events: auto !important;\n z-index: 10;\n touch-action: none;\n transition: background-color 0.15s ease-out;\n }\n\n .split-screen-line:hover,\n .split-screen-line:active,\n .split-screen-line.active {\n background-color: var(--color-accent);\n }\n\n .split-screen-line::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -12px;\n width: 25px;\n background: transparent;\n cursor: ew-resize;\n }\n\n .split-screen-line::after {\n content: '';\n position: absolute;\n top: -1px;\n bottom: -1px;\n left: -5px;\n width: 11px;\n pointer-events: none;\n background-image:\n url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 -1 L5.5 7 L11.5 -1 Z' fill='rgba(30,30,36,0.85)' stroke='%234a4a5a' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E\"),\n url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 8 L5.5 0 L11.5 8 Z' fill='rgba(30,30,36,0.85)' stroke='%234a4a5a' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E\");\n background-position: top center, bottom center;\n background-repeat: no-repeat;\n opacity: 1;\n transition: opacity 0.15s ease-out;\n }\n\n .split-screen-line:hover::after,\n .split-screen-line:active::after,\n .split-screen-line.active::after {\n opacity: 1;\n background-image:\n url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 -1 L5.5 7 L11.5 -1 Z' fill='%2300aaff' stroke='%2300aaff' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E\"),\n url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M-0.5 8 L5.5 0 L11.5 8 Z' fill='%2300aaff' stroke='%2300aaff' stroke-width='1' stroke-linejoin='round'/%3E%3C/svg%3E\");\n }\n\n /* Grid Mode styles for List component */\n .list-scroll-wrapper:has(> .list-container.grid-mode) {\n width: 100% !important;\n }\n\n .list-container.grid-mode {\n min-width: 0 !important;\n width: 100% !important;\n box-sizing: border-box;\n }\n\n .list-container.grid-mode .list-header {\n display: none !important;\n }\n\n .list-container.grid-mode .list-children-container {\n display: flex;\n flex-wrap: wrap;\n gap: 15px;\n padding-left: 0 !important;\n margin-top: 10px;\n margin-bottom: 15px;\n width: 100%;\n box-sizing: border-box;\n }\n\n .list-container.grid-mode .list-children-container > .list-item-wrapper {\n display: inline-block;\n width: 160px;\n margin: 0;\n }\n\n .list-container.grid-mode .list-children-container > .list-item-wrapper > .list-item-row {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n /*background-color: var(--profiler-header);\n border: 1px solid var(--profiler-border);*/\n border-radius: 6px;\n padding: 8px;\n gap: 8px;\n width: 100%;\n box-sizing: border-box;\n grid-template-columns: none !important;\n }\n\n .list-container.grid-mode .list-children-container > .list-item-wrapper > .list-item-row > .list-item-cell:first-child {\n width: 140px;\n height: 140px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n }\n\n .list-container.grid-mode .list-children-container > .list-item-wrapper > .list-item-row > .list-item-cell:not(:first-child) {\n width: 100%;\n text-align: center !important;\n font-size: 11px;\n font-weight: 500;\n color: var(--text-primary);\n white-space: normal;\n word-break: break-all;\n justify-content: center !important;\n }\n\n /* Timeline Info & Details */\n .timeline-detail-block {\n font-size: 11px;\n margin-left: 8px;\n color: var(--text-secondary);\n opacity: 1;\n }\n\n .timeline-detail-key,\n .timeline-detail-sep,\n .timeline-call-count {\n opacity: 0.5;\n }\n\n .timeline-detail-value {\n color: var(--text-secondary);\n opacity: 1;\n }\n\n .timeline-info-group {\n display: inline-flex;\n align-items: center;\n margin-left: 12px;\n flex-shrink: 0;\n }\n\n .timeline-info-dot {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-right: 6px;\n flex-shrink: 0;\n }\n\n .timeline-info-dot.fps {\n background-color: var(--color-fps);\n }\n\n .timeline-info-dot.call {\n background-color: var(--color-call);\n }\n\n .timeline-info-dot.red {\n background-color: var(--color-red);\n }\n\n}\n", e.appendChild(n);
|
|
292
292
|
}
|
|
293
|
-
},
|
|
293
|
+
}, ln = class {
|
|
294
294
|
constructor(e = 512) {
|
|
295
295
|
this.maxPoints = e, this.lines = {}, this.limit = 0, this.limitIndex = 0, this.domElement = document.createElement("canvas"), this.domElement.setAttribute("class", "graph-canvas"), this.ctx = this.domElement.getContext("2d"), this.width = 0, this.height = 0, this.devicePixelRatio = window.devicePixelRatio || 1;
|
|
296
296
|
}
|
|
@@ -361,9 +361,9 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
dispose() {}
|
|
364
|
-
},
|
|
364
|
+
}, un = class extends oe {
|
|
365
365
|
constructor(e, t = {}) {
|
|
366
|
-
super(), this.inspector = e, this.nonce = t.nonce ?? e?.nonce ?? null, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, this.horizontalAlign = "right", this.verticalAlign = "top", this.setupShell(), this.setupResizing(),
|
|
366
|
+
super(), this.inspector = e, this.nonce = t.nonce ?? e?.nonce ?? null, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, this.horizontalAlign = "right", this.verticalAlign = "top", this.setupShell(), this.setupResizing(), cn.init(this.domElement, this.nonce), this.updateWidgetPosition(), this.setupWindowResizeListener(), this.setupOrientationListener(), this.checkHeaderScroll(), this.panel.addEventListener("transitionend", (e) => {
|
|
367
367
|
e.target === this.panel && (e.propertyName === "width" || e.propertyName === "height" || e.propertyName === "transform") && this.checkHeaderScroll();
|
|
368
368
|
});
|
|
369
369
|
}
|
|
@@ -436,7 +436,7 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
436
436
|
let i = document.createElement("button");
|
|
437
437
|
i.classList.add("hide-panel-btn"), i.textContent = "-", i.onclick = () => this.togglePanel(), r.append(this.floatingBtn, this.maximizeBtn, i), n.append(this.tabsContainer, r), this.contentWrapper = document.createElement("div"), this.contentWrapper.className = "profiler-content-wrapper";
|
|
438
438
|
let a = document.createElement("div");
|
|
439
|
-
a.className = "panel-resizer", this.panel.append(a, n, this.contentWrapper), this.domElement.append(this.toggleButton, this.miniPanel, this.panel), this.panel.classList.add(`position-${this.position}`), this.position === "right" && (this.toggleButton.classList.add("position-right"), this.miniPanel.classList.add("position-right")), this.toggleGraph = new
|
|
439
|
+
a.className = "panel-resizer", this.panel.append(a, n, this.contentWrapper), this.domElement.append(this.toggleButton, this.miniPanel, this.panel), this.panel.classList.add(`position-${this.position}`), this.position === "right" && (this.toggleButton.classList.add("position-right"), this.miniPanel.classList.add("position-right")), this.toggleGraph = new ln(80), this.toggleGraph.addLine("fps", "#4c4c6bff"), this.toggleGraph.domElement.className = "profiler-toggle-graph", this.toggleButton.appendChild(this.toggleGraph.domElement);
|
|
440
440
|
}
|
|
441
441
|
setupResizing() {
|
|
442
442
|
let e = this.panel.querySelector(".panel-resizer");
|
|
@@ -736,7 +736,7 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
736
736
|
});
|
|
737
737
|
});
|
|
738
738
|
try {
|
|
739
|
-
|
|
739
|
+
Gn("layout", e);
|
|
740
740
|
} catch (e) {
|
|
741
741
|
console.warn("Failed to save profiler layout:", e);
|
|
742
742
|
}
|
|
@@ -744,7 +744,7 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
744
744
|
loadLayout() {
|
|
745
745
|
this.isLoadingLayout = !0;
|
|
746
746
|
try {
|
|
747
|
-
let e =
|
|
747
|
+
let e = Wn("layout");
|
|
748
748
|
if (Object.keys(e).length === 0) return;
|
|
749
749
|
if (e.detachedTabs && e.detachedTabs.length > 0) {
|
|
750
750
|
let t = window.innerWidth, n = window.innerHeight;
|
|
@@ -822,7 +822,7 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
822
822
|
for (let e of this.detachedWindows) e.panel.remove();
|
|
823
823
|
this.toggleGraph.dispose();
|
|
824
824
|
}
|
|
825
|
-
},
|
|
825
|
+
}, dn = class extends oe {
|
|
826
826
|
constructor(e, t = {}) {
|
|
827
827
|
super(), this.id = e.toLowerCase().replace(/\s+/g, "-"), this.button = document.createElement("button"), this.button.className = "tab-btn", this.button.textContent = e, this.content = document.createElement("div"), this.content.className = "profiler-content", this.content.classList.add(`${this.id}-content`), this._isActive = !1, this.isVisible = !0, this.isDetached = !1, this.detachedWindow = null, this.allowDetach = t.allowDetach === void 0 ? !0 : t.allowDetach, this.builtin = t.builtin === void 0 ? !1 : t.builtin, this.icon = t.icon || null, this.builtinButton = null, this.miniContent = null, this.profiler = null, this.onVisibilityChange = null;
|
|
828
828
|
}
|
|
@@ -863,7 +863,7 @@ var W = /* @__PURE__ */ new ke(), Yt = /* @__PURE__ */ new d(), Xt = /* @__PURE_
|
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
865
|
dispose() {}
|
|
866
|
-
},
|
|
866
|
+
}, fn = class {
|
|
867
867
|
constructor(...e) {
|
|
868
868
|
this.headers = e, this.children = [], this.domElement = document.createElement("div"), this.domElement.className = "list-container", this.domElement.style.padding = "5px 10px 10px 10px", this.id = `list-${Math.random().toString(36).slice(2, 11)}`, this.domElement.dataset.listId = this.id;
|
|
869
869
|
let t = document.createElement("div");
|
|
@@ -943,7 +943,7 @@ function q() {
|
|
|
943
943
|
function J(e, t) {
|
|
944
944
|
e && e.textContent !== t && (e.textContent = t);
|
|
945
945
|
}
|
|
946
|
-
function
|
|
946
|
+
function pn(e) {
|
|
947
947
|
let t = e.lastIndexOf("/");
|
|
948
948
|
return t === -1 ? {
|
|
949
949
|
path: "",
|
|
@@ -953,7 +953,7 @@ function fn(e) {
|
|
|
953
953
|
name: e.substring(t + 1).trim()
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function mn(e) {
|
|
957
957
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
|
|
958
958
|
}
|
|
959
959
|
function Y(e, t = 2) {
|
|
@@ -971,7 +971,7 @@ function Y(e, t = 2) {
|
|
|
971
971
|
], a = Math.floor(Math.log(e) / Math.log(n));
|
|
972
972
|
return parseFloat((e / n ** +a).toFixed(r)) + " " + i[a];
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function hn(e, t) {
|
|
975
975
|
let n = e.querySelector(".info-icon");
|
|
976
976
|
if (!n) n = document.createElement("span"), n.className = "info-icon", n.textContent = "i", e.appendChild(n);
|
|
977
977
|
else {
|
|
@@ -1001,16 +1001,16 @@ function mn(e, t) {
|
|
|
1001
1001
|
}
|
|
1002
1002
|
//#endregion
|
|
1003
1003
|
//#region ../../node_modules/three/examples/jsm/inspector/tabs/Performance.js
|
|
1004
|
-
var
|
|
1004
|
+
var gn = class extends dn {
|
|
1005
1005
|
constructor(e = {}) {
|
|
1006
1006
|
super("Performance", e);
|
|
1007
|
-
let t = new
|
|
1007
|
+
let t = new fn("Name", "CPU", "GPU", "Total");
|
|
1008
1008
|
t.setGridStyle("minmax(200px, 2fr) 80px 80px 80px"), t.domElement.style.minWidth = "600px";
|
|
1009
1009
|
let n = document.createElement("div");
|
|
1010
1010
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
|
|
1011
1011
|
let r = document.createElement("div");
|
|
1012
1012
|
r.className = "graph-container";
|
|
1013
|
-
let i = new
|
|
1013
|
+
let i = new ln();
|
|
1014
1014
|
i.addLine("fps", "var( --color-fps )"), i.addLine("cpu", "var( --color-yellow )"), i.addLine("gpu", "var( --color-green )"), r.append(i.domElement), this.graphFpsCounter = q();
|
|
1015
1015
|
let a = new K("Graph Stats", q(), q(), this.graphFpsCounter);
|
|
1016
1016
|
t.add(a);
|
|
@@ -1065,16 +1065,16 @@ var hn = class extends un {
|
|
|
1065
1065
|
for (let e of this.notInUse.keys()) this.updateNotInUse(e);
|
|
1066
1066
|
J(this.graphFpsCounter, e.fps.toFixed() + " FPS"), J(this.frameStats.data[1], t.cpu.toFixed(2)), J(this.frameStats.data[2], e.getRenderer().backend.hasTimestamp ? t.gpu.toFixed(2) : "-"), J(this.frameStats.data[3], t.total.toFixed(2)), J(this.miscellaneous.data[1], t.miscellaneous.toFixed(2)), J(this.miscellaneous.data[2], "-"), J(this.miscellaneous.data[3], t.miscellaneous.toFixed(2)), this.currentItem = null;
|
|
1067
1067
|
}
|
|
1068
|
-
},
|
|
1068
|
+
}, _n = class extends dn {
|
|
1069
1069
|
constructor(e = {}) {
|
|
1070
1070
|
super("Memory", e);
|
|
1071
|
-
let t = new
|
|
1071
|
+
let t = new fn("Name", "Count", "Size");
|
|
1072
1072
|
t.setGridStyle("minmax(200px, 2fr) 60px 100px"), t.domElement.style.minWidth = "300px";
|
|
1073
1073
|
let n = document.createElement("div");
|
|
1074
1074
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
|
|
1075
1075
|
let r = document.createElement("div");
|
|
1076
1076
|
r.className = "graph-container";
|
|
1077
|
-
let i = new
|
|
1077
|
+
let i = new ln();
|
|
1078
1078
|
i.addLine("total", "var( --color-yellow )"), r.append(i.domElement);
|
|
1079
1079
|
let a = new K("Graph Stats", "", "");
|
|
1080
1080
|
t.add(a);
|
|
@@ -1089,7 +1089,7 @@ var hn = class extends un {
|
|
|
1089
1089
|
let t = e.getRenderer().info.memory;
|
|
1090
1090
|
J(this.memoryStats.data[2], Y(t.total)), J(this.attributes.data[1], t.attributes.toString()), J(this.attributes.data[2], Y(t.attributesSize)), J(this.geometries.data[1], t.geometries.toString()), J(this.indexAttributes.data[1], t.indexAttributes.toString()), J(this.indexAttributes.data[2], Y(t.indexAttributesSize)), J(this.indirectStorageAttributes.data[1], t.indirectStorageAttributes.toString()), J(this.indirectStorageAttributes.data[2], Y(t.indirectStorageAttributesSize)), J(this.programs.data[1], t.programs.toString()), J(this.programs.data[2], Y(t.programsSize)), J(this.readbackBuffers.data[1], t.readbackBuffers.toString()), J(this.readbackBuffers.data[2], Y(t.readbackBuffersSize)), J(this.renderTargets.data[1], t.renderTargets.toString()), J(this.storageAttributes.data[1], t.storageAttributes.toString()), J(this.storageAttributes.data[2], Y(t.storageAttributesSize)), J(this.textures.data[1], t.textures.toString()), J(this.textures.data[2], Y(t.texturesSize)), J(this.uniformBuffers.data[1], t.uniformBuffers.toString()), J(this.uniformBuffers.data[2], Y(t.uniformBuffersSize));
|
|
1091
1091
|
}
|
|
1092
|
-
},
|
|
1092
|
+
}, vn = class extends dn {
|
|
1093
1093
|
constructor(e = {}) {
|
|
1094
1094
|
super("Console", e), this.filters = {
|
|
1095
1095
|
info: !0,
|
|
@@ -1198,7 +1198,7 @@ var hn = class extends un {
|
|
|
1198
1198
|
}
|
|
1199
1199
|
this.logContainer.scrollTop = this.logContainer.scrollHeight, this.isActive || (e === "error" ? (this.unreadErrors++, this.updateBadges()) : e === "warn" && (this.unreadWarns++, this.updateBadges()));
|
|
1200
1200
|
}
|
|
1201
|
-
}, X = class extends
|
|
1201
|
+
}, X = class extends oe {
|
|
1202
1202
|
constructor() {
|
|
1203
1203
|
super(), this.domElement = document.createElement("div"), this.domElement.className = "param-control", this._onChangeFunction = null, this._changeTimeout = null, this._debounceTime = 0, this.addEventListener("change", (e) => {
|
|
1204
1204
|
clearTimeout(this._changeTimeout), this._changeTimeout = setTimeout(() => {
|
|
@@ -1230,7 +1230,7 @@ var hn = class extends un {
|
|
|
1230
1230
|
hide() {
|
|
1231
1231
|
return this.dispatchEvent({ type: "hide" }), this;
|
|
1232
1232
|
}
|
|
1233
|
-
},
|
|
1233
|
+
}, yn = class extends X {
|
|
1234
1234
|
constructor({ value: e = 0, step: t = .1, min: n = -Infinity, max: r = Infinity }) {
|
|
1235
1235
|
super(), this.input = document.createElement("input"), this.input.type = "number", this.input.value = e, this.input.step = t, this.input.min = n, this.input.max = r, this.input.addEventListener("change", this._onChangeValue.bind(this)), this.domElement.appendChild(this.input), this.addDragHandler();
|
|
1236
1236
|
}
|
|
@@ -1261,7 +1261,7 @@ var hn = class extends un {
|
|
|
1261
1261
|
getValue() {
|
|
1262
1262
|
return parseFloat(this.input.value);
|
|
1263
1263
|
}
|
|
1264
|
-
},
|
|
1264
|
+
}, bn = class extends X {
|
|
1265
1265
|
constructor({ value: e = !1 }) {
|
|
1266
1266
|
super();
|
|
1267
1267
|
let t = document.createElement("label");
|
|
@@ -1279,10 +1279,10 @@ var hn = class extends un {
|
|
|
1279
1279
|
getValue() {
|
|
1280
1280
|
return this.checkbox.checked;
|
|
1281
1281
|
}
|
|
1282
|
-
},
|
|
1282
|
+
}, xn = class extends X {
|
|
1283
1283
|
constructor({ value: e = 0, min: t = 0, max: n = 1, step: r = .01 }) {
|
|
1284
1284
|
super(), this.slider = document.createElement("input"), this.slider.type = "range", this.slider.min = t, this.slider.max = n, this.slider.step = r;
|
|
1285
|
-
let i = new
|
|
1285
|
+
let i = new yn({
|
|
1286
1286
|
value: e,
|
|
1287
1287
|
min: t,
|
|
1288
1288
|
max: n,
|
|
@@ -1303,7 +1303,7 @@ var hn = class extends un {
|
|
|
1303
1303
|
step(e) {
|
|
1304
1304
|
return this.slider.step = e, this.numberInput.step = e, this.slider.value = parseFloat(this.numberInput.value), this;
|
|
1305
1305
|
}
|
|
1306
|
-
},
|
|
1306
|
+
}, Sn = class extends X {
|
|
1307
1307
|
constructor({ options: e = [], value: t = "" }) {
|
|
1308
1308
|
super();
|
|
1309
1309
|
let n = document.createElement("select"), r = (e, r) => {
|
|
@@ -1326,7 +1326,7 @@ var hn = class extends un {
|
|
|
1326
1326
|
let e = this.options;
|
|
1327
1327
|
return Array.isArray(e) ? e[this.select.selectedIndex] : e[this.select.value];
|
|
1328
1328
|
}
|
|
1329
|
-
},
|
|
1329
|
+
}, Cn = class extends X {
|
|
1330
1330
|
constructor({ value: e = "#ffffff" }) {
|
|
1331
1331
|
super();
|
|
1332
1332
|
let t = document.createElement("input");
|
|
@@ -1346,13 +1346,13 @@ var hn = class extends un {
|
|
|
1346
1346
|
let e = this._value;
|
|
1347
1347
|
return typeof e == "string" && (e = parseInt(e.slice(1), 16)), e;
|
|
1348
1348
|
}
|
|
1349
|
-
},
|
|
1349
|
+
}, wn = class extends X {
|
|
1350
1350
|
constructor({ text: e = "Button", value: t = () => {} }) {
|
|
1351
1351
|
super();
|
|
1352
1352
|
let n = document.createElement("button");
|
|
1353
1353
|
n.textContent = e, n.onclick = t, this.domElement.appendChild(n);
|
|
1354
1354
|
}
|
|
1355
|
-
},
|
|
1355
|
+
}, Tn = class extends X {
|
|
1356
1356
|
constructor({ value: e = "" }) {
|
|
1357
1357
|
super();
|
|
1358
1358
|
let t = document.createElement("input");
|
|
@@ -1366,7 +1366,7 @@ var hn = class extends un {
|
|
|
1366
1366
|
getValue() {
|
|
1367
1367
|
return this.input.value;
|
|
1368
1368
|
}
|
|
1369
|
-
},
|
|
1369
|
+
}, En = class e {
|
|
1370
1370
|
constructor(e, t) {
|
|
1371
1371
|
this.parameters = e, this.paramList = new K(t), this.paramList.setCollapsible(!0), this.objects = [];
|
|
1372
1372
|
}
|
|
@@ -1387,7 +1387,7 @@ var hn = class extends un {
|
|
|
1387
1387
|
return typeof n[0] == "object" ? i = this.addSelect(e, t, n[0]) : r === "number" ? i = n.length >= 2 ? this.addSlider(e, t, ...n) : this.addNumber(e, t, ...n) : r === "boolean" ? i = this.addBoolean(e, t) : r === "string" ? i = this.addString(e, t) : r === "function" && (i = this.addButton(e, t, ...n)), i;
|
|
1388
1388
|
}
|
|
1389
1389
|
_addInfo(e, t) {
|
|
1390
|
-
e.info = (n) => (
|
|
1390
|
+
e.info = (n) => (hn(t, n), e);
|
|
1391
1391
|
}
|
|
1392
1392
|
_addParameter(e, t, n, r) {
|
|
1393
1393
|
n.name = (e) => (r.data[0].childNodes.length > 0 && r.data[0].firstChild.nodeType === 3 ? r.data[0].firstChild.textContent = e : r.data[0].insertBefore(document.createTextNode(e), r.data[0].firstChild), n), this._addInfo(n, r.data[0]), n.listen = () => {
|
|
@@ -1407,7 +1407,7 @@ var hn = class extends un {
|
|
|
1407
1407
|
}), n.addEventListener("show", () => r.show()), n.addEventListener("hide", () => r.hide());
|
|
1408
1408
|
}
|
|
1409
1409
|
addString(e, t) {
|
|
1410
|
-
let n = e[t], r = new
|
|
1410
|
+
let n = e[t], r = new Tn({ value: n });
|
|
1411
1411
|
r.addEventListener("change", ({ value: n }) => {
|
|
1412
1412
|
e[t] = n;
|
|
1413
1413
|
});
|
|
@@ -1421,7 +1421,7 @@ var hn = class extends un {
|
|
|
1421
1421
|
return this.paramList.add(n.paramList), n;
|
|
1422
1422
|
}
|
|
1423
1423
|
addBoolean(e, t) {
|
|
1424
|
-
let n = e[t], r = new
|
|
1424
|
+
let n = e[t], r = new bn({ value: n });
|
|
1425
1425
|
r.addEventListener("change", ({ value: n }) => {
|
|
1426
1426
|
e[t] = n;
|
|
1427
1427
|
});
|
|
@@ -1437,7 +1437,7 @@ var hn = class extends un {
|
|
|
1437
1437
|
}), this._addParameter(e, t, r, a), r;
|
|
1438
1438
|
}
|
|
1439
1439
|
addSelect(e, t, n) {
|
|
1440
|
-
let r = e[t], i = new
|
|
1440
|
+
let r = e[t], i = new Sn({
|
|
1441
1441
|
options: n,
|
|
1442
1442
|
value: r
|
|
1443
1443
|
});
|
|
@@ -1450,7 +1450,7 @@ var hn = class extends un {
|
|
|
1450
1450
|
return this.paramList.add(o), o.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, i, o), i;
|
|
1451
1451
|
}
|
|
1452
1452
|
addColor(e, t) {
|
|
1453
|
-
let n = e[t], r = new
|
|
1453
|
+
let n = e[t], r = new Cn({ value: n });
|
|
1454
1454
|
r.addEventListener("change", ({ value: n }) => {
|
|
1455
1455
|
e[t] = n;
|
|
1456
1456
|
});
|
|
@@ -1460,7 +1460,7 @@ var hn = class extends un {
|
|
|
1460
1460
|
return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
|
|
1461
1461
|
}
|
|
1462
1462
|
addSlider(e, t, n = 0, r = 1, i = .01) {
|
|
1463
|
-
let a = e[t], o = new
|
|
1463
|
+
let a = e[t], o = new xn({
|
|
1464
1464
|
value: a,
|
|
1465
1465
|
min: n,
|
|
1466
1466
|
max: r,
|
|
@@ -1475,7 +1475,7 @@ var hn = class extends un {
|
|
|
1475
1475
|
return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
|
|
1476
1476
|
}
|
|
1477
1477
|
addNumber(e, t, ...n) {
|
|
1478
|
-
let r = e[t], [i, a] = n, o = new
|
|
1478
|
+
let r = e[t], [i, a] = n, o = new yn({
|
|
1479
1479
|
value: r,
|
|
1480
1480
|
min: i,
|
|
1481
1481
|
max: a
|
|
@@ -1489,7 +1489,7 @@ var hn = class extends un {
|
|
|
1489
1489
|
return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
|
|
1490
1490
|
}
|
|
1491
1491
|
addButton(e, t) {
|
|
1492
|
-
let n = e[t], r = new
|
|
1492
|
+
let n = e[t], r = new wn({
|
|
1493
1493
|
text: t,
|
|
1494
1494
|
value: n
|
|
1495
1495
|
});
|
|
@@ -1502,73 +1502,73 @@ var hn = class extends un {
|
|
|
1502
1502
|
return t.childNodes.length > 0 && t.firstChild.nodeType === 3 ? t.firstChild.textContent = e : t.insertBefore(document.createTextNode(e), t.firstChild), r;
|
|
1503
1503
|
}, this._addInfo(r, r.domElement.childNodes[0]), this._registerParameter(e, t, r, i), r;
|
|
1504
1504
|
}
|
|
1505
|
-
},
|
|
1505
|
+
}, Dn = class extends dn {
|
|
1506
1506
|
constructor(e = {}) {
|
|
1507
1507
|
super(e.name || "Parameters", e);
|
|
1508
|
-
let t = new
|
|
1508
|
+
let t = new fn("Property", "Value");
|
|
1509
1509
|
t.domElement.classList.add("parameters"), t.setGridStyle(".5fr 1fr"), t.domElement.style.minWidth = "300px";
|
|
1510
1510
|
let n = document.createElement("div");
|
|
1511
1511
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n), this.paramList = t, this.groups = [];
|
|
1512
1512
|
}
|
|
1513
1513
|
createGroup(e) {
|
|
1514
|
-
let t = new
|
|
1514
|
+
let t = new En(this, e);
|
|
1515
1515
|
return this.paramList.add(t.paramList), this.groups.push(t), t;
|
|
1516
1516
|
}
|
|
1517
|
-
},
|
|
1517
|
+
}, On = [{
|
|
1518
1518
|
name: "Color Grading",
|
|
1519
1519
|
url: "../extensions/color-grading/ColorGrading.js"
|
|
1520
1520
|
}, {
|
|
1521
1521
|
name: "TSL Graph",
|
|
1522
1522
|
url: "../extensions/tsl-graph/TSLGraphEditor.js"
|
|
1523
|
-
}],
|
|
1524
|
-
function
|
|
1525
|
-
e ?
|
|
1523
|
+
}], kn = Oe.prototype.init;
|
|
1524
|
+
function An(e) {
|
|
1525
|
+
e ? Oe.prototype.init = async function() {
|
|
1526
1526
|
if (this.backend.isWebGLBackend !== !0) {
|
|
1527
1527
|
let e = this.backend.parameters;
|
|
1528
|
-
this.backend = new
|
|
1528
|
+
this.backend = new ke(e);
|
|
1529
1529
|
}
|
|
1530
|
-
return
|
|
1531
|
-
} :
|
|
1530
|
+
return kn.call(this);
|
|
1531
|
+
} : Oe.prototype.init = kn;
|
|
1532
1532
|
}
|
|
1533
1533
|
var Z = null;
|
|
1534
|
-
function
|
|
1534
|
+
function jn() {
|
|
1535
1535
|
if (Z !== null) return Z;
|
|
1536
|
-
let e =
|
|
1536
|
+
let e = Wn("settings");
|
|
1537
1537
|
return Z = {
|
|
1538
1538
|
forceWebGL: e.forceWebGL === void 0 ? !1 : e.forceWebGL,
|
|
1539
1539
|
captureStackTrace: e.captureStackTrace === void 0 ? !1 : e.captureStackTrace,
|
|
1540
1540
|
activeExtensions: e.activeExtensions === void 0 ? {} : e.activeExtensions,
|
|
1541
1541
|
storage: e.storage === void 0 ? "url" : e.storage
|
|
1542
|
-
}, Z.forceWebGL &&
|
|
1542
|
+
}, Z.forceWebGL && An(!0), Z.captureStackTrace && (Ce.captureStackTrace = !0), Z;
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1545
|
-
|
|
1544
|
+
function Mn() {
|
|
1545
|
+
Gn("settings", {
|
|
1546
1546
|
forceWebGL: Z.forceWebGL,
|
|
1547
1547
|
captureStackTrace: Z.captureStackTrace,
|
|
1548
1548
|
activeExtensions: Z.activeExtensions,
|
|
1549
1549
|
storage: Z.storage
|
|
1550
1550
|
});
|
|
1551
1551
|
}
|
|
1552
|
-
|
|
1553
|
-
var
|
|
1552
|
+
jn();
|
|
1553
|
+
var Nn = class extends Dn {
|
|
1554
1554
|
constructor() {
|
|
1555
1555
|
super({ name: "Settings" }), this.extensions = {};
|
|
1556
|
-
let e =
|
|
1556
|
+
let e = jn(), t = this.createGroup("Renderer");
|
|
1557
1557
|
t.add(e, "forceWebGL").name("Force WebGL").onChange((e) => {
|
|
1558
|
-
|
|
1558
|
+
An(e), Mn(), location.reload();
|
|
1559
1559
|
}), t.add(e, "captureStackTrace").name("Capture Stack Trace").onChange((e) => {
|
|
1560
|
-
|
|
1560
|
+
Ce.captureStackTrace = e, Mn(), location.reload();
|
|
1561
1561
|
}), this.createGroup("Render Modes").add({ overdraw: !1 }, "overdraw").name("Overdraw").onChange((e) => {
|
|
1562
1562
|
this.inspector.overdraw = e;
|
|
1563
1563
|
}).info("Shows how many times each pixel is shaded.");
|
|
1564
1564
|
}
|
|
1565
1565
|
init() {
|
|
1566
|
-
let e = this.createGroup("Extensions"), t = this.createGroup("Storage"), n =
|
|
1566
|
+
let e = this.createGroup("Extensions"), t = this.createGroup("Storage"), n = jn();
|
|
1567
1567
|
t.add(n, "storage", {
|
|
1568
1568
|
"URL Session": "url",
|
|
1569
1569
|
"Keep across Origin": "origin"
|
|
1570
1570
|
}).name("Save Settings").onChange(() => {
|
|
1571
|
-
|
|
1571
|
+
Mn();
|
|
1572
1572
|
}).info("\nDefines how the **Inspector** preferences and states are stored in the browser.\n\n**URL Session**\nSaves state based on the exact URL. It will reset the settings whenever the URL changes.\n\n**Keep across Origin**\nShares the same state across any page within the current origin."), t.add({ clear: () => {
|
|
1573
1573
|
localStorage.removeItem("threejs-inspector"), location.reload();
|
|
1574
1574
|
} }, "clear").name("Clear Settings"), this._getExtensions().then((t) => {
|
|
@@ -1576,7 +1576,7 @@ var Mn = class extends En {
|
|
|
1576
1576
|
this.setActiveExtension(n.name, e), e ? Z.activeExtensions[n.name] = {
|
|
1577
1577
|
name: n.name,
|
|
1578
1578
|
url: n.url
|
|
1579
|
-
} : delete Z.activeExtensions[n.name], this._updateExtensionUI(n),
|
|
1579
|
+
} : delete Z.activeExtensions[n.name], this._updateExtensionUI(n), Mn();
|
|
1580
1580
|
}), Z.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
|
|
1581
1581
|
});
|
|
1582
1582
|
}
|
|
@@ -1604,17 +1604,17 @@ var Mn = class extends En {
|
|
|
1604
1604
|
});
|
|
1605
1605
|
}
|
|
1606
1606
|
async _getExtensions() {
|
|
1607
|
-
return
|
|
1607
|
+
return On;
|
|
1608
1608
|
}
|
|
1609
|
-
},
|
|
1610
|
-
let r =
|
|
1609
|
+
}, Pn = /* @__PURE__ */ new d(), Fn = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"12\" y1=\"1\" x2=\"12\" y2=\"23\"></line><polyline points=\"5 8 1 12 5 16\"></polyline><polyline points=\"19 8 23 12 19 16\"></polyline></svg>", In = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3\"/></svg>", Ln = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line></svg>", Rn = /* @__PURE__ */ H(([e, t, n]) => {
|
|
1610
|
+
let r = F(0);
|
|
1611
1611
|
Et(() => {
|
|
1612
1612
|
let { width: e, height: n } = t.value;
|
|
1613
1613
|
r.value = e / n;
|
|
1614
1614
|
});
|
|
1615
1615
|
let i = n.div(r), a = e.sub(.5), o = U(a.x.mul(i), a.y).add(.5), s = U(a.x, a.y.div(i)).add(.5), c = n.greaterThan(r).select(o, s);
|
|
1616
|
-
return
|
|
1617
|
-
}),
|
|
1616
|
+
return M(c, Wt(0, c.x).mul(Wt(c.x, 1)).mul(Wt(0, c.y)).mul(Wt(c.y, 1)));
|
|
1617
|
+
}), zn = class extends dn {
|
|
1618
1618
|
constructor(e = {}) {
|
|
1619
1619
|
super("Viewer", e), this.content.style.overflow = "hidden", this.maximizedByFullscreenButton = !1;
|
|
1620
1620
|
let t = document.createElement("div");
|
|
@@ -1627,7 +1627,7 @@ var Mn = class extends En {
|
|
|
1627
1627
|
i.className = "select", i.style.width = "200px";
|
|
1628
1628
|
let a = document.createElement("option");
|
|
1629
1629
|
a.value = "list", a.textContent = "List", i.appendChild(a), t.appendChild(i);
|
|
1630
|
-
let o = new
|
|
1630
|
+
let o = new fn("Viewer", "Name");
|
|
1631
1631
|
o.setGridStyle("150px minmax(200px, 2fr)"), o.domElement.style.minWidth = "400px", this.nodeList = o, this.content.appendChild(t);
|
|
1632
1632
|
let s = document.createElement("div");
|
|
1633
1633
|
s.className = "list-scroll-wrapper", s.style.flexGrow = "1", s.style.overflowY = "auto", s.style.minHeight = "0", s.appendChild(o.domElement), this.content.appendChild(s);
|
|
@@ -1664,11 +1664,11 @@ var Mn = class extends En {
|
|
|
1664
1664
|
t.stopPropagation(), this.splitActive && this.stopSplitMode(), this.select.value = e.id, this.showNodeView(e.id), this.saveLastView();
|
|
1665
1665
|
};
|
|
1666
1666
|
let o = document.createElement("button");
|
|
1667
|
-
o.className = "node-canvas-fullscreen-btn", o.title = "Fullscreen view", o.innerHTML =
|
|
1667
|
+
o.className = "node-canvas-fullscreen-btn", o.title = "Fullscreen view", o.innerHTML = In, o.onclick = (t) => {
|
|
1668
1668
|
t.stopPropagation(), this.splitActive && this.splitCanvasData === e && this.splitFullscreen ? this.stopSplitMode() : (this.splitFullscreen = !0, this.startSplitMode(e));
|
|
1669
1669
|
};
|
|
1670
1670
|
let s = document.createElement("button");
|
|
1671
|
-
s.className = "node-canvas-split-btn", s.title = "Interactive split screen", s.innerHTML =
|
|
1671
|
+
s.className = "node-canvas-split-btn", s.title = "Interactive split screen", s.innerHTML = Fn, s.onclick = (t) => {
|
|
1672
1672
|
t.stopPropagation(), this.splitActive && this.splitCanvasData === e && !this.splitFullscreen ? this.stopSplitMode() : (this.splitFullscreen = !1, this.startSplitMode(e));
|
|
1673
1673
|
}, i.appendChild(r), i.appendChild(a), i.appendChild(o), i.appendChild(s), this.setupEventForwarding(r), e.domElement = r, e.wrapperElement = i, e.splitBtn = s, e.fullscreenBtn = o, t = new K(i, n), t.itemRow.children[1].style["justify-content"] = "flex-start", this.itemLibrary.set(e.id, t);
|
|
1674
1674
|
}
|
|
@@ -1762,7 +1762,7 @@ var Mn = class extends En {
|
|
|
1762
1762
|
startSplitMode(e) {
|
|
1763
1763
|
this.profiler && this.profiler.panel.classList.contains("visible") && this.profiler.togglePanel(), this.splitActive = !0, this.splitCanvasData = e, this.splitX = .5;
|
|
1764
1764
|
let t = this.inspector.getRenderer(), n = t.domElement, r = n.getBoundingClientRect(), i = document.fullscreenElement || this.profiler.domElement, a = i.getBoundingClientRect(), o = r.left - a.left, s = r.top - a.top;
|
|
1765
|
-
if (this.splitCanvas || (this.splitCanvas = document.createElement("canvas"), this.splitCanvas.style.position = "absolute", this.splitCanvas.style.pointerEvents = "none", this.splitCanvas.style.zIndex = "998", this.splitCanvasTarget = new
|
|
1765
|
+
if (this.splitCanvas || (this.splitCanvas = document.createElement("canvas"), this.splitCanvas.style.position = "absolute", this.splitCanvas.style.pointerEvents = "none", this.splitCanvas.style.zIndex = "998", this.splitCanvasTarget = new Me(this.splitCanvas), this.splitCanvasTarget.setPixelRatio(window.devicePixelRatio)), this.splitCanvas.style.left = `${o}px`, this.splitCanvas.style.top = `${s}px`, this.splitCanvas.style.width = `${r.width}px`, this.splitCanvas.style.height = `${r.height}px`, this.splitCanvasTarget.setSize(r.width, r.height), t.backend.delete(this.splitCanvasTarget), i.appendChild(this.splitCanvas), this.splitFullscreen) this.splitOverlay && this.splitOverlay.parentElement && this.splitOverlay.parentElement.removeChild(this.splitOverlay);
|
|
1766
1766
|
else {
|
|
1767
1767
|
if (!this.splitOverlay) {
|
|
1768
1768
|
let e = document.createElement("div");
|
|
@@ -1783,32 +1783,32 @@ var Mn = class extends En {
|
|
|
1783
1783
|
this.splitOverlay.style.left = `${o}px`, this.splitOverlay.style.top = `${s}px`, this.splitOverlay.style.width = `${r.width}px`, this.splitOverlay.style.height = `${r.height}px`, this.splitLine.style.left = "50%", i.appendChild(this.splitOverlay);
|
|
1784
1784
|
}
|
|
1785
1785
|
this.splitUniforms ||= {
|
|
1786
|
-
splitX:
|
|
1787
|
-
viewportWidth:
|
|
1786
|
+
splitX: F(.5),
|
|
1787
|
+
viewportWidth: F(r.width)
|
|
1788
1788
|
}, this.splitUniforms.splitX.value = .5, this.splitUniforms.viewportWidth.value = r.width;
|
|
1789
|
-
let c = Ot(
|
|
1790
|
-
l = this.splitFullscreen ? c :
|
|
1789
|
+
let c = Ot(L(M(e.node.context({ getUV: () => Ht })), 1), 0, t.outputColorSpace).context({ inspector: !0 }), l;
|
|
1790
|
+
l = this.splitFullscreen ? c : H(() => (Ht.x.lessThan(this.splitUniforms.splitX).discard(), c))(), this.splitMaterial && this.splitMaterial.dispose(), this.splitMaterial = new k(), this.splitMaterial.outputNode = l, this.splitMaterial.depthTest = !1, this.splitMaterial.depthWrite = !1, this.splitQuad ? this.splitQuad.material = this.splitMaterial : this.splitQuad = new Ae(this.splitMaterial), this.updateSplitButtonsState();
|
|
1791
1791
|
}
|
|
1792
1792
|
stopSplitMode() {
|
|
1793
1793
|
this.splitActive = !1, this.splitCanvasData = null, this.splitFullscreen = !1, this.splitOverlay && this.splitOverlay.parentElement && this.splitOverlay.parentElement.removeChild(this.splitOverlay), this.splitCanvas && this.splitCanvas.parentElement && this.splitCanvas.parentElement.removeChild(this.splitCanvas), this.updateSplitButtonsState();
|
|
1794
1794
|
}
|
|
1795
1795
|
updateSplitButtonsState() {
|
|
1796
1796
|
this.splitActive ? this.backBtn.style.display = "" : this.select.value === "list" ? this.backBtn.style.display = "none" : this.backBtn.style.display = "";
|
|
1797
|
-
for (let e of this.canvasNodes.values()) !e.splitBtn || !e.fullscreenBtn || (this.splitActive && this.splitCanvasData === e ? this.splitFullscreen ? (e.fullscreenBtn.classList.add("active"), e.fullscreenBtn.innerHTML =
|
|
1797
|
+
for (let e of this.canvasNodes.values()) !e.splitBtn || !e.fullscreenBtn || (this.splitActive && this.splitCanvasData === e ? this.splitFullscreen ? (e.fullscreenBtn.classList.add("active"), e.fullscreenBtn.innerHTML = Ln, e.fullscreenBtn.title = "Exit Fullscreen", e.splitBtn.classList.remove("active"), e.splitBtn.innerHTML = Fn, e.splitBtn.title = "Interactive split screen") : (e.splitBtn.classList.add("active"), e.splitBtn.innerHTML = Ln, e.splitBtn.title = "Exit Split Screen", e.fullscreenBtn.classList.remove("active"), e.fullscreenBtn.innerHTML = In, e.fullscreenBtn.title = "Fullscreen view") : (e.splitBtn.classList.remove("active"), e.splitBtn.innerHTML = Fn, e.splitBtn.title = "Interactive split screen", e.fullscreenBtn.classList.remove("active"), e.fullscreenBtn.innerHTML = In, e.fullscreenBtn.title = "Fullscreen view"));
|
|
1798
1798
|
}
|
|
1799
1799
|
getCanvasDataByNode(e, t) {
|
|
1800
1800
|
let n = this.canvasNodes.get(t);
|
|
1801
1801
|
if (n === void 0) {
|
|
1802
|
-
let r = new
|
|
1802
|
+
let r = new Me(document.createElement("canvas"));
|
|
1803
1803
|
r.setPixelRatio(window.devicePixelRatio), r.setSize(140, 140);
|
|
1804
|
-
let i = t.id, { path: a, name: o } =
|
|
1805
|
-
let t =
|
|
1804
|
+
let i = t.id, { path: a, name: o } = pn(mn(t.getName() || "(unnamed)")), s = F(1), c = V(1), l = L(M(t.context({ getUV: (e) => {
|
|
1805
|
+
let t = Rn(Ht, e, s), n = t.xy;
|
|
1806
1806
|
return c.assign(t.z), n;
|
|
1807
1807
|
} })), 1).mul(c);
|
|
1808
1808
|
l = Ot(l, 0, e.outputColorSpace), l = l.context({ inspector: !0 });
|
|
1809
1809
|
let u = new k();
|
|
1810
1810
|
u.outputNode = l;
|
|
1811
|
-
let d = new
|
|
1811
|
+
let d = new Ae(u);
|
|
1812
1812
|
d.name = "Viewer - " + o, n = {
|
|
1813
1813
|
id: i,
|
|
1814
1814
|
name: o,
|
|
@@ -1829,7 +1829,7 @@ var Mn = class extends En {
|
|
|
1829
1829
|
if (t.width <= 0 || t.height <= 0) return;
|
|
1830
1830
|
let r = document.fullscreenElement || this.profiler.domElement, i = r.getBoundingClientRect(), a = t.left - i.left, o = t.top - i.top;
|
|
1831
1831
|
this.splitCanvas.parentElement !== r && r.appendChild(this.splitCanvas), this.splitOverlay && !this.splitFullscreen && this.splitOverlay.parentElement !== r && r.appendChild(this.splitOverlay), this.splitCanvas.style.left = `${a}px`, this.splitCanvas.style.top = `${o}px`, this.splitCanvas.style.width = `${t.width}px`, this.splitCanvas.style.height = `${t.height}px`, this.splitOverlay && !this.splitFullscreen && (this.splitOverlay.style.left = `${a}px`, this.splitOverlay.style.top = `${o}px`, this.splitOverlay.style.width = `${t.width}px`, this.splitOverlay.style.height = `${t.height}px`), (this.splitCanvasTarget.width !== t.width || this.splitCanvasTarget.height !== t.height) && (this.splitCanvasTarget.setSize(t.width, t.height), this.splitUniforms && this.splitUniforms.viewportWidth && (this.splitUniforms.viewportWidth.value = t.width), n.backend.delete(this.splitCanvasTarget));
|
|
1832
|
-
let s = n.getCanvasTarget(), c = n.getClearColor(new
|
|
1832
|
+
let s = n.getCanvasTarget(), c = n.getClearColor(new ue()), l = n.getClearAlpha(), u = A.resetRendererState(n);
|
|
1833
1833
|
n.toneMapping = 0, n.outputColorSpace = e, n.setCanvasTarget(this.splitCanvasTarget), n.setClearColor(0, 0), this.splitQuad.render(n), n.setCanvasTarget(s), n.setClearColor(c, l), A.restoreRendererState(n, u);
|
|
1834
1834
|
}
|
|
1835
1835
|
let r = t.getNodes();
|
|
@@ -1854,7 +1854,7 @@ var Mn = class extends En {
|
|
|
1854
1854
|
}
|
|
1855
1855
|
let t = !1;
|
|
1856
1856
|
if (this.pendingRestoreView) {
|
|
1857
|
-
let e =
|
|
1857
|
+
let e = Wn("viewerLastView");
|
|
1858
1858
|
if (e !== "list") {
|
|
1859
1859
|
for (let n = 0; n < this.select.options.length; n++) if (this.select.options[n].textContent === e) {
|
|
1860
1860
|
this.select.selectedIndex = n;
|
|
@@ -1892,7 +1892,7 @@ var Mn = class extends En {
|
|
|
1892
1892
|
let e = this.getFolder(a);
|
|
1893
1893
|
s[a] === void 0 && (s[a] = 0), (e.parent === null || r.parent !== e || e.children.indexOf(r) !== s[a]) && e.add(r), s[a]++;
|
|
1894
1894
|
} else r.parent || this.nodes.add(r);
|
|
1895
|
-
let o = [], c = i.getDrawingBufferSize(
|
|
1895
|
+
let o = [], c = i.getDrawingBufferSize(Pn);
|
|
1896
1896
|
t.node.traverse((e) => {
|
|
1897
1897
|
if (e.isRTTNode && e.autoResize === !0) {
|
|
1898
1898
|
let t = e.width, n = e.height;
|
|
@@ -1913,10 +1913,10 @@ var Mn = class extends En {
|
|
|
1913
1913
|
super.setActive(e);
|
|
1914
1914
|
}
|
|
1915
1915
|
saveLastView() {
|
|
1916
|
-
if (this.select.value === "list")
|
|
1916
|
+
if (this.select.value === "list") Gn("viewerLastView", "list");
|
|
1917
1917
|
else {
|
|
1918
1918
|
let e = this.select.options[this.select.selectedIndex];
|
|
1919
|
-
e &&
|
|
1919
|
+
e && Gn("viewerLastView", e.textContent);
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
1922
1922
|
dispose() {
|
|
@@ -1924,9 +1924,9 @@ var Mn = class extends En {
|
|
|
1924
1924
|
for (let e of this.canvasNodes.values()) e.canvasTarget.dispose(), e.material.dispose();
|
|
1925
1925
|
this.canvasNodes.clear(), super.dispose();
|
|
1926
1926
|
}
|
|
1927
|
-
},
|
|
1927
|
+
}, Bn = 500, Vn = 60, Hn = class extends dn {
|
|
1928
1928
|
constructor(e = {}) {
|
|
1929
|
-
super("Timeline", e), this.content.style.overflow = "hidden", this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.activeBlocks = /* @__PURE__ */ new Map(), this.domPool = [], this.originalBackend = null, this.originalMethods = /* @__PURE__ */ new Map(), this.renderer = null, this.graph = new
|
|
1929
|
+
super("Timeline", e), this.content.style.overflow = "hidden", this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.activeBlocks = /* @__PURE__ */ new Map(), this.domPool = [], this.originalBackend = null, this.originalMethods = /* @__PURE__ */ new Map(), this.renderer = null, this.graph = new ln(Bn), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )"), this.buildHeader(), this.buildUI(), window.addEventListener("resize", () => {
|
|
1930
1930
|
this.isActive && !this.isRecording && this.frames.length > 0 && this.renderSlider();
|
|
1931
1931
|
});
|
|
1932
1932
|
}
|
|
@@ -1949,8 +1949,8 @@ var Mn = class extends En {
|
|
|
1949
1949
|
r.value = "counts", r.textContent = "Count", this.viewModeSelect.appendChild(r), this.viewModeSelect.value = this.isHierarchicalView ? "hierarchy" : "counts", this.viewModeSelect.addEventListener("change", () => {
|
|
1950
1950
|
this.isHierarchicalView = this.viewModeSelect.value === "hierarchy", this.selectedFrameIndex !== void 0 && this.selectedFrameIndex !== -1 && this.selectFrame(this.selectedFrameIndex);
|
|
1951
1951
|
}), this.recordRefreshButton = document.createElement("button"), this.recordRefreshButton.className = "console-copy-button", this.recordRefreshButton.title = "Refresh & Record", this.recordRefreshButton.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\"></path><path d=\"M21 3v5h-5\"></path><circle cx=\"12\" cy=\"12\" r=\"3\" fill=\"currentColor\"></circle></svg>", this.recordRefreshButton.style.padding = "0 10px", this.recordRefreshButton.style.lineHeight = "24px", this.recordRefreshButton.style.display = "flex", this.recordRefreshButton.style.alignItems = "center", this.recordRefreshButton.addEventListener("click", () => {
|
|
1952
|
-
let e =
|
|
1953
|
-
e.recording = !0,
|
|
1952
|
+
let e = Wn("timeline");
|
|
1953
|
+
e.recording = !0, Gn("timeline", e), window.location.reload();
|
|
1954
1954
|
}), this.exportButton = document.createElement("button"), this.exportButton.className = "console-copy-button", this.exportButton.title = "Export", this.exportButton.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path><polyline points=\"7 10 12 15 17 10\"></polyline><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line></svg>", this.exportButton.style.padding = "0 10px", this.exportButton.style.lineHeight = "24px", this.exportButton.style.display = "flex", this.exportButton.style.alignItems = "center", this.exportButton.addEventListener("click", () => this.exportData());
|
|
1955
1955
|
let i = document.createElement("div");
|
|
1956
1956
|
i.className = "console-buttons-group", i.appendChild(this.recordButton), i.appendChild(this.recordRefreshButton), i.appendChild(this.exportButton), i.appendChild(t);
|
|
@@ -2034,8 +2034,8 @@ var Mn = class extends En {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
setRenderer(e) {
|
|
2036
2036
|
this.renderer = e;
|
|
2037
|
-
let t =
|
|
2038
|
-
t.recording && (t.recording = !1,
|
|
2037
|
+
let t = Wn("timeline");
|
|
2038
|
+
t.recording && (t.recording = !1, Gn("timeline", t), this.toggleRecording());
|
|
2039
2039
|
}
|
|
2040
2040
|
toggleRecording() {
|
|
2041
2041
|
if (!this.renderer) {
|
|
@@ -2065,7 +2065,7 @@ var Mn = class extends En {
|
|
|
2065
2065
|
for (let t = 0; t < n.length; t++) n[t] *= e;
|
|
2066
2066
|
}
|
|
2067
2067
|
}
|
|
2068
|
-
let t = this.baseTriangles > 0 ? e / this.baseTriangles *
|
|
2068
|
+
let t = this.baseTriangles > 0 ? e / this.baseTriangles * Vn : 0;
|
|
2069
2069
|
this.graph.addPoint("calls", this.currentFrame.calls.length), this.graph.addPoint("fps", this.currentFrame.fps), this.graph.addPoint("triangles", t), this.graph.update();
|
|
2070
2070
|
}
|
|
2071
2071
|
this.currentFrame = {
|
|
@@ -2073,7 +2073,7 @@ var Mn = class extends En {
|
|
|
2073
2073
|
calls: [],
|
|
2074
2074
|
fps: 0,
|
|
2075
2075
|
triangles: 0
|
|
2076
|
-
}, this.frames.push(this.currentFrame), this.frames.length >
|
|
2076
|
+
}, this.frames.push(this.currentFrame), this.frames.length > Bn && this.frames.shift();
|
|
2077
2077
|
}
|
|
2078
2078
|
let a = {
|
|
2079
2079
|
method: n,
|
|
@@ -2105,7 +2105,7 @@ var Mn = class extends En {
|
|
|
2105
2105
|
case y: return "8";
|
|
2106
2106
|
case g:
|
|
2107
2107
|
case de:
|
|
2108
|
-
case
|
|
2108
|
+
case te:
|
|
2109
2109
|
case u:
|
|
2110
2110
|
case n: return "16";
|
|
2111
2111
|
case p:
|
|
@@ -2113,22 +2113,22 @@ var Mn = class extends En {
|
|
|
2113
2113
|
case S:
|
|
2114
2114
|
case me:
|
|
2115
2115
|
case ee:
|
|
2116
|
-
case
|
|
2116
|
+
case le: return "32";
|
|
2117
2117
|
default: return "?";
|
|
2118
2118
|
}
|
|
2119
2119
|
}, c = (e) => {
|
|
2120
2120
|
switch (e.format) {
|
|
2121
|
-
case
|
|
2121
|
+
case se: return "a";
|
|
2122
2122
|
case t:
|
|
2123
|
-
case
|
|
2123
|
+
case ne: return "r";
|
|
2124
2124
|
case fe:
|
|
2125
2125
|
case f: return "rg";
|
|
2126
|
-
case
|
|
2127
|
-
case
|
|
2128
|
-
case
|
|
2126
|
+
case E:
|
|
2127
|
+
case T: return "rgb";
|
|
2128
|
+
case re: return "depth";
|
|
2129
2129
|
case o: return "depth-stencil";
|
|
2130
2130
|
case s:
|
|
2131
|
-
case
|
|
2131
|
+
case ae:
|
|
2132
2132
|
default: return "rgba";
|
|
2133
2133
|
}
|
|
2134
2134
|
};
|
|
@@ -2339,7 +2339,7 @@ var Mn = class extends En {
|
|
|
2339
2339
|
r > t && (t = r);
|
|
2340
2340
|
}
|
|
2341
2341
|
for (let n = 0; n < e.length; n++) {
|
|
2342
|
-
let r = e[n].triangles || 0, i = t > 0 ? r / t *
|
|
2342
|
+
let r = e[n].triangles || 0, i = t > 0 ? r / t * Vn : 0;
|
|
2343
2343
|
this.graph.addPoint("calls", e[n].calls.length), this.graph.addPoint("fps", e[n].fps || 0), this.graph.addPoint("triangles", i);
|
|
2344
2344
|
}
|
|
2345
2345
|
this.graph.update(), this.playhead.style.display = "block";
|
|
@@ -2394,7 +2394,7 @@ var Mn = class extends En {
|
|
|
2394
2394
|
if (a.textContent = r.method, t.titleSpan.appendChild(a), r.details) {
|
|
2395
2395
|
let e = `### ${r.method}\n`;
|
|
2396
2396
|
for (let t in r.details) r.details[t] !== void 0 && (e += `**${t}**: ${r.details[t]}\n`);
|
|
2397
|
-
let n =
|
|
2397
|
+
let n = hn(t.titleSpan, e);
|
|
2398
2398
|
n.style.flexShrink = "0", n.style.marginLeft = "6px", n.style.display = "inline-flex", n.style.verticalAlign = "middle";
|
|
2399
2399
|
}
|
|
2400
2400
|
let o = document.createElement("span"), s = r.formatedDetails ? r.formatedDetails : "";
|
|
@@ -2472,29 +2472,29 @@ var Mn = class extends En {
|
|
|
2472
2472
|
getColorForMethod(e) {
|
|
2473
2473
|
return e.startsWith("begin") ? "var(--color-green)" : e.startsWith("finish") || e.startsWith("destroy") ? "var(--color-red)" : e.startsWith("draw") || e.startsWith("compute") || e.startsWith("create") || e.startsWith("generate") ? "var(--color-yellow)" : "var(--text-secondary)";
|
|
2474
2474
|
}
|
|
2475
|
-
},
|
|
2475
|
+
}, Un = class extends sn {
|
|
2476
2476
|
constructor(e = {}) {
|
|
2477
2477
|
super();
|
|
2478
2478
|
let { nonce: t = null } = e;
|
|
2479
2479
|
this.nonce = t;
|
|
2480
|
-
let n = new
|
|
2480
|
+
let n = new un(this, e);
|
|
2481
2481
|
n.addEventListener("resize", (e) => this.dispatchEvent(e)), n.addEventListener("orientationchange", (e) => this.dispatchEvent(e)), n.addEventListener("layoutchange", (e) => this.dispatchEvent(e));
|
|
2482
|
-
let r = new
|
|
2482
|
+
let r = new Dn({
|
|
2483
2483
|
builtin: !0,
|
|
2484
2484
|
icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 6l8 0\" /><path d=\"M16 6l4 0\" /><path d=\"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 12l2 0\" /><path d=\"M10 12l10 0\" /><path d=\"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 18l11 0\" /><path d=\"M19 18l1 0\" /></svg>"
|
|
2485
2485
|
});
|
|
2486
2486
|
r.hide(), n.addTab(r);
|
|
2487
|
-
let i = new
|
|
2487
|
+
let i = new zn();
|
|
2488
2488
|
i.hide(), n.addTab(i);
|
|
2489
|
-
let a = new
|
|
2489
|
+
let a = new gn();
|
|
2490
2490
|
n.addTab(a);
|
|
2491
|
-
let o = new
|
|
2491
|
+
let o = new _n();
|
|
2492
2492
|
n.addTab(o);
|
|
2493
|
-
let s = new
|
|
2493
|
+
let s = new Hn();
|
|
2494
2494
|
n.addTab(s);
|
|
2495
|
-
let c = new
|
|
2495
|
+
let c = new vn();
|
|
2496
2496
|
n.addTab(c);
|
|
2497
|
-
let l = new
|
|
2497
|
+
let l = new Nn();
|
|
2498
2498
|
n.addTab(l), n.loadLayout(), n.activeTabId || n.setActiveTab(a.id), this.statsData = /* @__PURE__ */ new Map(), this.profiler = n, this.performance = a, this.memory = o, this.console = c, this.parameters = r, this.viewer = i, this.timeline = s, this.settings = l, this.once = {}, this.extensionsData = /* @__PURE__ */ new WeakMap(), this.previousConsoleFunction = null, this._domObserver = null, this.displayCycle = {
|
|
2499
2499
|
text: {
|
|
2500
2500
|
needsUpdate: !1,
|
|
@@ -2578,7 +2578,7 @@ var Mn = class extends En {
|
|
|
2578
2578
|
setRenderer(e) {
|
|
2579
2579
|
if (super.setRenderer(e), e !== null) {
|
|
2580
2580
|
let t = h();
|
|
2581
|
-
this.previousConsoleFunction = t,
|
|
2581
|
+
this.previousConsoleFunction = t, ie((e, n, ...r) => {
|
|
2582
2582
|
t && t(e, n, ...r), this.resolveConsole(e, n, ...r);
|
|
2583
2583
|
}), this.isAvailable && ((async () => {
|
|
2584
2584
|
e.hasInitialized() === !1 && await e.init(), e.backend.trackTimestamp = !0, e.hasFeature("timestamp-query") !== !0 && this.console.addMessage("error", "THREE.Inspector: GPU Timestamp Queries not available.");
|
|
@@ -2592,7 +2592,7 @@ var Mn = class extends En {
|
|
|
2592
2592
|
subtree: !0
|
|
2593
2593
|
})) : e.domElement.parentElement.appendChild(n));
|
|
2594
2594
|
})(), this.timeline.setRenderer(e));
|
|
2595
|
-
} else this.previousConsoleFunction &&= (
|
|
2595
|
+
} else this.previousConsoleFunction &&= (ie(this.previousConsoleFunction), void 0), this._domObserver !== null && (this._domObserver.disconnect(), this._domObserver = null), this.profiler.dispose(), this.statsData.clear(), super.dispose();
|
|
2596
2596
|
return this;
|
|
2597
2597
|
}
|
|
2598
2598
|
createParameters(e) {
|
|
@@ -2648,41 +2648,41 @@ var Mn = class extends En {
|
|
|
2648
2648
|
super.dispose(), this.setRenderer(null);
|
|
2649
2649
|
}
|
|
2650
2650
|
};
|
|
2651
|
-
function
|
|
2651
|
+
function Wn(e) {
|
|
2652
2652
|
let t = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
|
|
2653
2653
|
return t.version !== "186" || t.settings && t.settings.storage === "url" && t.settings.url !== location.href ? (localStorage.removeItem("threejs-inspector"), {}) : t[e] || {};
|
|
2654
2654
|
}
|
|
2655
|
-
function
|
|
2655
|
+
function Gn(e, t) {
|
|
2656
2656
|
let n = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
|
|
2657
2657
|
t === null ? delete n[e] : n[e] = t, n.settings = n.settings || {}, n.settings.url = n.settings.url || location.href, n.settings.storage = n.settings.storage || "url", n.version = "186", localStorage.setItem("threejs-inspector", JSON.stringify(n));
|
|
2658
2658
|
}
|
|
2659
2659
|
//#endregion
|
|
2660
2660
|
//#region ../../node_modules/three/examples/jsm/tsl/display/SSGINode.js
|
|
2661
|
-
var
|
|
2661
|
+
var Kn = /* @__PURE__ */ new Ae(), qn = /* @__PURE__ */ new d(), Jn = [
|
|
2662
2662
|
60,
|
|
2663
2663
|
300,
|
|
2664
2664
|
180,
|
|
2665
2665
|
240,
|
|
2666
2666
|
120,
|
|
2667
2667
|
0
|
|
2668
|
-
],
|
|
2668
|
+
], Yn = [
|
|
2669
2669
|
0,
|
|
2670
2670
|
.5,
|
|
2671
2671
|
.25,
|
|
2672
2672
|
.75
|
|
2673
|
-
],
|
|
2673
|
+
], Xn, Zn = class extends we {
|
|
2674
2674
|
static get type() {
|
|
2675
2675
|
return "SSGINode";
|
|
2676
2676
|
}
|
|
2677
2677
|
constructor(e, n, r, i) {
|
|
2678
|
-
super("vec4"), this.beautyNode = e, this.depthNode = n, this.normalNode = r, this.updateBeforeType = At.FRAME, this.sliceCount =
|
|
2678
|
+
super("vec4"), this.beautyNode = e, this.depthNode = n, this.normalNode = r, this.updateBeforeType = At.FRAME, this.sliceCount = F(1, "uint"), this.stepCount = F(12, "uint"), this.aoIntensity = F(1, "float"), this.giIntensity = F(10, "float"), this.radius = F(12, "float"), this.useScreenSpaceSampling = F(!0, "bool"), this.expFactor = F(2, "float"), this.thickness = F(1, "float"), this.useLinearThickness = F(!1, "bool"), this.backfaceLighting = F(0, "float"), this.useTemporalFiltering = !0, this._resolution = F(new d()), this._halfProjScale = F(1), this._temporalDirection = F(0), this._temporalOffset = F(0), this._cameraProjectionMatrix = F(i.projectionMatrix), this._cameraProjectionMatrixInverse = F(i.projectionMatrixInverse), this._cameraNear = bt("near", "float", i), this._cameraFar = bt("far", "float", i), this._camera = i, this._ssgiRenderTarget = new c(1, 1, {
|
|
2679
2679
|
depthBuffer: !1,
|
|
2680
2680
|
count: 2
|
|
2681
2681
|
});
|
|
2682
2682
|
let a = this._ssgiRenderTarget.textures[0];
|
|
2683
2683
|
a.name = "SSGI.AO", a.type = y, a.format = t;
|
|
2684
2684
|
let o = this._ssgiRenderTarget.textures[1];
|
|
2685
|
-
o.name = "SSGI.GI", o.type =
|
|
2685
|
+
o.name = "SSGI.GI", o.type = le, o.format = E, this._material = new k(), this._material.name = "SSGI", this._aoNode = Ct(this, this._ssgiRenderTarget.textures[0]), this._giNode = Ct(this, this._ssgiRenderTarget.textures[1]);
|
|
2686
2686
|
}
|
|
2687
2687
|
getAONode() {
|
|
2688
2688
|
return this._aoNode;
|
|
@@ -2695,30 +2695,30 @@ var Gn = /* @__PURE__ */ new ke(), Kn = /* @__PURE__ */ new d(), qn = [
|
|
|
2695
2695
|
}
|
|
2696
2696
|
updateBefore(e) {
|
|
2697
2697
|
let { renderer: t } = e;
|
|
2698
|
-
|
|
2699
|
-
let n = t.getDrawingBufferSize(
|
|
2698
|
+
Xn = A.resetRendererState(t, Xn);
|
|
2699
|
+
let n = t.getDrawingBufferSize(qn);
|
|
2700
2700
|
if (this.setSize(n.width, n.height), this.useTemporalFiltering === !0) {
|
|
2701
2701
|
let t = e.frameId;
|
|
2702
|
-
this._temporalDirection.value =
|
|
2702
|
+
this._temporalDirection.value = Jn[t % 6] / 360, this._temporalOffset.value = Yn[t % 4];
|
|
2703
2703
|
} else this._temporalDirection.value = 1, this._temporalOffset.value = 1;
|
|
2704
|
-
|
|
2704
|
+
Kn.material = this._material, Kn.name = "SSGI", t.setClearColor(16777215, 1), t.setRenderTarget(this._ssgiRenderTarget), Kn.render(t), A.restoreRendererState(t, Xn);
|
|
2705
2705
|
}
|
|
2706
2706
|
setup(e) {
|
|
2707
2707
|
let t = e.renderer;
|
|
2708
2708
|
t.backend.isWebGPUBackend === !0 && t.hasFeature("rg11b10ufloat-renderable") === !1 && console.error("THREE.SSGINode: The device does not support the \"rg11b10ufloat-renderable\" feature which is required for SSGI.");
|
|
2709
|
-
let n = qe(), r =
|
|
2709
|
+
let n = qe(), r = P(32), i = P(0), a = (t) => {
|
|
2710
2710
|
let n = this.depthNode.sample(t).r;
|
|
2711
|
-
return e.renderer.logarithmicDepthBuffer === !0 ? at(
|
|
2712
|
-
}, o = (e) => this.normalNode === null ? Ye(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), s = (e) => this.beautyNode.sample(e), c =
|
|
2711
|
+
return e.renderer.logarithmicDepthBuffer === !0 ? at(Yt(n, this._cameraNear, this._cameraFar), this._cameraNear, this._cameraFar) : n;
|
|
2712
|
+
}, o = (e) => this.normalNode === null ? Ye(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), s = (e) => this.beautyNode.sample(e), c = H(([e]) => V(.25).mul(Le(e.y, e.x).bitAnd(3))).setLayout({
|
|
2713
2713
|
name: "spatialOffsets",
|
|
2714
2714
|
type: "float",
|
|
2715
2715
|
inputs: [{
|
|
2716
2716
|
name: "position",
|
|
2717
2717
|
type: "vec2"
|
|
2718
2718
|
}]
|
|
2719
|
-
}), l =
|
|
2720
|
-
let t =
|
|
2721
|
-
return t.mulAssign(Ie(
|
|
2719
|
+
}), l = H(([e]) => {
|
|
2720
|
+
let t = z(e).mul(V(-.156583)).add(Nt);
|
|
2721
|
+
return t.mulAssign(Ie(z(e).oneMinus())), U(e.x.greaterThanEqual(0).select(t.x, zt.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, zt.sub(t.y)));
|
|
2722
2722
|
}).setLayout({
|
|
2723
2723
|
name: "GTAOFastAcos",
|
|
2724
2724
|
type: "vec2",
|
|
@@ -2726,104 +2726,104 @@ var Gn = /* @__PURE__ */ new ke(), Kn = /* @__PURE__ */ new d(), qn = [
|
|
|
2726
2726
|
name: "value",
|
|
2727
2727
|
type: "vec2"
|
|
2728
2728
|
}]
|
|
2729
|
-
}), u =
|
|
2730
|
-
let g = this.stepCount.toConst(), _ = this.expFactor.toConst(), v = this.thickness.toConst(), y = this.backfaceLighting.toConst(), b = e.select(U(1, -1), U(-1, 1)), ee = e.select(1, -1), x =
|
|
2729
|
+
}), u = H(([e, t, n, c, u, d, f, p, m, h]) => {
|
|
2730
|
+
let g = this.stepCount.toConst(), _ = this.expFactor.toConst(), v = this.thickness.toConst(), y = this.backfaceLighting.toConst(), b = e.select(U(1, -1), U(-1, 1)), ee = e.select(1, -1), x = M(0);
|
|
2731
2731
|
return dt({
|
|
2732
|
-
start:
|
|
2732
|
+
start: P(0),
|
|
2733
2733
|
end: g,
|
|
2734
2734
|
type: "uint",
|
|
2735
2735
|
condition: "<"
|
|
2736
2736
|
}, ({ i: g }) => {
|
|
2737
|
-
let S = gt(
|
|
2738
|
-
|
|
2737
|
+
let S = gt(z(st(t, V(g).add(d)).div(n)), _).mul(n).toConst(), C = u.mul(R(S, V(g).add(1))).toConst(), w = f.add(C.mul(b)).toConst();
|
|
2738
|
+
B(w.x.lessThanEqual(0).or(w.y.lessThanEqual(0)).or(w.x.greaterThanEqual(1)).or(w.y.greaterThanEqual(1)), () => {
|
|
2739
2739
|
Lt();
|
|
2740
2740
|
});
|
|
2741
|
-
let
|
|
2742
|
-
|
|
2743
|
-
let
|
|
2744
|
-
|
|
2745
|
-
let
|
|
2746
|
-
|
|
2741
|
+
let T = Ze(w, a(w), this._cameraProjectionMatrixInverse).toConst(), E = T.sub(c).normalize().toConst(), te = this.useLinearThickness.select(T.z.negate().div(this._cameraFar).clamp().mul(100), V(1)), ne = $e(T.sub(te.mul(p).mul(v)).sub(c)), D = U(N(E, p), N(ne, p));
|
|
2742
|
+
D = l(lt(D, -1, 1)), D = lt(Re(st(ee, D.negate()).sub(h.sub(Nt)), zt)), D = e.select(D.yx, D.xy);
|
|
2743
|
+
let re = D.x.toConst(), ie = D.y.toConst(), ae = P(D.mul(V(r))).toConst(), oe = P(xt(ie.sub(re).mul(V(r)))).toConst(), se = oe.greaterThan(P(0)).select(P(Jt(P(4294967295), P(32).sub(r).add(r.sub(oe)))), P(0)).toConst().shiftLeft(ae);
|
|
2744
|
+
se = se.bitAnd(i.bitNot()), i.assign(i.bitOr(se));
|
|
2745
|
+
let ce = tt(se);
|
|
2746
|
+
B(ce.greaterThan(0), () => {
|
|
2747
2747
|
let e = s(w);
|
|
2748
|
-
|
|
2749
|
-
let t = $e(
|
|
2750
|
-
|
|
2751
|
-
let i = o(w), a =
|
|
2752
|
-
a = y.greaterThan(0).and(
|
|
2748
|
+
B(j(e).greaterThan(.001), () => {
|
|
2749
|
+
let t = $e(E), n = lt(N(m, t));
|
|
2750
|
+
B(n.greaterThan(.001), () => {
|
|
2751
|
+
let i = o(w), a = N(i, t.negate()), s = mt(a).lessThan(0).select(z(a).mul(y), z(a));
|
|
2752
|
+
a = y.greaterThan(0).and(N(i, p).greaterThan(0)).select(s, lt(a)), x.rgb.addAssign(V(ce).div(V(r)).mul(e).mul(n).mul(a));
|
|
2753
2753
|
});
|
|
2754
2754
|
});
|
|
2755
2755
|
});
|
|
2756
2756
|
}), x;
|
|
2757
|
-
}), d =
|
|
2757
|
+
}), d = Bt("float"), f = Bt("vec3"), p = Rt(d, f), m = H(() => {
|
|
2758
2758
|
let e = a(n).toVar();
|
|
2759
2759
|
e.greaterThanEqual(1).discard();
|
|
2760
|
-
let t = Ze(n, e, this._cameraProjectionMatrixInverse).toVar(), s = o(n).toVar(), l = $e(t.xyz.negate()).toVar(), p = c(ut), m = Ke(ut), h = this._temporalDirection.mul(.02), g = Je(p.add(this._temporalOffset)).add(_t(n.add(h).mul(2).sub(1))), _ =
|
|
2761
|
-
|
|
2762
|
-
C.assign(S.mul(this._resolution.x.div(2)).div(
|
|
2760
|
+
let t = Ze(n, e, this._cameraProjectionMatrixInverse).toVar(), s = o(n).toVar(), l = $e(t.xyz.negate()).toVar(), p = c(ut), m = Ke(ut), h = this._temporalDirection.mul(.02), g = Je(p.add(this._temporalOffset)).add(_t(n.add(h).mul(2).sub(1))), _ = V(0), v = M(0), y = this.sliceCount.toConst(), b = this.stepCount.toConst(), ee = this.aoIntensity.toConst(), x = this.giIntensity.toConst(), S = this.radius.toConst(), C = V(0).toVar();
|
|
2761
|
+
B(this.useScreenSpaceSampling, () => {
|
|
2762
|
+
C.assign(S.mul(this._resolution.x.div(2)).div(V(16)));
|
|
2763
2763
|
}).Else(() => {
|
|
2764
|
-
C.assign(
|
|
2765
|
-
}), C.divAssign(
|
|
2766
|
-
let w =
|
|
2764
|
+
C.assign(R(S.mul(this._halfProjScale).div(t.z.negate()), V(b)));
|
|
2765
|
+
}), C.divAssign(V(b).add(1));
|
|
2766
|
+
let w = R(1, V(b.sub(1))).mul(C).toConst();
|
|
2767
2767
|
dt({
|
|
2768
|
-
start:
|
|
2768
|
+
start: P(0),
|
|
2769
2769
|
end: y,
|
|
2770
2770
|
type: "uint",
|
|
2771
2771
|
condition: "<"
|
|
2772
2772
|
}, ({ i: e }) => {
|
|
2773
|
-
let a = st(
|
|
2774
|
-
i.assign(0), v.addAssign(u(Dt(!0), C, w, t, c, g, n, l, s, b)), v.addAssign(u(Dt(!1), C, w, t, c, g, n, l, s, b)), _.addAssign(
|
|
2775
|
-
}), _.divAssign(
|
|
2776
|
-
let
|
|
2777
|
-
return v.mulAssign(
|
|
2773
|
+
let a = st(V(e).add(m).add(this._temporalDirection), zt.div(V(y))).toConst(), o = M(U(Gt(a), Kt(a)), 0).toConst(), c = o.xy.mul(V(1).div(this._resolution)).toConst(), d = $e(Fe(o, l)).toConst(), f = Fe(l, d).toConst(), p = s.sub(d.mul(N(s, d))).toConst(), h = lt(N($e(p).toConst(), l), -1, 1).toConst(), b = mt(N(p, f)).negate().mul(yt(h)).toConst();
|
|
2774
|
+
i.assign(0), v.addAssign(u(Dt(!0), C, w, t, c, g, n, l, s, b)), v.addAssign(u(Dt(!1), C, w, t, c, g, n, l, s, b)), _.addAssign(V(tt(i)).div(V(r)));
|
|
2775
|
+
}), _.divAssign(V(y)), _.assign(gt(_.clamp().oneMinus(), ee).clamp()), v.divAssign(V(y)), v.mulAssign(x);
|
|
2776
|
+
let T = V(7).toConst(), E = j(v), te = E.greaterThan(T).select(T.div(E), V(1));
|
|
2777
|
+
return v.mulAssign(te), d.assign(_), f.assign(v), L(0);
|
|
2778
2778
|
});
|
|
2779
|
-
return this._material.contextNode =
|
|
2779
|
+
return this._material.contextNode = qt(e.getSharedContext()), this._material.colorNode = m(), this._material.outputNode = p, this._material.needsUpdate = !0, this._aoNode;
|
|
2780
2780
|
}
|
|
2781
2781
|
dispose() {
|
|
2782
2782
|
super.dispose(), this._ssgiRenderTarget.dispose(), this._material.dispose();
|
|
2783
2783
|
}
|
|
2784
|
-
},
|
|
2784
|
+
}, Qn = (e, t, n, r) => new Zn(pt(e), t, n, r), $n = class extends we {
|
|
2785
2785
|
static get type() {
|
|
2786
2786
|
return "DenoiseNode";
|
|
2787
2787
|
}
|
|
2788
2788
|
constructor(e, t, n, r) {
|
|
2789
|
-
super("vec4"), this.textureNode = e, this.depthNode = t, this.normalNode = n, this._noiseTexture =
|
|
2789
|
+
super("vec4"), this.textureNode = e, this.depthNode = t, this.normalNode = n, this._noiseTexture = tr(), this.noiseNode = I(this._noiseTexture), this.lumaPhi = F(5), this.depthPhi = F(5), this.normalPhi = F(5), this.radius = F(5), this.index = F(0), this.updateBeforeType = At.FRAME, this._resolution = F(new d()), this._sampleVectors = Qe(er(16, 2, 1)), this._cameraProjectionMatrixInverse = F(r.projectionMatrixInverse);
|
|
2790
2790
|
}
|
|
2791
2791
|
updateBefore() {
|
|
2792
2792
|
let e = this.textureNode.value;
|
|
2793
2793
|
this._resolution.value.set(e.image.width, e.image.height);
|
|
2794
2794
|
}
|
|
2795
2795
|
setup() {
|
|
2796
|
-
let e = qe(), t = (e) => this.textureNode.sample(e), n = (e) => this.depthNode.sample(e).x, r = (e) => this.normalNode === null ? Ye(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), i = (e) => this.noiseNode.sample(e), a =
|
|
2797
|
-
let s = t(o).toVar(), c = n(o).toVar(), l = r(o).toVar(), u = s.rgb, d = Ze(o, c, this._cameraProjectionMatrixInverse).toVar(), f = gt(
|
|
2798
|
-
return
|
|
2799
|
-
}), o =
|
|
2800
|
-
let o = n(e).toVar(), s = r(e).toVar(), c = t(e).toVar(), l =
|
|
2801
|
-
return
|
|
2796
|
+
let e = qe(), t = (e) => this.textureNode.sample(e), n = (e) => this.depthNode.sample(e).x, r = (e) => this.normalNode === null ? Ye(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), i = (e) => this.noiseNode.sample(e), a = H(([e, i, a, o]) => {
|
|
2797
|
+
let s = t(o).toVar(), c = n(o).toVar(), l = r(o).toVar(), u = s.rgb, d = Ze(o, c, this._cameraProjectionMatrixInverse).toVar(), f = gt(R(N(i, l).toVar(), 0), this.normalPhi).toVar(), p = z(j(u).sub(j(e))).toVar(), m = R(V(1).sub(p.div(this.lumaPhi)), 0).toVar(), h = z(N(a.sub(d), i)).toVar(), g = R(V(1).sub(h.div(this.depthPhi)), 0), _ = m.mul(g).mul(f);
|
|
2798
|
+
return L(u.mul(_), _);
|
|
2799
|
+
}), o = H(([e]) => {
|
|
2800
|
+
let o = n(e).toVar(), s = r(e).toVar(), c = t(e).toVar(), l = Bt("vec4");
|
|
2801
|
+
return B(o.greaterThanEqual(1).or(N(s, s).equal(0)), () => {
|
|
2802
2802
|
l.assign(c);
|
|
2803
2803
|
}).Else(() => {
|
|
2804
|
-
let t =
|
|
2804
|
+
let t = M(c.rgb), n = Ze(e, o, this._cameraProjectionMatrixInverse).toConst(), r = Tt(this.noiseNode, 0), u = U(e.x, e.y.oneMinus());
|
|
2805
2805
|
u = u.mul(this._resolution.div(r));
|
|
2806
|
-
let d = i(u).toVar(), f = U(
|
|
2806
|
+
let d = i(u).toVar(), f = U(Kt(d.element(this.index.mod(4).mul(2).mul(zt))), Gt(d.element(this.index.mod(4).mul(2).mul(zt)))), p = it(f.x, f.y.negate(), f.x, f.y), m = V(1).toVar(), h = M(c.rgb).toVar();
|
|
2807
2807
|
dt({
|
|
2808
2808
|
start: Ue(0),
|
|
2809
2809
|
end: Ue(16),
|
|
2810
2810
|
type: "int",
|
|
2811
2811
|
condition: "<"
|
|
2812
2812
|
}, ({ i: r }) => {
|
|
2813
|
-
let i = this._sampleVectors.element(r), o = p.mul(i.xy.mul(
|
|
2813
|
+
let i = this._sampleVectors.element(r), o = p.mul(i.xy.mul(V(1).add(i.z.mul(this.radius.sub(1))))).div(this._resolution), c = a(t, s, n, e.add(o));
|
|
2814
2814
|
h.addAssign(c.xyz), m.addAssign(c.w);
|
|
2815
|
-
}),
|
|
2815
|
+
}), B(m.greaterThan(V(0)), () => {
|
|
2816
2816
|
h.divAssign(m);
|
|
2817
|
-
}), l.assign(
|
|
2817
|
+
}), l.assign(L(h, c.a));
|
|
2818
2818
|
}), l;
|
|
2819
2819
|
});
|
|
2820
|
-
return
|
|
2820
|
+
return H(() => o(e))();
|
|
2821
2821
|
}
|
|
2822
2822
|
dispose() {
|
|
2823
2823
|
super.dispose(), this._noiseTexture.dispose();
|
|
2824
2824
|
}
|
|
2825
2825
|
};
|
|
2826
|
-
function
|
|
2826
|
+
function er(e, t, n) {
|
|
2827
2827
|
let r = [];
|
|
2828
2828
|
for (let a = 0; a < e; a++) {
|
|
2829
2829
|
let o = 2 * Math.PI * t * a / e, s = (a / (e - 1)) ** n;
|
|
@@ -2831,7 +2831,7 @@ function $n(e, t, n) {
|
|
|
2831
2831
|
}
|
|
2832
2832
|
return r;
|
|
2833
2833
|
}
|
|
2834
|
-
function
|
|
2834
|
+
function tr(e = 64) {
|
|
2835
2835
|
let t = new he(), n = e * e * 4, r = new Uint8Array(n);
|
|
2836
2836
|
for (let n = 0; n < e; n++) for (let i = 0; i < e; i++) {
|
|
2837
2837
|
let a = n, o = i;
|
|
@@ -2840,12 +2840,12 @@ function er(e = 64) {
|
|
|
2840
2840
|
let i = new m(r, e, e);
|
|
2841
2841
|
return i.wrapS = l, i.wrapT = l, i.needsUpdate = !0, i;
|
|
2842
2842
|
}
|
|
2843
|
-
var
|
|
2843
|
+
var nr = (e, t, n, r) => new $n(pt(e), ot(t), ot(n), r), rr = class e extends tn {
|
|
2844
2844
|
static {
|
|
2845
2845
|
this.passId = "SsgiRenderPass";
|
|
2846
2846
|
}
|
|
2847
2847
|
constructor(t) {
|
|
2848
|
-
super(), this.passId = e.passId, this.sliceCount =
|
|
2848
|
+
super(), this.passId = e.passId, this.sliceCount = F(t.sliceCount, "uint"), this.stepCount = F(t.stepCount, "uint"), this.radius = F(t.radius), this.expFactor = F(t.expFactor), this.thickness = F(t.thickness), this.backfaceLighting = F(t.backfaceLighting), this.aoIntensity = F(t.aoIntensity), this.giIntensity = F(t.giIntensity), this.useLinearThickness = F(t.useLinearThickness), this.useScreenSpaceSampling = F(t.useScreenSpaceSampling), this.giDenoiseRadius = F(t.giDenoiseRadius), this.aoDenoiseRadius = F(t.aoDenoiseRadius), this.useTemporalFiltering = t.useTemporalFiltering;
|
|
2849
2849
|
}
|
|
2850
2850
|
updatePerformanceParameters(e) {
|
|
2851
2851
|
this.sliceCount.value = e.sliceCount, this.stepCount.value = e.stepCount;
|
|
@@ -2855,19 +2855,19 @@ var tr = (e, t, n, r) => new Qn(pt(e), ot(t), ot(n), r), nr = class e extends en
|
|
|
2855
2855
|
n.add(this.sliceCount, "value", 1, 4, 1).name("slice count").onChange(() => t()), n.add(this.stepCount, "value", 1, 32, 1).name("step count").onChange(() => t()), n.add(this.radius, "value", 1, 25).name("radius").onChange(() => t()), n.add(this.expFactor, "value", 1, 3).name("exp factor").onChange(() => t()), n.add(this.thickness, "value", .01, 10).name("thickness").onChange(() => t()), n.add(this.backfaceLighting, "value", 0, 1).name("backface lighting").onChange(() => t()), n.add(this.aoIntensity, "value", 0, 4).name("AO intensity").onChange(() => t()), n.add(this.giIntensity, "value", 0, 100).name("GI intensity").onChange(() => t()), n.add(this.useLinearThickness, "value").name("use linear thickness").onChange(() => t()), n.add(this.useScreenSpaceSampling, "value").name("use screen-space sampling").onChange(() => t()), n.add(this.aoDenoiseRadius, "value", 0, 20).name("AO denoise radius").onChange(() => t()), n.add(this.giDenoiseRadius, "value", 0, 20).name("GI denoise radius").onChange(() => t());
|
|
2856
2856
|
}
|
|
2857
2857
|
assemble(e, t, n, r, i) {
|
|
2858
|
-
if (!(r instanceof
|
|
2859
|
-
let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), l = St((e) => Be(c.sample(e))), u =
|
|
2858
|
+
if (!(r instanceof D) || this.sliceCount.value === 0 || this.stepCount.value === 0) return t;
|
|
2859
|
+
let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), l = St((e) => Be(c.sample(e))), u = Qn(a, s, l, r);
|
|
2860
2860
|
u.sliceCount = this.sliceCount, u.stepCount = this.stepCount, u.radius = this.radius, u.expFactor = this.expFactor, u.thickness = this.thickness, u.backfaceLighting = this.backfaceLighting, u.aoIntensity = this.aoIntensity, u.giIntensity = this.giIntensity, u.useLinearThickness = this.useLinearThickness, u.useScreenSpaceSampling = this.useScreenSpaceSampling, u.useTemporalFiltering = this.useTemporalFiltering;
|
|
2861
|
-
let d = u.getGINode(), f = u.getAONode(), p =
|
|
2861
|
+
let d = u.getGINode(), f = u.getAONode(), p = nr(d, s, l, r);
|
|
2862
2862
|
p.radius = this.giDenoiseRadius;
|
|
2863
|
-
let m =
|
|
2863
|
+
let m = nr(f, s, l, r);
|
|
2864
2864
|
m.radius = this.aoDenoiseRadius;
|
|
2865
|
-
let h =
|
|
2866
|
-
return h.name = "Ssgi Composite", i === "ao only" ?
|
|
2865
|
+
let h = L(Mt(a.rgb.mul(m.r), o.rgb.mul(p.rgb)), a.a);
|
|
2866
|
+
return h.name = "Ssgi Composite", i === "ao only" ? L(M(f.r), 1) : i === "gi only" ? L(d.rgb, 1) : i === "denoised ao only" ? L(M(m.r), 1) : i === "denoised gi only" ? L(p.rgb, 1) : i === "direct lighting only" ? a : i === "without denoise" ? L(Mt(a.rgb.mul(f.r), o.rgb.mul(d.rgb)), a.a) : h;
|
|
2867
2867
|
}
|
|
2868
|
-
},
|
|
2869
|
-
let i = r.rgb.add(n.rgb).mul(.5).toConst(), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7).toConst(), o = t.sub(
|
|
2870
|
-
return c.greaterThan(1).select(
|
|
2868
|
+
}, ir = H(([e, t, n, r]) => {
|
|
2869
|
+
let i = r.rgb.add(n.rgb).mul(.5).toConst(), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7).toConst(), o = t.sub(L(i, e.a)).toConst(), s = o.xyz.div(a).toConst().abs().toConst(), c = R(s.x, s.y, s.z).toConst();
|
|
2870
|
+
return c.greaterThan(1).select(L(i, e.a).add(o.div(c)), t);
|
|
2871
2871
|
}).setLayout({
|
|
2872
2872
|
name: "clipAABB",
|
|
2873
2873
|
type: "vec4",
|
|
@@ -2889,9 +2889,9 @@ var tr = (e, t, n, r) => new Qn(pt(e), ot(t), ot(n), r), nr = class e extends en
|
|
|
2889
2889
|
type: "vec4"
|
|
2890
2890
|
}
|
|
2891
2891
|
]
|
|
2892
|
-
}),
|
|
2893
|
-
let r = e.mul(
|
|
2894
|
-
return Mt(e.mul(s), t.mul(c)).div(
|
|
2892
|
+
}), ar = H(([e, t, n]) => {
|
|
2893
|
+
let r = e.mul(V(1).div(R(e.r, e.g, e.b).add(1))).toConst(), i = t.mul(V(1).div(R(t.r, t.g, t.b).add(1))).toConst(), a = j(r.rgb).toConst(), o = j(i.rgb).toConst(), s = n.div(a.add(1)).toConst(), c = n.oneMinus().div(o.add(1)).toConst();
|
|
2894
|
+
return Mt(e.mul(s), t.mul(c)).div(R(s.add(c), 1e-5));
|
|
2895
2895
|
}).setLayout({
|
|
2896
2896
|
name: "flickerReduction",
|
|
2897
2897
|
type: "vec4",
|
|
@@ -2909,54 +2909,54 @@ var tr = (e, t, n, r) => new Qn(pt(e), ot(t), ot(n), r), nr = class e extends en
|
|
|
2909
2909
|
type: "float"
|
|
2910
2910
|
}
|
|
2911
2911
|
]
|
|
2912
|
-
}),
|
|
2913
|
-
let i =
|
|
2912
|
+
}), or = H(([e, t, n], r) => {
|
|
2913
|
+
let i = V(2).toVar(), a = U(0).toVar(), o = V(-1).toVar();
|
|
2914
2914
|
for (let s = -1; s <= 1; ++s) for (let c = -1; c <= 1; ++c) {
|
|
2915
2915
|
let l = t.add(U(s, c)).toVar(), u = e.load(l).r;
|
|
2916
|
-
r.renderer.reversedDepthBuffer && (u = u.oneMinus()), r.renderer.logarithmicDepthBuffer && (u =
|
|
2916
|
+
r.renderer.reversedDepthBuffer && (u = u.oneMinus()), r.renderer.logarithmicDepthBuffer && (u = ur(u, n)), u = u.toVar(), B(u.lessThan(i), () => {
|
|
2917
2917
|
i.assign(u), a.assign(l);
|
|
2918
|
-
}),
|
|
2918
|
+
}), B(u.greaterThan(o), () => {
|
|
2919
2919
|
o.assign(u);
|
|
2920
2920
|
});
|
|
2921
2921
|
}
|
|
2922
|
-
return
|
|
2923
|
-
}),
|
|
2922
|
+
return lr(i, a, o);
|
|
2923
|
+
}), sr = H(([e, t, n, r, i, a, o], s) => {
|
|
2924
2924
|
let c = e.sample(t).r;
|
|
2925
|
-
s.renderer.logarithmicDepthBuffer && (c =
|
|
2926
|
-
let l = Ze(t, c, n), u = r.mul(
|
|
2925
|
+
s.renderer.logarithmicDepthBuffer && (c = ur(c, a));
|
|
2926
|
+
let l = Ze(t, c, n), u = r.mul(L(l, 1)).xyz, d = i.mul(L(u, 1)).z;
|
|
2927
2927
|
return o.isOrthographicCamera ? rt(d, a.x, a.y) : at(d, a.x, a.y);
|
|
2928
2928
|
});
|
|
2929
|
-
function
|
|
2930
|
-
return Array.from({ length: e }, (e, t) => [
|
|
2929
|
+
function cr(e) {
|
|
2930
|
+
return Array.from({ length: e }, (e, t) => [dr(t + 1, 2), dr(t + 1, 3)]);
|
|
2931
2931
|
}
|
|
2932
|
-
var
|
|
2932
|
+
var lr = ze({
|
|
2933
2933
|
closestDepth: "float",
|
|
2934
2934
|
closestPositionTexel: "vec2",
|
|
2935
2935
|
farthestDepth: "float"
|
|
2936
|
-
}),
|
|
2936
|
+
}), ur = (e, t) => {
|
|
2937
2937
|
let { x: n, y: r } = t;
|
|
2938
|
-
return at(
|
|
2938
|
+
return at(Yt(e, n, r), n, r);
|
|
2939
2939
|
};
|
|
2940
|
-
function
|
|
2940
|
+
function dr(e, t) {
|
|
2941
2941
|
let n = 1, r = 0;
|
|
2942
2942
|
for (; e > 0;) n /= t, r += e % t * n, e = Math.floor(e / t);
|
|
2943
2943
|
return r;
|
|
2944
2944
|
}
|
|
2945
2945
|
//#endregion
|
|
2946
2946
|
//#region ../../node_modules/three/examples/jsm/tsl/display/TRAANode.js
|
|
2947
|
-
var
|
|
2947
|
+
var fr = /* @__PURE__ */ new Ae(), pr = /* @__PURE__ */ new d(), mr, hr = class extends we {
|
|
2948
2948
|
static get type() {
|
|
2949
2949
|
return "TRAANode";
|
|
2950
2950
|
}
|
|
2951
2951
|
constructor(e, t, n, r) {
|
|
2952
|
-
super("vec4"), this.isTRAANode = !0, this.updateBeforeType =
|
|
2952
|
+
super("vec4"), this.isTRAANode = !0, this.updateBeforeType = De.FRAME, this.beautyNode = e, this.depthNode = t, this.velocityNode = n, this.camera = r, this.depthThreshold = 5e-4, this.edgeDepthDiff = .001, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = F(new d()), this._historyRenderTarget = new c(1, 1, {
|
|
2953
2953
|
depthBuffer: !1,
|
|
2954
|
-
type:
|
|
2954
|
+
type: te,
|
|
2955
2955
|
depthTexture: new _()
|
|
2956
2956
|
}), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new c(1, 1, {
|
|
2957
2957
|
depthBuffer: !1,
|
|
2958
|
-
type:
|
|
2959
|
-
}), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new k(), this._resolveMaterial.name = "TRAA.resolve", this._textureNode = Ct(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new x(), this._cameraNearFar =
|
|
2958
|
+
type: te
|
|
2959
|
+
}), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new k(), this._resolveMaterial.name = "TRAA.resolve", this._textureNode = Ct(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new x(), this._cameraNearFar = F(new d()), this._cameraWorldMatrix = F(new x()), this._cameraWorldMatrixInverse = F(new x()), this._cameraProjectionMatrixInverse = F(new x()), this._previousCameraWorldMatrix = F(new x()), this._previousCameraProjectionMatrixInverse = F(new x()), this._previousDepthNode = I(new _(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
|
|
2960
2960
|
}
|
|
2961
2961
|
getTextureNode() {
|
|
2962
2962
|
return this._textureNode;
|
|
@@ -2973,34 +2973,34 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
2973
2973
|
offsetY: 0,
|
|
2974
2974
|
width: e,
|
|
2975
2975
|
height: t
|
|
2976
|
-
}, r =
|
|
2976
|
+
}, r = gr[this._jitterIndex];
|
|
2977
2977
|
this.camera.setViewOffset(n.fullWidth, n.fullHeight, n.offsetX + r[0] - .5, n.offsetY + r[1] - .5, n.width, n.height);
|
|
2978
2978
|
}
|
|
2979
2979
|
clearViewOffset() {
|
|
2980
|
-
this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %=
|
|
2980
|
+
this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= gr.length;
|
|
2981
2981
|
}
|
|
2982
2982
|
updateBefore(e) {
|
|
2983
2983
|
let { renderer: t } = e;
|
|
2984
2984
|
this._previousCameraWorldMatrix.value.copy(this._cameraWorldMatrix.value), this._previousCameraProjectionMatrixInverse.value.copy(this._cameraProjectionMatrixInverse.value), this._cameraNearFar.value.set(this.camera.near, this.camera.far), this._cameraWorldMatrix.value.copy(this.camera.matrixWorld), this._cameraWorldMatrixInverse.value.copy(this.camera.matrixWorldInverse), this._cameraProjectionMatrixInverse.value.copy(this.camera.projectionMatrixInverse);
|
|
2985
2985
|
let n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, r = n.texture.width, i = n.texture.height;
|
|
2986
|
-
this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1),
|
|
2986
|
+
this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), mr = A.resetRendererState(t, mr);
|
|
2987
2987
|
let a = this._historyRenderTarget.width !== r || this._historyRenderTarget.height !== i;
|
|
2988
|
-
this.setSize(r, i), a === !0 && (t.initRenderTarget(this._historyRenderTarget), t.initRenderTarget(this._resolveRenderTarget), t.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), t.setRenderTarget(this._resolveRenderTarget),
|
|
2989
|
-
let o = t.getDrawingBufferSize(
|
|
2988
|
+
this.setSize(r, i), a === !0 && (t.initRenderTarget(this._historyRenderTarget), t.initRenderTarget(this._resolveRenderTarget), t.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), t.setRenderTarget(this._resolveRenderTarget), fr.material = this._resolveMaterial, fr.name = "TRAA", fr.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
|
|
2989
|
+
let o = t.getDrawingBufferSize(pr);
|
|
2990
2990
|
if (this._historyRenderTarget.height === o.height && this._historyRenderTarget.width === o.width) {
|
|
2991
2991
|
let e = this.depthNode.value;
|
|
2992
2992
|
t.copyTextureToTexture(e, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
|
|
2993
2993
|
}
|
|
2994
|
-
A.restoreRendererState(t,
|
|
2994
|
+
A.restoreRendererState(t, mr);
|
|
2995
2995
|
}
|
|
2996
2996
|
setup(e) {
|
|
2997
2997
|
e.renderPipeline && !e.context.renderPipelineState.viewOffsetOwner && (e.context.renderPipelineState.viewOffsetOwner = this, this._needsPostProcessingSync = !0, ht(() => {
|
|
2998
|
-
let t = e.renderer.getDrawingBufferSize(
|
|
2998
|
+
let t = e.renderer.getDrawingBufferSize(pr);
|
|
2999
2999
|
this.setViewOffset(t.width, t.height);
|
|
3000
3000
|
}), Ft(() => {
|
|
3001
3001
|
this.clearViewOffset();
|
|
3002
3002
|
})), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = S), e.context.velocity === void 0 ? this._velocityNode = He : this._velocityNode = e.context.velocity;
|
|
3003
|
-
let t =
|
|
3003
|
+
let t = H(([e, t, n, r]) => {
|
|
3004
3004
|
let i = [
|
|
3005
3005
|
[-1, -1],
|
|
3006
3006
|
[-1, 1],
|
|
@@ -3015,10 +3015,10 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3015
3015
|
let r = this.beautyNode.offset(et(t, n)).load(e).max(0);
|
|
3016
3016
|
a.addAssign(r), o.addAssign(r.pow2());
|
|
3017
3017
|
}
|
|
3018
|
-
let s =
|
|
3019
|
-
return
|
|
3020
|
-
}), n =
|
|
3021
|
-
let n = e.mul(t).fract().abs(), r =
|
|
3018
|
+
let s = V(i.length + 1), c = a.div(s), l = o.div(s).sub(c.pow2()).max(0).sqrt().mul(r), u = c.sub(l), d = c.add(l);
|
|
3019
|
+
return ir(c.clamp(u, d), n, u, d);
|
|
3020
|
+
}), n = H(([e, t]) => {
|
|
3021
|
+
let n = e.mul(t).fract().abs(), r = R(n, n.oneMinus());
|
|
3022
3022
|
return r.x.mul(r.y).oneMinus().div(.75);
|
|
3023
3023
|
}).setLayout({
|
|
3024
3024
|
name: "subpixelCorrection",
|
|
@@ -3030,16 +3030,16 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3030
3030
|
name: "textureSize",
|
|
3031
3031
|
type: "ivec2"
|
|
3032
3032
|
}]
|
|
3033
|
-
}), r =
|
|
3034
|
-
let e = qe(), i = this.beautyNode.size(), a = e.mul(i), o =
|
|
3035
|
-
return this.useSubpixelCorrection && b.addAssign(n(u, i).mul(.25)), b.assign(g.select(b.add(y).saturate(), 1)),
|
|
3033
|
+
}), r = I(this._historyRenderTarget.texture), i = H(() => {
|
|
3034
|
+
let e = qe(), i = this.beautyNode.size(), a = e.mul(i), o = or(this.depthNode, a, this._cameraNearFar), s = o.get("closestDepth"), c = o.get("closestPositionTexel"), l = o.get("farthestDepth"), u = this.velocityNode.load(c).xy.mul(U(.5, -.5)), d = e.sub(u), f = sr(this._previousDepthNode, d, this._previousCameraProjectionMatrixInverse, this._previousCameraWorldMatrix, this._cameraWorldMatrixInverse, this._cameraNearFar, this.camera), p = d.greaterThanEqual(0).all().and(d.lessThanEqual(1).all()), m = l.sub(s).greaterThan(this.edgeDepthDiff), h = s.sub(f).greaterThan(this.depthThreshold), g = p.and(m.or(h.not())), _ = this.beautyNode.sample(e), v = r.sample(d), y = e.sub(d).mul(i).length().div(this.maxVelocityLength).saturate(), b = V(.05).toVar();
|
|
3035
|
+
return this.useSubpixelCorrection && b.addAssign(n(u, i).mul(.25)), b.assign(g.select(b.add(y).saturate(), 1)), ar(_, t(a, _, v, Ge(.5, 1, y.oneMinus().pow2())), b);
|
|
3036
3036
|
});
|
|
3037
|
-
return this._resolveMaterial.contextNode =
|
|
3037
|
+
return this._resolveMaterial.contextNode = qt(e.getSharedContext()), this._resolveMaterial.colorNode = i(), this._textureNode;
|
|
3038
3038
|
}
|
|
3039
3039
|
dispose() {
|
|
3040
3040
|
super.dispose(), this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
|
|
3041
3041
|
}
|
|
3042
|
-
},
|
|
3042
|
+
}, gr = /* @__PURE__ */ cr(32), _r = (e, t, n, r) => new hr(pt(e), t, n, r), vr = class e extends tn {
|
|
3043
3043
|
constructor(...t) {
|
|
3044
3044
|
super(...t), this.passId = e.passId;
|
|
3045
3045
|
}
|
|
@@ -3047,7 +3047,7 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3047
3047
|
this.passId = "TraaRenderPass";
|
|
3048
3048
|
}
|
|
3049
3049
|
assemble(e, t, n, r, i) {
|
|
3050
|
-
return r instanceof
|
|
3050
|
+
return r instanceof D ? _r(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), r) : t;
|
|
3051
3051
|
}
|
|
3052
3052
|
addParametersToGUI(e, t) {}
|
|
3053
3053
|
}, Q = {
|
|
@@ -3064,7 +3064,7 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3064
3064
|
Q.MEDIUM,
|
|
3065
3065
|
Q.LOW,
|
|
3066
3066
|
Q.LOWEST
|
|
3067
|
-
],
|
|
3067
|
+
], yr = $[0], br = $[$.length - 1], xr = Q.HIGHEST, Sr = new Map([
|
|
3068
3068
|
[Q.HIGHEST, {
|
|
3069
3069
|
maxPixelRatio: 1.5,
|
|
3070
3070
|
ssgiPerformanceParameters: {
|
|
@@ -3107,7 +3107,7 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3107
3107
|
stepCount: 0
|
|
3108
3108
|
}
|
|
3109
3109
|
}]
|
|
3110
|
-
]),
|
|
3110
|
+
]), Cr = [
|
|
3111
3111
|
{
|
|
3112
3112
|
min: 70,
|
|
3113
3113
|
max: Infinity,
|
|
@@ -3138,16 +3138,16 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3138
3138
|
max: 19,
|
|
3139
3139
|
value: Q.LOWEST
|
|
3140
3140
|
}
|
|
3141
|
-
],
|
|
3141
|
+
], wr = (e) => Cr.find((t) => e >= t.min && e <= t.max).value, Tr = class {
|
|
3142
3142
|
constructor(e) {
|
|
3143
|
-
this.qualityLevel =
|
|
3143
|
+
this.qualityLevel = xr, this.qualityMap = Sr, this.fpsCounter = new xe(), this.applyQualityParametersCallback = e;
|
|
3144
3144
|
}
|
|
3145
3145
|
getQualityLevel() {
|
|
3146
3146
|
return this.qualityLevel;
|
|
3147
3147
|
}
|
|
3148
3148
|
manageQualitySettings(e, t) {
|
|
3149
3149
|
this.fpsCounter.update();
|
|
3150
|
-
let n = this.fpsCounter.getFps(), r = n > 0 && n < e && this.qualityLevel !==
|
|
3150
|
+
let n = this.fpsCounter.getFps(), r = n > 0 && n < e && this.qualityLevel !== br, i = n > t && this.qualityLevel !== yr, a = r ? "decrement" : i ? "increment" : void 0;
|
|
3151
3151
|
if (a === void 0) {
|
|
3152
3152
|
this.qualityChangePendingSince = void 0, this.qualityChangePendingDirection = void 0;
|
|
3153
3153
|
return;
|
|
@@ -3187,29 +3187,29 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3187
3187
|
async autoDetectInitialQualityLevel() {
|
|
3188
3188
|
let { getGPUTier: e } = await import("./dist-Blgk0vU0.mjs"), t = await e({ benchmarksURL: "./benchmarks" });
|
|
3189
3189
|
if (!t || !t.fps) {
|
|
3190
|
-
console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel =
|
|
3190
|
+
console.info("Could not autodetect performance - no benchmark for graphics hardware. Defaulting to HIGHEST"), this.qualityLevel = xr;
|
|
3191
3191
|
return;
|
|
3192
3192
|
}
|
|
3193
|
-
this.qualityLevel =
|
|
3193
|
+
this.qualityLevel = wr(t.fps), console.info(`The initial quality setting has been set to ${this.qualityLevel} based on a benchmark performance of ${t.fps}fps of the graphics hardware.`);
|
|
3194
3194
|
}
|
|
3195
|
-
},
|
|
3195
|
+
}, Er = class e extends tn {
|
|
3196
3196
|
static {
|
|
3197
3197
|
this.passId = "FogRenderPass";
|
|
3198
3198
|
}
|
|
3199
3199
|
constructor(t) {
|
|
3200
|
-
super(), this.passId = e.passId, this.sceneWithFog = void 0, this.transparentObjectsDepthPass = void 0, this.fogColor =
|
|
3200
|
+
super(), this.passId = e.passId, this.sceneWithFog = void 0, this.transparentObjectsDepthPass = void 0, this.fogColor = F(new ue(t.color)), this.fogNearBlend = F(t.nearBlend), this.fogFarBlend = F(t.farBlend), this.depthOverrideMaterial = new ce({ side: 2 });
|
|
3201
3201
|
}
|
|
3202
3202
|
assemble(e, t, n, r, i) {
|
|
3203
|
-
if (!(r instanceof
|
|
3204
|
-
let a = e.getTextureNode("depth"), o = this.getTransparentObjectsDepthPassTexture(n, r), s = Ve(a.r, o.r), c =
|
|
3205
|
-
return this.addSceneFog(n, d, u), Ge(
|
|
3203
|
+
if (!(r instanceof D) || i === "no fog" || i === "depth") return this.removeSceneFog(), t;
|
|
3204
|
+
let a = e.getTextureNode("depth"), o = this.getTransparentObjectsDepthPassTexture(n, r), s = Ve(a.r, o.r), c = F(r.projectionMatrixInverse), l = F(r.matrixWorld), u = Ve(F(r.far).onRenderUpdate(() => r.far), 50).sub(this.fogFarBlend), d = u.sub(this.fogNearBlend), f = L(Ht.x.mul(2).sub(1), Ht.y.mul(2).sub(1), s, 1), p = c.mul(f), m = p.xyz.div(p.w), h = l.mul(L(m, 1)).xyz.xz.length(), g = u.sub(h).div(u.sub(d)).clamp(0, 1);
|
|
3205
|
+
return this.addSceneFog(n, d, u), Ge(L(this.fogColor, 1), t, g);
|
|
3206
3206
|
}
|
|
3207
3207
|
addSceneFog(e, t, n) {
|
|
3208
3208
|
let r = It.xz.length(), i = n.sub(r).div(n.sub(t)).clamp(0, 1).oneMinus();
|
|
3209
3209
|
e.fogNode = wt(this.fogColor, i), this.sceneWithFog = e;
|
|
3210
3210
|
}
|
|
3211
3211
|
getTransparentObjectsDepthPassTexture(e, t) {
|
|
3212
|
-
return this.transparentObjectsDepthPass?.dispose(), this.transparentObjectsDepthPass =
|
|
3212
|
+
return this.transparentObjectsDepthPass?.dispose(), this.transparentObjectsDepthPass = Ut(e, t), this.transparentObjectsDepthPass.opaque = !1, this.transparentObjectsDepthPass.overrideMaterial = this.depthOverrideMaterial, this.transparentObjectsDepthPass.getTextureNode("depth");
|
|
3213
3213
|
}
|
|
3214
3214
|
removeSceneFog() {
|
|
3215
3215
|
this.sceneWithFog &&= (this.sceneWithFog.fogNode = null, void 0), this.transparentObjectsDepthPass?.dispose(), this.transparentObjectsDepthPass = void 0;
|
|
@@ -3220,7 +3220,7 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3220
3220
|
this.fogColor.value.set(e), t();
|
|
3221
3221
|
});
|
|
3222
3222
|
}
|
|
3223
|
-
},
|
|
3223
|
+
}, Dr = class e extends tn {
|
|
3224
3224
|
constructor(...t) {
|
|
3225
3225
|
super(...t), this.passId = e.passId;
|
|
3226
3226
|
}
|
|
@@ -3228,10 +3228,10 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3228
3228
|
this.passId = "DebugRenderPass";
|
|
3229
3229
|
}
|
|
3230
3230
|
assemble(e, t, n, r, i) {
|
|
3231
|
-
return i === "depth" ?
|
|
3231
|
+
return i === "depth" ? L(M(e.getTextureNode("depth").r), 1) : t;
|
|
3232
3232
|
}
|
|
3233
3233
|
addParametersToGUI(e, t) {}
|
|
3234
|
-
},
|
|
3234
|
+
}, Or = {
|
|
3235
3235
|
[O.NONE]: 0,
|
|
3236
3236
|
[O.LINEAR]: 1,
|
|
3237
3237
|
[O.REINHARD]: 2,
|
|
@@ -3239,9 +3239,9 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3239
3239
|
[O.ACES_FILMIC]: 4,
|
|
3240
3240
|
[O.AGX]: 6,
|
|
3241
3241
|
[O.NEUTRAL]: 7
|
|
3242
|
-
},
|
|
3242
|
+
}, kr = class extends be {
|
|
3243
3243
|
constructor(e, t, n, r, i = n) {
|
|
3244
|
-
super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.qualityManager = new
|
|
3244
|
+
super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.qualityManager = new Tr(this.applyQualityParameters.bind(this)), this.freezeFrames = 0, this.freezeRenderTarget = new c(), this.debugRenderPass = new Dr(), this.renderPipeline = new Ne(t), this.applyToneMappingConfig(), this.enableDefaultRenderPasses(n, r, i), this._initData.webGpuConfig.autoDetectQualityLevel ? this.qualityManager.autoDetectInitialQualityLevel().then(() => this.qualityManager.applyCurrentQualityLevel(0)) : this.qualityManager.applyCurrentQualityLevel(0);
|
|
3245
3245
|
}
|
|
3246
3246
|
enableDefaultRenderPasses(e, t, n) {
|
|
3247
3247
|
let r = this._initData.webGpuConfig.fog.enabled, i = this._initData.transparentBackground;
|
|
@@ -3268,7 +3268,7 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3268
3268
|
switchToPlanner(e) {
|
|
3269
3269
|
super.switchToPlanner(e);
|
|
3270
3270
|
let t = this._initData.webGpuConfig.sky.enabled;
|
|
3271
|
-
this._webGpuGroundShadowReflection.setFloorVisible(t), this._webGpuGroundShadowReflection.setTopLightVisible(!t), this._webGpuSkyContainer.setVisible(t), this._skyStateTracker.notifyEnteredPlanner(), this.disableFogPass(), this.passNeedsReassembly = !0;
|
|
3271
|
+
this._webGpuGroundShadowReflection.setFloorVisible(t), this._webGpuGroundShadowReflection.setTopLightVisible(!t && e !== Se.Mode2D), this._webGpuSkyContainer.setVisible(t), this._skyStateTracker.notifyEnteredPlanner(), this.disableFogPass(), this.passNeedsReassembly = !0;
|
|
3272
3272
|
}
|
|
3273
3273
|
highlightObjects(e) {
|
|
3274
3274
|
this.getOutlinePassOrUndefined()?.highlightObjects(e);
|
|
@@ -3285,7 +3285,7 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3285
3285
|
this.renderer.setRenderTarget(this.freezeRenderTarget), this.renderPipeline.render(), this.renderer.setRenderTarget(e);
|
|
3286
3286
|
}
|
|
3287
3287
|
updateCameraProjectionMatrix(e) {
|
|
3288
|
-
(e instanceof r || e instanceof
|
|
3288
|
+
(e instanceof r || e instanceof D) && e.updateProjectionMatrix();
|
|
3289
3289
|
}
|
|
3290
3290
|
assembleRenderPasses(e, t) {
|
|
3291
3291
|
let n = Pt(e, t), r = n;
|
|
@@ -3306,7 +3306,7 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3306
3306
|
this.isConfiguratorMode && this._webGpuGroundShadowReflection.setReceiveShadow(e);
|
|
3307
3307
|
}
|
|
3308
3308
|
enableOutline(e, t) {
|
|
3309
|
-
this.getOutlinePassOrUndefined() || this.addRenderPass(new
|
|
3309
|
+
this.getOutlinePassOrUndefined() || this.addRenderPass(new nn({
|
|
3310
3310
|
selectedObjects: [],
|
|
3311
3311
|
visibleEdgeColor: e,
|
|
3312
3312
|
hiddenEdgeColor: t,
|
|
@@ -3316,13 +3316,13 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3316
3316
|
}));
|
|
3317
3317
|
}
|
|
3318
3318
|
getOutlinePassOrUndefined() {
|
|
3319
|
-
let e = this.renderPasses.get(
|
|
3320
|
-
if (e && e instanceof
|
|
3319
|
+
let e = this.renderPasses.get(nn.passId);
|
|
3320
|
+
if (e && e instanceof nn) return e;
|
|
3321
3321
|
}
|
|
3322
3322
|
enableSsgiPass(e) {
|
|
3323
|
-
if (this.renderPasses.get(
|
|
3323
|
+
if (this.renderPasses.get(rr.passId)) return;
|
|
3324
3324
|
let t = this._initData.webGpuConfig.ssgi;
|
|
3325
|
-
this.addRenderPass(new
|
|
3325
|
+
this.addRenderPass(new rr({
|
|
3326
3326
|
sliceCount: 2,
|
|
3327
3327
|
stepCount: 12,
|
|
3328
3328
|
radius: 8,
|
|
@@ -3339,20 +3339,20 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3339
3339
|
}));
|
|
3340
3340
|
}
|
|
3341
3341
|
enableTraaPass() {
|
|
3342
|
-
this.renderPasses.get(
|
|
3342
|
+
this.renderPasses.get(vr.passId) || this.addRenderPass(new vr());
|
|
3343
3343
|
}
|
|
3344
3344
|
enableFogPass() {
|
|
3345
|
-
if (this.renderPasses.get(
|
|
3345
|
+
if (this.renderPasses.get(Er.passId)) return;
|
|
3346
3346
|
let e = this._initData.webGpuConfig.fog;
|
|
3347
|
-
this.addRenderPass(new
|
|
3347
|
+
this.addRenderPass(new Er({
|
|
3348
3348
|
color: this._initData.colors.DEFAULT_BACKGROUND,
|
|
3349
3349
|
nearBlend: e.nearBlend,
|
|
3350
3350
|
farBlend: e.farBlend
|
|
3351
3351
|
}));
|
|
3352
3352
|
}
|
|
3353
3353
|
disableFogPass() {
|
|
3354
|
-
let e = this.renderPasses.get(
|
|
3355
|
-
!e || !(e instanceof
|
|
3354
|
+
let e = this.renderPasses.get(Er.passId);
|
|
3355
|
+
!e || !(e instanceof Er) || (e.removeSceneFog(), this.renderPasses.delete(Er.passId));
|
|
3356
3356
|
}
|
|
3357
3357
|
applyQualityParameters(e, t) {
|
|
3358
3358
|
this.freezeFrames = Math.max(t, this.freezeFrames);
|
|
@@ -3360,17 +3360,17 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3360
3360
|
this.renderer.setPixelRatio(Math.min(n, e.maxPixelRatio)), this.getSsgiPassOrUndefined()?.updatePerformanceParameters(e.ssgiPerformanceParameters), this.passNeedsReassembly = !0;
|
|
3361
3361
|
}
|
|
3362
3362
|
getSsgiPassOrUndefined() {
|
|
3363
|
-
let e = this.renderPasses.get(
|
|
3364
|
-
if (e && e instanceof
|
|
3363
|
+
let e = this.renderPasses.get(rr.passId);
|
|
3364
|
+
if (e && e instanceof rr) return e;
|
|
3365
3365
|
}
|
|
3366
3366
|
setShadingType(e) {
|
|
3367
3367
|
e !== ge.DEFAULT && console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
|
|
3368
3368
|
}
|
|
3369
3369
|
showGUI(e) {
|
|
3370
|
-
if (this.renderer.inspector instanceof
|
|
3370
|
+
if (this.renderer.inspector instanceof Un) return;
|
|
3371
3371
|
let t = document.createElement("style");
|
|
3372
3372
|
t.innerText = ".profiler-toggle,\n .profiler-mini-panel {\n left: 15px;\n right: auto !important;\n }", document.head.appendChild(t);
|
|
3373
|
-
let n = new
|
|
3373
|
+
let n = new Un();
|
|
3374
3374
|
this.renderer.inspector = n, this._domHelper.element?.appendChild(n.domElement), this.addDebugGUI(n, e), this.qualityManager.addGUI(n, e);
|
|
3375
3375
|
let r = n.createParameters("Render Pass Settings");
|
|
3376
3376
|
for (let t of this.renderPasses.values()) t.addParametersToGUI(r, e);
|
|
@@ -3397,7 +3397,7 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3397
3397
|
}
|
|
3398
3398
|
applyToneMappingConfig() {
|
|
3399
3399
|
let { toneMapping: e, toneMappingExposure: t } = this._initData.webGpuConfig;
|
|
3400
|
-
this.renderer.toneMapping =
|
|
3400
|
+
this.renderer.toneMapping = Or[e], this.renderer.toneMappingExposure = t;
|
|
3401
3401
|
}
|
|
3402
3402
|
addToneMappingSettings(e, t) {
|
|
3403
3403
|
let n = e.addFolder("Tone Mapping"), r = {
|
|
@@ -3420,7 +3420,7 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3420
3420
|
}
|
|
3421
3421
|
getOrCreateGUIParameters(e) {
|
|
3422
3422
|
let t = this.renderer.inspector;
|
|
3423
|
-
if (t instanceof
|
|
3423
|
+
if (t instanceof Un) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
|
|
3424
3424
|
throw Error("Inspector GUI is not initialized. Call showGUI() before creating parameter groups.");
|
|
3425
3425
|
}
|
|
3426
3426
|
createAndCacheGUIParameters(e, t) {
|
|
@@ -3428,8 +3428,8 @@ var dr = /* @__PURE__ */ new ke(), fr = /* @__PURE__ */ new d(), pr, mr = class
|
|
|
3428
3428
|
return this.guiParameterGroups.set(t, n), n;
|
|
3429
3429
|
}
|
|
3430
3430
|
};
|
|
3431
|
-
ye([ve, _e("design:type", Object)],
|
|
3431
|
+
ye([ve, _e("design:type", Object)], kr.prototype, "_domHelper", void 0), ye([ve, _e("design:type", Object)], kr.prototype, "_webGpuGroundShadowReflection", void 0), ye([ve, _e("design:type", Object)], kr.prototype, "_webGpuSkyContainer", void 0), ye([ve, _e("design:type", Object)], kr.prototype, "_skyStateTracker", void 0), ye([ve, _e("design:type", Object)], kr.prototype, "_initData", void 0);
|
|
3432
3432
|
//#endregion
|
|
3433
|
-
export {
|
|
3433
|
+
export { kr as RoomleWebGPURenderer };
|
|
3434
3434
|
|
|
3435
|
-
//# sourceMappingURL=roomle-webgpu-renderer-
|
|
3435
|
+
//# sourceMappingURL=roomle-webgpu-renderer-C26OAfkn.mjs.map
|