agentglow 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/chunks/KitScene-CsXvCpWR.js +7320 -0
- package/dist/chunks/index-06NeTpVb.js +53 -0
- package/dist/chunks/{index-B8E_UpEh.js → index-CMyk3b1y.js} +1 -1
- package/dist/chunks/{index-BxZgELLY.js → index-CZCnCMDL.js} +132 -129
- package/dist/chunks/{index-CEd8CHA3.js → index-CaU-znb0.js} +42 -42
- package/dist/chunks/{index-BGWvBQoI.js → index-DS_Ev4sI.js} +169 -169
- package/dist/chunks/{index-DGp3aLoB.js → index-DvmCk82M.js} +39 -39
- package/dist/chunks/{index-CAK2lh3j.js → index-jIBsR1lw.js} +30 -30
- package/dist/chunks/{index-B-GgW6Df.js → index-zAkSg1r8.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/AgentScene.d.ts +8 -1
- package/dist/types/world.d.ts +23 -1
- package/package.json +1 -1
- package/dist/chunks/KitScene-D8qiflCw.js +0 -6804
- package/dist/chunks/index-rhTWZ_I3.js +0 -52
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as v, useContext as L, useMemo as A, Suspense as S, lazy as C } from "react";
|
|
3
|
+
const d = (e) => (e ?? "").trim().replace(/\/+$/, "");
|
|
4
|
+
function M() {
|
|
5
|
+
var t, s;
|
|
6
|
+
const e = typeof location > "u" ? new URLSearchParams() : new URLSearchParams(location.search), n = (a) => e.has(a) && !["0", "false", "no"].includes(e.get(a).toLowerCase());
|
|
7
|
+
return {
|
|
8
|
+
source: d(e.get("source")),
|
|
9
|
+
sim: ((t = e.get("sim")) == null ? void 0 : t.toLowerCase()) === "hf" ? "hf" : n("sim"),
|
|
10
|
+
hud: e.get("hud") === null ? !0 : n("hud"),
|
|
11
|
+
embedded: !1,
|
|
12
|
+
run: ((s = e.get("run")) == null ? void 0 : s.trim()) || void 0,
|
|
13
|
+
clearable: !0
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const f = v(null), k = f.Provider;
|
|
17
|
+
function T() {
|
|
18
|
+
return L(f) ?? M();
|
|
19
|
+
}
|
|
20
|
+
const y = ["neural", "constellation", "orbit", "atom", "flow", "bubblechamber", "fireworks"], H = {
|
|
21
|
+
orbit: { name: "Orbit", tagline: "Agents orbit a graph galaxy; runs are rings, MCP servers are satellites." },
|
|
22
|
+
neural: { name: "Neural", tagline: "A living brain: agents fire as neurons, messages pulse along synapses." },
|
|
23
|
+
flow: { name: "Flow", tagline: "A murmuration: agents condense as eddies out of the current." },
|
|
24
|
+
constellation: { name: "Constellation", tagline: "A night sky: agents are stars linked into constellations as they delegate." },
|
|
25
|
+
atom: { name: "Atom", tagline: "An atom: agents are electrons in shells, subagents jump orbits, LLM calls flash photons." },
|
|
26
|
+
bubblechamber: { name: "Bubble chamber", tagline: "A bubble chamber: agents curl as particle tracks, spawns decay into a V, LLM calls burst bubbles." },
|
|
27
|
+
fireworks: { name: "Fireworks", tagline: "A night show over the water: agents burst as star shells, subagents as secondary bursts, LLM calls crackle." }
|
|
28
|
+
}, E = {
|
|
29
|
+
orbit: () => import("./index-CMyk3b1y.js"),
|
|
30
|
+
neural: () => import("./index-CZCnCMDL.js"),
|
|
31
|
+
flow: () => import("./index-DS_Ev4sI.js"),
|
|
32
|
+
constellation: () => import("./index-jIBsR1lw.js"),
|
|
33
|
+
atom: () => import("./index-zAkSg1r8.js"),
|
|
34
|
+
bubblechamber: () => import("./index-DvmCk82M.js"),
|
|
35
|
+
fireworks: () => import("./index-CaU-znb0.js")
|
|
36
|
+
}, b = /* @__PURE__ */ new Map();
|
|
37
|
+
function x(e) {
|
|
38
|
+
let n = b.get(e);
|
|
39
|
+
return n || b.set(e, n = C(E[e])), n;
|
|
40
|
+
}
|
|
41
|
+
function O({ theme: e = "neural", source: n = "", hud: t = !0, sim: s = !1, scope: a, run: o, token: l, clearable: i = !0, clearedAt: c, style: h, className: u }) {
|
|
42
|
+
const m = y.includes(e) ? e : "neural", p = x(m), g = d(n), w = A(
|
|
43
|
+
() => ({ source: g, sim: s, hud: t, embedded: !0, scope: a || void 0, run: o || void 0, token: l || void 0, clearable: i, clearedAt: c }),
|
|
44
|
+
[g, s, t, a, o, l, i, c]
|
|
45
|
+
);
|
|
46
|
+
return /* @__PURE__ */ r("div", { className: `agentglow-embed${u ? ` ${u}` : ""}`, style: h, "data-theme": m, children: /* @__PURE__ */ r(k, { value: w, children: /* @__PURE__ */ r(S, { fallback: null, children: /* @__PURE__ */ r(p, {}) }) }) });
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
O as A,
|
|
50
|
+
y as T,
|
|
51
|
+
H as a,
|
|
52
|
+
T as u
|
|
53
|
+
};
|
|
@@ -4,7 +4,7 @@ import { EffectComposer as Ne, Bloom as je, Vignette as Ke, Noise as Qe } from "
|
|
|
4
4
|
import { useFrame as K } from "@react-three/fiber";
|
|
5
5
|
import { useRef as A, useMemo as E, useEffect as Je, useState as Xe } from "react";
|
|
6
6
|
import * as t from "three";
|
|
7
|
-
import { h as oe, i as et, T as ae, f as tt, a as H, p as nt, e as ot, l as rt, j as st, s as at, L as Ge, w as G, g as ct, b as it, K as lt, G as ut, c as J, d as Ce, k as pt, m as he, n as ft, o as dt, S as fe, R as ht, q as mt, u as yt, r as gt, t as Oe, v as Pe, x as Mt } from "./KitScene-
|
|
7
|
+
import { h as oe, i as et, T as ae, f as tt, a as H, p as nt, e as ot, l as rt, j as st, s as at, L as Ge, w as G, g as ct, b as it, K as lt, G as ut, c as J, d as Ce, k as pt, m as he, n as ft, o as dt, S as fe, R as ht, q as mt, u as yt, r as gt, t as Oe, v as Pe, x as Mt } from "./KitScene-CsXvCpWR.js";
|
|
8
8
|
var Fe;
|
|
9
9
|
const U = typeof window < "u" && !!((Fe = window.matchMedia) != null && Fe.call(window, "(prefers-reduced-motion: reduce)").matches), Le = Math.PI * 2, Ae = [Math.PI * 0.5, Math.PI * 0.5 + Le / 3, Math.PI * 0.5 + Le * 2 / 3], Ye = et, wt = (e) => (oe(e, 11) - 0.5) * 2.4, Z = {
|
|
10
10
|
/** the galaxy's inner (tilted) group; its matrixWorld includes the kit's side placement + scale */
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var Ye = Object.defineProperty;
|
|
2
2
|
var $e = (e, o, n) => o in e ? Ye(e, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[o] = n;
|
|
3
3
|
var ee = (e, o, n) => $e(e, typeof o != "symbol" ? o + "" : o, n);
|
|
4
|
-
import { jsxs as ne, Fragment as he, jsx as
|
|
4
|
+
import { jsxs as ne, Fragment as he, jsx as p } from "react/jsx-runtime";
|
|
5
5
|
import { Stars as Ze } from "@react-three/drei";
|
|
6
6
|
import { EffectComposer as Qe, Bloom as Je, Vignette as et } from "@react-three/postprocessing";
|
|
7
7
|
import { useFrame as ie, useThree as tt } from "@react-three/fiber";
|
|
8
8
|
import { useRef as L, useMemo as B, useEffect as nt, useState as Le } from "react";
|
|
9
9
|
import * as t from "three";
|
|
10
|
-
import { T as Ne, w as H, a as de, p as ot, e as rt, s as st, y as
|
|
11
|
-
const oe = (e) => e < 0 ? 0 : e > 1 ? 1 : e,
|
|
10
|
+
import { T as Ne, w as H, a as de, p as ot, e as rt, s as st, y as pe, f as _e, L as Oe, j as at, n as it, o as ct, l as lt, m as ut, c as ke, g as ft, z as pt, K as dt, A as mt, B as ht, G as gt, C as vt, R as wt, u as yt, D as bt, E as Mt, d as De, k as St, x as At } from "./KitScene-CsXvCpWR.js";
|
|
11
|
+
const oe = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Ge = (e) => 1 - Math.pow(1 - oe(e), 3), ze = (e) => (e = oe(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2), Ct = (e) => {
|
|
12
12
|
e = oe(e);
|
|
13
13
|
const o = 2.2;
|
|
14
14
|
return 1 + (o + 1) * Math.pow(e - 1, 3) + o * Math.pow(e - 1, 2);
|
|
15
|
-
}, Ve = Object.fromEntries(Object.entries(Ne).map(([e, o]) => [e, new t.Color(o)])),
|
|
15
|
+
}, Ve = Object.fromEntries(Object.entries(Ne).map(([e, o]) => [e, new t.Color(o)])), je = (e) => e === "graph_scout" || e === "records_scout" || e === "data_scout";
|
|
16
16
|
let Se = null;
|
|
17
17
|
function xt() {
|
|
18
18
|
if (Se) return Se;
|
|
@@ -32,19 +32,19 @@ function Vt(e = 64, o = 7) {
|
|
|
32
32
|
for (let s = 0; s <= e; s++) {
|
|
33
33
|
const u = s / e;
|
|
34
34
|
for (let l = 0; l < o; l++) {
|
|
35
|
-
const
|
|
36
|
-
n.push(u, Math.cos(
|
|
35
|
+
const g = l / o * Math.PI * 2;
|
|
36
|
+
n.push(u, Math.cos(g), Math.sin(g));
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
for (let s = 0; s < e; s++)
|
|
40
40
|
for (let u = 0; u < o; u++) {
|
|
41
|
-
const l = s * o + u,
|
|
42
|
-
r.push(l, m,
|
|
41
|
+
const l = s * o + u, g = s * o + (u + 1) % o, m = (s + 1) * o + u, x = (s + 1) * o + (u + 1) % o;
|
|
42
|
+
r.push(l, m, g, g, m, x);
|
|
43
43
|
}
|
|
44
44
|
const a = new t.BufferGeometry();
|
|
45
45
|
return a.setAttribute("position", new t.Float32BufferAttribute(n, 3)), a.setIndex(r), a.boundingSphere = new t.Sphere(new t.Vector3(), 1e4), a;
|
|
46
46
|
}
|
|
47
|
-
const Rt = Vt(),
|
|
47
|
+
const Rt = Vt(), Be = new t.SphereGeometry(1, 32, 24);
|
|
48
48
|
new t.SphereGeometry(1, 40, 28);
|
|
49
49
|
new t.IcosahedronGeometry(1, 1);
|
|
50
50
|
const He = new t.ConeGeometry(1, 1, 14).translate(0, 0.5, 0), Tt = new t.ConeGeometry(1, 1, 6, 1, !0).translate(0, 0.5, 0), zt = (
|
|
@@ -70,7 +70,7 @@ void main(){
|
|
|
70
70
|
/* glsl */
|
|
71
71
|
`
|
|
72
72
|
uniform vec3 uColor; uniform float uOpacity; uniform float uGrow; uniform float uTime; uniform float uSpark; uniform float uFlow;
|
|
73
|
-
uniform float uHead; uniform float uTail; uniform vec3 uHeadColor;
|
|
73
|
+
uniform float uHead; uniform float uTail; uniform vec3 uHeadColor; uniform float uFade;
|
|
74
74
|
varying float vT; varying float vRim;
|
|
75
75
|
void main(){
|
|
76
76
|
if (vT > uGrow) discard;
|
|
@@ -84,7 +84,9 @@ void main(){
|
|
|
84
84
|
}
|
|
85
85
|
// directional flow: soft dashes travelling from start (parent, vT=0) to end (child, vT=1)
|
|
86
86
|
float flow = uFlow * pow(max(0.0, sin((vT * 7.0 - uTime * 0.9) * 3.14159)), 6.0);
|
|
87
|
-
|
|
87
|
+
// brightness taper: full at the start (parent), uFade at the end (child); 1 = even
|
|
88
|
+
float fade = mix(1.0, uFade, vT);
|
|
89
|
+
vec3 col = uColor * uOpacity * (core + spark * 3.5 + tip * 3.0 + flow * 2.2) * fade + uHeadColor * head * (0.6 + vRim);
|
|
88
90
|
gl_FragColor = vec4(col, 1.0);
|
|
89
91
|
}`
|
|
90
92
|
);
|
|
@@ -104,7 +106,8 @@ function Bt(e = "#fff", o = 0.06, n = 0.4) {
|
|
|
104
106
|
uSpark: { value: 0 },
|
|
105
107
|
uHead: { value: -1 },
|
|
106
108
|
uTail: { value: 0.12 },
|
|
107
|
-
uHeadColor: { value: new t.Color(4, 4, 4) }
|
|
109
|
+
uHeadColor: { value: new t.Color(4, 4, 4) },
|
|
110
|
+
uFade: { value: 1 }
|
|
108
111
|
},
|
|
109
112
|
vertexShader: zt,
|
|
110
113
|
fragmentShader: Pt,
|
|
@@ -117,7 +120,7 @@ function ae(e, o, n, r, a) {
|
|
|
117
120
|
const s = 1 - r;
|
|
118
121
|
return a.set(s * s * e.x + 2 * s * r * o.x + r * r * n.x, s * s * e.y + 2 * s * r * o.y + r * r * n.y, s * s * e.z + 2 * s * r * o.z + r * r * n.z);
|
|
119
122
|
}
|
|
120
|
-
function
|
|
123
|
+
function Fe(e, o, n, r) {
|
|
121
124
|
r.copy(e).add(o).multiplyScalar(0.5);
|
|
122
125
|
const a = Math.hypot(r.x, r.y) || 1;
|
|
123
126
|
return r.x += r.x / a * n, r.y += r.y / a * n, r.z += n * 0.9, r;
|
|
@@ -141,8 +144,8 @@ const Te = class Te {
|
|
|
141
144
|
this.n = 0;
|
|
142
145
|
}
|
|
143
146
|
/** Arrow at curve parameter t, pointing toward p2 (dir=+1) or toward p0 (dir=-1). */
|
|
144
|
-
add(o, n, r, a, s, u, l,
|
|
145
|
-
this.n >= this.max || (ae(o, n, r, a, this.a), ae(o, n, r, Math.min(1, Math.max(0, a + 0.02 * s)), this.b), this.d.subVectors(this.b, this.a), !(this.d.lengthSq() < 1e-8) && (this.o.position.copy(this.a), this.o.quaternion.setFromUnitVectors(Te.UP, this.d.normalize()), this.o.scale.set(u * 0.4, u, u * 0.4), this.o.updateMatrix(), this.mesh.setMatrixAt(this.n, this.o.matrix), this.colors[this.n * 3] = l.r *
|
|
147
|
+
add(o, n, r, a, s, u, l, g = 1) {
|
|
148
|
+
this.n >= this.max || (ae(o, n, r, a, this.a), ae(o, n, r, Math.min(1, Math.max(0, a + 0.02 * s)), this.b), this.d.subVectors(this.b, this.a), !(this.d.lengthSq() < 1e-8) && (this.o.position.copy(this.a), this.o.quaternion.setFromUnitVectors(Te.UP, this.d.normalize()), this.o.scale.set(u * 0.4, u, u * 0.4), this.o.updateMatrix(), this.mesh.setMatrixAt(this.n, this.o.matrix), this.colors[this.n * 3] = l.r * g, this.colors[this.n * 3 + 1] = l.g * g, this.colors[this.n * 3 + 2] = l.b * g, this.n++));
|
|
146
149
|
}
|
|
147
150
|
end() {
|
|
148
151
|
this.mesh.count = this.n, this.mesh.instanceMatrix.needsUpdate = !0, this.mesh.instanceColor && (this.mesh.instanceColor.needsUpdate = !0);
|
|
@@ -162,70 +165,70 @@ function Gt(e) {
|
|
|
162
165
|
}
|
|
163
166
|
return o;
|
|
164
167
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
167
|
-
const n = e.inst, r = L(null), a = L(null), s = L(null), u = L(null), l = L(null),
|
|
168
|
+
const Ft = new t.TorusGeometry(1.25, 0.05, 8, 64);
|
|
169
|
+
function Et({ agent: e, onSelect: o }) {
|
|
170
|
+
const n = e.inst, r = L(null), a = L(null), s = L(null), u = L(null), l = L(null), g = L(null), m = L(null), x = L(null), S = B(() => [...n.id].reduce((F, A) => (F * 31 + A.charCodeAt(0)) % 9973, 7) / 9973, [n.id]), q = B(() => Gt(S), [S]), V = Ve[n.type], w = B(
|
|
168
171
|
() => ({
|
|
169
172
|
core: ge(V),
|
|
170
173
|
hot: ge("#ffffff"),
|
|
171
174
|
spike: ge(V),
|
|
172
175
|
ring: ge(Ke),
|
|
173
176
|
halo: me(V),
|
|
174
|
-
syn: Bt(V,
|
|
177
|
+
syn: Bt(V, je(n.type) ? 0.1 : 0.13, 0.35),
|
|
175
178
|
arrow: ge(V)
|
|
176
179
|
}),
|
|
177
180
|
[V, n.type]
|
|
178
181
|
), i = B(() => ({ p0: new t.Vector3(), p1: new t.Vector3(), seedP: new t.Vector3(), p0set: !1, labelK: 1, spik: 0, ringK: 0, parentK: 1, c: new t.Color() }), []);
|
|
179
182
|
nt(() => (ye.set(n.id, i.p1), () => {
|
|
180
183
|
ye.get(n.id) === i.p1 && ye.delete(n.id);
|
|
181
|
-
}), [n.id, i]), ie(({ clock:
|
|
184
|
+
}), [n.id, i]), ie(({ clock: F }) => {
|
|
182
185
|
var _, Y, $;
|
|
183
|
-
const A = performance.now(), O =
|
|
186
|
+
const A = performance.now(), O = F.elapsedTime, Z = pe ? 0 : 0.08 * _e.spread;
|
|
184
187
|
e.live.set(e.pos.x + Math.sin(O * 0.35 + S * 20) * Z, e.pos.y + Math.cos(O * 0.3 + S * 13) * Z, e.pos.z);
|
|
185
|
-
const
|
|
186
|
-
j ? (i.p0.copy(j), i.p0set = !0) : i.p0set || (i.p0.copy(
|
|
187
|
-
const R = (A - n.bornAt) / 1e3, T = n.parent ?
|
|
188
|
+
const E = e.live, G = n.parent ? H.instances.get(n.parent) : void 0, j = n.parent ? de(n.parent) : void 0;
|
|
189
|
+
j ? (i.p0.copy(j), i.p0set = !0) : i.p0set || (i.p0.copy(E), i.p0set = !0), i.p1.addVectors(i.p0, E).multiplyScalar(0.5);
|
|
190
|
+
const R = (A - n.bornAt) / 1e3, T = n.parent ? Ge(R / 0.9) : 1, I = Ct((R - (n.parent ? 0.85 : 0.1)) / 0.7), N = n.exitAt ? (A - n.exitAt) / 1e3 : -1, X = lt(n) / 1e3, K = N >= 0 ? oe(N / (X * 0.92)) : 0, Q = ot(n, A);
|
|
188
191
|
let D = !1;
|
|
189
192
|
for (const k of H.mcpPending.values()) k.instance === n.id && (D = !0);
|
|
190
|
-
const C = N < 0 && (n.status === "thinking" || n.status === "spawning"), W = rt(n, A), d =
|
|
191
|
-
i.spik += ((C ? 1 : 0) - i.spik) * 0.06, i.ringK += ((D && N < 0 ? 1 : 0) - i.ringK) * 0.08, r.current && (T < 1 ? r.current.position.copy(ae(i.p0, i.p1,
|
|
193
|
+
const C = N < 0 && (n.status === "thinking" || n.status === "spawning"), W = rt(n, A), d = pe ? 0 : 1, y = 0.5 + 0.5 * Math.sin(O * 2 + S * 9) * d, z = 0.5 + 0.5 * Math.sin(O * 1 + S * 5) * d;
|
|
194
|
+
i.spik += ((C ? 1 : 0) - i.spik) * 0.06, i.ringK += ((D && N < 0 ? 1 : 0) - i.ringK) * 0.08, r.current && (T < 1 ? r.current.position.copy(ae(i.p0, i.p1, E, T, i.seedP)) : r.current.position.copy(E));
|
|
192
195
|
const M = T < 1 ? 0.18 : 0, c = Math.max(M, 0.18 + 0.82 * I) * (1 - K * K * 0.95) * e.scale;
|
|
193
196
|
(_ = a.current) == null || _.scale.setScalar(Math.max(1e-4, c * (0.55 + W * 0.06 + (C ? y * 0.05 : z * 0.04)))), (Y = s.current) == null || Y.scale.setScalar(Math.max(1e-4, i.spik * (0.85 + y * 0.15)));
|
|
194
|
-
const
|
|
195
|
-
if (i.c.copy(V).multiplyScalar(
|
|
197
|
+
const f = C ? 0.75 + y * 0.35 : 0.3 + z * 0.15;
|
|
198
|
+
if (i.c.copy(V).multiplyScalar(f + W * 0.35), N >= 0 && i.c.lerp(Ot, K).multiplyScalar(1 - K * 0.75), w.core.color.copy(i.c), w.spike.color.copy(i.c).multiplyScalar(0.9), w.hot.color.setScalar((C ? 0.35 + y * 0.25 : 0.08) * (1 - K) + W * 0.2), u.current && (u.current.visible = i.ringK > 0.02, u.current.rotation.z = O * 0.9, u.current.rotation.x = 1.1 + Math.sin(O * 0.5) * 0.2, u.current.scale.setScalar(Math.max(1e-4, c * 0.55 * i.ringK)), w.ring.color.copy(Ke).multiplyScalar(0.9 * i.ringK * (0.75 + z * 0.25))), g.current && (g.current.scale.setScalar(Math.max(1e-4, c * (C ? 2.3 + y * 0.3 : 1.6) + W * 0.35)), w.halo.color.copy(V).multiplyScalar((C ? 0.22 : 0.09) * (1 - K) + W * 0.06)), ($ = x.current) == null || $.position.set(0, -0.78 * e.scale - 0.25, 0), m.current) {
|
|
196
199
|
const k = st(n.id);
|
|
197
200
|
i.labelK += ((k ? 1 : 0) - i.labelK) * 0.12, m.current.setOpacity(oe(I) * (1 - K) * 0.95 * i.labelK);
|
|
198
201
|
}
|
|
199
202
|
const v = !!G && !G.exitAt;
|
|
200
203
|
i.parentK += ((n.parent && !n.exitAt && v ? 1 : 0) - i.parentK) * (v ? 0.05 : 0.035);
|
|
201
|
-
const
|
|
202
|
-
|
|
204
|
+
const h = w.syn.uniforms;
|
|
205
|
+
h.uP0.value.copy(i.p0), h.uP1.value.copy(i.p1), h.uP2.value.copy(E);
|
|
203
206
|
const U = N >= 0 ? ze(N / (X * 0.64)) : 0;
|
|
204
|
-
if (
|
|
205
|
-
const k = n.parent && T >= 1 && i.parentK > 0.05 &&
|
|
207
|
+
if (h.uGrow.value = n.parent ? T * (1 - U) : 0, h.uSpark.value = 0, h.uHead.value = T < 1 ? T : -1, h.uTail.value = 0.1, h.uFade.value = 0.4, h.uHeadColor.value.copy(V).multiplyScalar(1.5), h.uOpacity.value = (C ? 1.1 : 0.75) * Math.max(0, Math.min(i.parentK, Q > 0 ? 1 : 0)) + (T < 1 ? 0.4 : 0), h.uTime.value = pe ? 0 : O, h.uFlow.value = T >= 1 ? i.parentK : 0, l.current) {
|
|
208
|
+
const k = n.parent && T >= 1 && i.parentK > 0.05 && h.uGrow.value > 0.9;
|
|
206
209
|
if (l.current.visible = !!k, k) {
|
|
207
|
-
ae(i.p0, i.p1,
|
|
208
|
-
const ce = (
|
|
210
|
+
ae(i.p0, i.p1, E, 0.8, Pe), ae(i.p0, i.p1, E, 0.86, We), l.current.position.copy(Pe), Ue.subVectors(We, Pe).normalize(), l.current.quaternion.setFromUnitVectors(_t, Ue);
|
|
211
|
+
const ce = (je(n.type) ? 0.75 : 1) * Math.min(1.3, _e.scale);
|
|
209
212
|
l.current.scale.set(0.16 * ce, 0.42 * ce, 0.16 * ce), w.arrow.color.copy(V).multiplyScalar(1.6 * i.parentK);
|
|
210
213
|
}
|
|
211
214
|
}
|
|
212
215
|
});
|
|
213
|
-
const b = (
|
|
214
|
-
|
|
216
|
+
const b = (F) => {
|
|
217
|
+
F.stopPropagation(), o(n.id);
|
|
215
218
|
}, P = n.id.split(":")[2];
|
|
216
219
|
return /* @__PURE__ */ ne(he, { children: [
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ p("mesh", { geometry: Rt, material: w.syn, frustumCulled: !1 }),
|
|
221
|
+
/* @__PURE__ */ p("mesh", { ref: l, geometry: He, material: w.arrow, visible: !1 }),
|
|
219
222
|
/* @__PURE__ */ ne("group", { ref: r, children: [
|
|
220
223
|
/* @__PURE__ */ ne("group", { ref: a, scale: 1e-4, children: [
|
|
221
|
-
/* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ p("mesh", { geometry: Be, material: w.core, onClick: b, onPointerOver: () => document.body.style.cursor = "pointer", onPointerOut: () => document.body.style.cursor = "" }),
|
|
225
|
+
/* @__PURE__ */ p("mesh", { geometry: Be, material: w.hot, scale: 0.5 }),
|
|
226
|
+
/* @__PURE__ */ p("group", { ref: s, scale: 1e-4, children: q.map((F, A) => /* @__PURE__ */ p("mesh", { geometry: Tt, material: w.spike, quaternion: F, scale: [0.2, 1.9, 0.2] }, A)) })
|
|
224
227
|
] }),
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
|
|
228
|
+
/* @__PURE__ */ p("mesh", { ref: u, geometry: Ft, material: w.ring, visible: !1 }),
|
|
229
|
+
/* @__PURE__ */ p("sprite", { ref: g, material: w.halo }),
|
|
230
|
+
/* @__PURE__ */ p("group", { ref: x, children: /* @__PURE__ */ p(
|
|
231
|
+
Oe,
|
|
229
232
|
{
|
|
230
233
|
ref: m,
|
|
231
234
|
text: `${n.name}${P !== void 0 ? ` ${Number(P) + 1}` : ""}`,
|
|
@@ -240,7 +243,7 @@ function Ft({ agent: e, onSelect: o }) {
|
|
|
240
243
|
] })
|
|
241
244
|
] });
|
|
242
245
|
}
|
|
243
|
-
const
|
|
246
|
+
const Pe = new t.Vector3(), We = new t.Vector3(), Ue = new t.Vector3(), _t = new t.Vector3(0, 1, 0);
|
|
244
247
|
function kt({ comet: e }) {
|
|
245
248
|
const o = L(null), n = H.instances.get(e.from), r = n ? Ve[n.type] : Ve.planner, a = B(() => me(new t.Color(r).multiplyScalar(1.8).addScalar(0.3)), [r]), s = B(() => ({ a: new t.Vector3(), b: new t.Vector3(), c: new t.Vector3(), h: new t.Vector3() }), []);
|
|
246
249
|
return ie(() => {
|
|
@@ -249,18 +252,18 @@ function kt({ comet: e }) {
|
|
|
249
252
|
o.current && (o.current.visible = !1);
|
|
250
253
|
return;
|
|
251
254
|
}
|
|
252
|
-
const
|
|
253
|
-
s.a.copy(u), s.b.copy(l), m ? s.c.copy(m) :
|
|
255
|
+
const g = H.instances.get(e.to), m = (g == null ? void 0 : g.parent) === e.from ? ye.get(e.to) : (n == null ? void 0 : n.parent) === e.to ? ye.get(e.from) : void 0;
|
|
256
|
+
s.a.copy(u), s.b.copy(l), m ? s.c.copy(m) : Fe(s.a, s.b, 1.2, s.c);
|
|
254
257
|
const x = it(e);
|
|
255
258
|
ae(s.a, s.c, s.b, ze(x), s.h), o.current.visible = ct(e), o.current.position.copy(s.h), o.current.scale.setScalar(1.1);
|
|
256
|
-
}), /* @__PURE__ */
|
|
259
|
+
}), /* @__PURE__ */ p("sprite", { ref: o, material: a, visible: !1 });
|
|
257
260
|
}
|
|
258
261
|
function jt() {
|
|
259
262
|
const [e, o] = Le([]), n = L({ n: -1, last: -1, first: -1 });
|
|
260
263
|
return ie(() => {
|
|
261
264
|
const r = H.comets, a = n.current, s = r.length ? r[0].id : -1, u = r.length ? r[r.length - 1].id : -1;
|
|
262
|
-
(r.length !== a.n || s !== a.first || u !== a.last) && (a.n = r.length, a.first = s, a.last = u, o(r.filter((l) => !(l.from.startsWith("svc:") && l.to.startsWith("svc:") && !l.failed) && (!ut.grouped ||
|
|
263
|
-
}), /* @__PURE__ */
|
|
265
|
+
(r.length !== a.n || s !== a.first || u !== a.last) && (a.n = r.length, a.first = s, a.last = u, o(r.filter((l) => !(l.from.startsWith("svc:") && l.to.startsWith("svc:") && !l.failed) && (!ut.grouped || ke(l.from) && ke(l.to)))));
|
|
266
|
+
}), /* @__PURE__ */ p(he, { children: e.map((r) => /* @__PURE__ */ p(kt, { comet: r }, r.id)) });
|
|
264
267
|
}
|
|
265
268
|
const te = 3.3, It = 200, se = 14, Ae = 48, ue = 16, le = 8, Ce = 4, ve = new t.Color(1, 1, 1), Kt = new t.Color("#a78bfa"), Wt = (
|
|
266
269
|
/* glsl */
|
|
@@ -309,14 +312,14 @@ void main(){
|
|
|
309
312
|
}`
|
|
310
313
|
);
|
|
311
314
|
function Dt({ galaxy: e }) {
|
|
312
|
-
const o = B(() =>
|
|
313
|
-
const i = new Float32Array(n * 3), b = [], P = Math.PI * (3 - Math.sqrt(5)),
|
|
315
|
+
const o = B(() => ft(e, It), [e]), n = o.nodes.length, { size: r, gl: a, camera: s } = tt(), u = L([]), l = L([]), g = L(Array(Ce).fill("")), m = B(() => {
|
|
316
|
+
const i = new Float32Array(n * 3), b = [], P = Math.PI * (3 - Math.sqrt(5)), F = o.ns, A = [0, 0, 0];
|
|
314
317
|
for (let d = 0; d < n; d++) {
|
|
315
|
-
const y = 1 - 2 * (d + 0.5) / Math.max(1,
|
|
318
|
+
const y = 1 - 2 * (d + 0.5) / Math.max(1, F), z = Math.sqrt(Math.max(0, 1 - y * y)), M = d < F ? new t.Vector3(Math.cos(d * P) * z, y, Math.sin(d * P) * z) : new t.Vector3(...pt(o.nodes[d].id, A));
|
|
316
319
|
b.push(M), i.set([M.x * te, M.y * te, M.z * te], d * 3);
|
|
317
320
|
}
|
|
318
|
-
const O = o.nodes.map((d) => new t.Color(dt[d.kind] ?? "#94a3b8").lerp(Kt, 0.2).multiplyScalar(0.62)), Z = new Float32Array(n),
|
|
319
|
-
G.setAttribute("position", new t.BufferAttribute(i, 3)), G.setAttribute("aSize", new t.BufferAttribute(Z, 1)), G.setAttribute("aColor", new t.BufferAttribute(
|
|
321
|
+
const O = o.nodes.map((d) => new t.Color(dt[d.kind] ?? "#94a3b8").lerp(Kt, 0.2).multiplyScalar(0.62)), Z = new Float32Array(n), E = new Float32Array(n * 3), G = new t.BufferGeometry();
|
|
322
|
+
G.setAttribute("position", new t.BufferAttribute(i, 3)), G.setAttribute("aSize", new t.BufferAttribute(Z, 1)), G.setAttribute("aColor", new t.BufferAttribute(E, 3));
|
|
320
323
|
const j = new Map(o.nodes.map((d, y) => [d.id, y])), R = [], T = [];
|
|
321
324
|
for (const d of o.links) {
|
|
322
325
|
const y = j.get(d.source), z = j.get(d.target);
|
|
@@ -324,22 +327,22 @@ function Dt({ galaxy: e }) {
|
|
|
324
327
|
}
|
|
325
328
|
for (let d = 0; d < n; d++) {
|
|
326
329
|
let y = -1, z = -1, M = 9, c = 9;
|
|
327
|
-
for (let
|
|
328
|
-
if (
|
|
329
|
-
const v = b[d].distanceToSquared(b[
|
|
330
|
-
v < M ? (z = y, c = M, y =
|
|
330
|
+
for (let f = 0; f < n; f++) {
|
|
331
|
+
if (f === d) continue;
|
|
332
|
+
const v = b[d].distanceToSquared(b[f]);
|
|
333
|
+
v < M ? (z = y, c = M, y = f, M = v) : v < c && (z = f, c = v);
|
|
331
334
|
}
|
|
332
335
|
y > d && (R.push([d, y]), T.push(0)), z > d && (R.push([d, z]), T.push(0));
|
|
333
336
|
}
|
|
334
337
|
const I = new Float32Array(R.length * se * 2 * 3), N = new Float32Array(R.length * se * 2 * 3), X = new Int32Array(R.length * se * 2 * 2), K = new Uint8Array(R.length * se * 2), Q = new t.Quaternion(), D = new t.Vector3();
|
|
335
338
|
R.forEach(([d, y], z) => {
|
|
336
|
-
const M = b[d], c = b[y],
|
|
339
|
+
const M = b[d], c = b[y], f = M.angleTo(c), v = new t.Vector3().crossVectors(M, c);
|
|
337
340
|
v.lengthSq() < 1e-6 && v.set(0, 1, 0), v.normalize();
|
|
338
|
-
for (let
|
|
341
|
+
for (let h = 0; h < se; h++)
|
|
339
342
|
for (let U = 0; U < 2; U++) {
|
|
340
|
-
const _ = (
|
|
341
|
-
Q.setFromAxisAngle(v,
|
|
342
|
-
const Y = (z * se +
|
|
343
|
+
const _ = (h + U) / se;
|
|
344
|
+
Q.setFromAxisAngle(v, f * _), D.copy(M).applyQuaternion(Q).multiplyScalar(te * (1 + 0.06 * Math.sin(Math.PI * _) * Math.min(1, f)));
|
|
345
|
+
const Y = (z * se + h) * 2 + U;
|
|
343
346
|
I.set([D.x, D.y, D.z], Y * 3), X[Y * 2] = d, X[Y * 2 + 1] = y, K[Y] = T[z];
|
|
344
347
|
}
|
|
345
348
|
});
|
|
@@ -375,27 +378,27 @@ function Dt({ galaxy: e }) {
|
|
|
375
378
|
return b === void 0 && S.set(i, b = vt(o, i)), b;
|
|
376
379
|
};
|
|
377
380
|
return ie(({ clock: i }) => {
|
|
378
|
-
const b = performance.now(), { pos: P, base:
|
|
379
|
-
x.nodes.uniforms.uScale.value = r.height * a.getPixelRatio() / (2 * Math.tan(s.fov * Math.PI / 360)) * mt.graph.scale, x.orb.uniforms.uTime.value =
|
|
381
|
+
const b = performance.now(), { pos: P, base: F, fire: A, white: O, fireC: Z, unit: E } = m;
|
|
382
|
+
x.nodes.uniforms.uScale.value = r.height * a.getPixelRatio() / (2 * Math.tan(s.fov * Math.PI / 360)) * mt.graph.scale, x.orb.uniforms.uTime.value = pe ? 0 : i.elapsedTime, A.fill(0), O.fill(0);
|
|
380
383
|
const { v: G, v2: j, mid: R, c: T, c2: I } = V, N = m.bgeo.getAttribute("position"), X = m.bgeo.getAttribute("color"), K = x.orb.uniforms.uRipC.value, Q = x.orb.uniforms.uRipA.value;
|
|
381
384
|
let D = 0;
|
|
382
385
|
q.begin();
|
|
383
386
|
let C = 0;
|
|
384
387
|
for (const c of H.flares) {
|
|
385
|
-
const
|
|
386
|
-
Y > A[
|
|
388
|
+
const f = w(c.node), v = (b - c.start) / 1e3, h = H.instances.get(c.instance), U = h ? Ve[h.type] : ve, _ = c.op === "write", Y = v < 0.35 ? v / 0.35 : Math.exp(-(v - 0.35) * 1.2);
|
|
389
|
+
Y > A[f] && (A[f] = Y, Z[f].copy(_ ? ve : U), O[f] = _ ? 1 : 0), _ && v < 1.8 && C < le && (K[C].copy(E[f]), Q[C] = v / 1.8, C++);
|
|
387
390
|
const $ = de(c.instance), k = $ ? ht($, V.sp) : void 0;
|
|
388
391
|
if (k && v < 2.2 && D < Ae) {
|
|
389
|
-
G.set(P[
|
|
392
|
+
G.set(P[f * 3], P[f * 3 + 1], P[f * 3 + 2]), R.copy(k).add(G).multiplyScalar(0.5), R.z += 1;
|
|
390
393
|
const ce = Math.min(1, v / 0.3) * (1 - v / 2.2) ** 1.5, Xe = _ ? Math.min(1, v * 0.85) : 1 - Math.min(1, v * 0.85);
|
|
391
394
|
for (let be = 0; be < ue; be++)
|
|
392
395
|
for (let Me = 0; Me < 2; Me++) {
|
|
393
396
|
const J = (be + Me) / ue, re = 1 - J;
|
|
394
397
|
j.set(re * re * k.x + 2 * re * J * R.x + J * J * G.x, re * re * k.y + 2 * re * J * R.y + J * J * G.y, re * re * k.z + 2 * re * J * R.z + J * J * G.z);
|
|
395
|
-
const
|
|
396
|
-
N.setXYZ(
|
|
398
|
+
const Ee = (D * ue + be) * 2 + Me;
|
|
399
|
+
N.setXYZ(Ee, j.x, j.y, j.z);
|
|
397
400
|
const qe = Math.exp(-(((J - Xe) / 0.1) ** 2)) * 1.3;
|
|
398
|
-
I.copy(_ ? ve : U).multiplyScalar(ce * ((_ ? 0.5 : 0.2) + qe) * 0.75), X.setXYZ(
|
|
401
|
+
I.copy(_ ? ve : U).multiplyScalar(ce * ((_ ? 0.5 : 0.2) + qe) * 0.75), X.setXYZ(Ee, I.r, I.g, I.b);
|
|
399
402
|
}
|
|
400
403
|
_ ? q.add(k, R, G, 0.9, 1, 0.42, ve, ce * 1.1) : q.add(k, R, G, 0.1, -1, 0.42, U, ce * 1.3), D++;
|
|
401
404
|
}
|
|
@@ -404,70 +407,70 @@ function Dt({ galaxy: e }) {
|
|
|
404
407
|
m.bgeo.setDrawRange(0, D * ue * 2), q.end(), N.needsUpdate = !0, X.needsUpdate = !0;
|
|
405
408
|
const W = m.ngeo.getAttribute("aSize"), d = m.ngeo.getAttribute("aColor");
|
|
406
409
|
for (let c = 0; c < n; c++) {
|
|
407
|
-
const
|
|
408
|
-
W.setX(c, 0.21 +
|
|
410
|
+
const f = A[c];
|
|
411
|
+
W.setX(c, 0.21 + f * (0.55 + O[c] * 0.25)), T.copy(F[c]), f > 0.01 && Ie(Ie(T, Z[c], f * 1.6), ve, f * (0.3 + O[c] * 1.2)), d.setXYZ(c, T.r, T.g, T.b);
|
|
409
412
|
}
|
|
410
413
|
W.needsUpdate = !0, d.needsUpdate = !0;
|
|
411
414
|
const y = m.ageo.getAttribute("color"), z = m.owner;
|
|
412
415
|
for (let c = 0; c < m.nArcV; c++) {
|
|
413
|
-
const
|
|
414
|
-
y.setXYZ(c, 0.42 * U +
|
|
416
|
+
const f = z[c * 2], v = z[c * 2 + 1], h = Math.max(A[f], A[v]), U = m.kindOf[c] ? 0.16 : 0.07;
|
|
417
|
+
y.setXYZ(c, 0.42 * U + h * 0.3, 0.36 * U + h * 0.3, 0.85 * U + h * 0.4);
|
|
415
418
|
}
|
|
416
419
|
y.needsUpdate = !0;
|
|
417
420
|
let M = 0;
|
|
418
421
|
for (let c = H.flares.length - 1; c >= 0 && M < Ce; c--) {
|
|
419
|
-
const
|
|
420
|
-
if (b -
|
|
421
|
-
if (
|
|
422
|
+
const f = H.flares[c];
|
|
423
|
+
if (b - f.start > 2200) break;
|
|
424
|
+
if (f.area) continue;
|
|
422
425
|
let v = !1;
|
|
423
|
-
for (let $ = 0; $ < M; $++)
|
|
426
|
+
for (let $ = 0; $ < M; $++) g.current[$] === f.node && (v = !0);
|
|
424
427
|
if (v) continue;
|
|
425
|
-
const
|
|
428
|
+
const h = w(f.node);
|
|
426
429
|
let U = !1;
|
|
427
430
|
for (let $ = 0; $ < M; $++) {
|
|
428
431
|
const k = l.current[$];
|
|
429
|
-
k && Math.abs(k.position.y - P[
|
|
432
|
+
k && Math.abs(k.position.y - P[h * 3 + 1]) < 0.55 && Math.abs(k.position.x - P[h * 3]) < 3.2 && (U = !0);
|
|
430
433
|
}
|
|
431
434
|
if (U) continue;
|
|
432
435
|
const _ = u.current[M], Y = l.current[M];
|
|
433
|
-
_ && Y && (Y.position.set(P[
|
|
436
|
+
_ && Y && (Y.position.set(P[h * 3], P[h * 3 + 1], P[h * 3 + 2]), g.current[M] !== f.node && (_.setText(`${f.op === "write" ? "wrote" : "read"} · ${f.node}`), _.setColor(f.op === "write" ? "#ffffff" : "#22d3ee")), _.setOpacity(1)), g.current[M] = f.node, M++;
|
|
434
437
|
}
|
|
435
438
|
for (let c = M; c < Ce; c++) {
|
|
436
|
-
const
|
|
437
|
-
|
|
439
|
+
const f = u.current[c];
|
|
440
|
+
f == null || f.setOpacity(0), g.current[c] = "";
|
|
438
441
|
}
|
|
439
442
|
}), /* @__PURE__ */ ne(he, { children: [
|
|
440
443
|
/* @__PURE__ */ ne("group", { children: [
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ p("sprite", { material: x.aura, scale: te * 4.2, position: [0, 0, -te] }),
|
|
445
|
+
/* @__PURE__ */ p("sprite", { material: x.core, scale: te * 1.5 }),
|
|
446
|
+
/* @__PURE__ */ p("mesh", { geometry: Be, material: x.orb, scale: te * 1.02 }),
|
|
447
|
+
/* @__PURE__ */ p("lineSegments", { geometry: m.ageo, material: x.arcs, frustumCulled: !1 }),
|
|
448
|
+
/* @__PURE__ */ p("points", { geometry: m.ngeo, material: x.nodes, frustumCulled: !1 })
|
|
446
449
|
] }),
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
Array.from({ length: Ce }, (i, b) => /* @__PURE__ */
|
|
450
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ p("lineSegments", { geometry: m.bgeo, material: x.beam, frustumCulled: !1 }),
|
|
451
|
+
/* @__PURE__ */ p("primitive", { object: q.mesh }),
|
|
452
|
+
Array.from({ length: Ce }, (i, b) => /* @__PURE__ */ p("group", { ref: (P) => void (l.current[b] = P), children: /* @__PURE__ */ p(Oe, { ref: (P) => void (u.current[b] = P), text: "", offset: [0, 0.42], size: 0.24, opacity: 0, fadeMs: 250, pxRange: [8, 12] }) }, b)),
|
|
453
|
+
/* @__PURE__ */ p(gt, { position: [0, -te - 0.9, 0], color: "#a78bfa", size: 0.28, opacity: 0.7, pxRange: [8, 12] })
|
|
451
454
|
] });
|
|
452
455
|
}
|
|
453
456
|
function Ht({ run: e }) {
|
|
454
457
|
const o = B(() => new t.Color(e.color), [e.color]), n = B(() => me("#000"), []), r = L(null), a = L(null);
|
|
455
458
|
return ie(({ clock: s }) => {
|
|
456
459
|
var V;
|
|
457
|
-
const u = performance.now(), l = e.run ?? H.runs.get(e.id),
|
|
458
|
-
n.color.copy(o).multiplyScalar(0.16 *
|
|
460
|
+
const u = performance.now(), l = e.run ?? H.runs.get(e.id), g = l ? Ge((u - l.startedAt) / 1200) : 1, m = l != null && l.endedAt ? oe(1 - (u - l.endedAt - (wt - 2500)) / 2500) : 1, x = 0.9 + 0.1 * Math.sin(s.elapsedTime * 0.6 + e.index);
|
|
461
|
+
n.color.copy(o).multiplyScalar(0.16 * g * m * x);
|
|
459
462
|
const S = Math.abs(e.side.x) * e.hu + Math.abs(e.axis.x) * e.hv, q = Math.abs(e.side.y) * e.hu + Math.abs(e.axis.y) * e.hv;
|
|
460
463
|
r.current && (r.current.position.set(e.origin.x, e.origin.y, -1.5), r.current.scale.set(S * 2.6 + 3, q * 2.6 + 3, 1)), (V = a.current) == null || V.position.set(e.origin.x, e.origin.y + q + 0.6, 0.5);
|
|
461
464
|
}), /* @__PURE__ */ ne(he, { children: [
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ p("sprite", { ref: r, material: n }),
|
|
466
|
+
/* @__PURE__ */ p("group", { ref: a, children: e.run && /* @__PURE__ */ p(Xt, { run: e.run }) })
|
|
464
467
|
] });
|
|
465
468
|
}
|
|
466
469
|
function Xt({ run: e }) {
|
|
467
470
|
yt();
|
|
468
471
|
const o = e.status !== "started" || bt(e);
|
|
469
|
-
return /* @__PURE__ */
|
|
470
|
-
|
|
472
|
+
return /* @__PURE__ */ p(
|
|
473
|
+
Oe,
|
|
471
474
|
{
|
|
472
475
|
text: e.topic,
|
|
473
476
|
secondary: Mt(e, { base: "#94a3b8", current: "#fde68a", done: "#cbd5e1" }, ["running…", "run complete"]),
|
|
@@ -492,37 +495,37 @@ function Qt({ call: e }) {
|
|
|
492
495
|
a.current.visible = !1;
|
|
493
496
|
return;
|
|
494
497
|
}
|
|
495
|
-
s.a.copy(u), s.b.copy(l),
|
|
496
|
-
const
|
|
497
|
-
ae(s.a, s.c, s.b, e.phase === "call" ? m : 1 - m, s.h), a.current.visible =
|
|
498
|
-
}), /* @__PURE__ */
|
|
498
|
+
s.a.copy(u), s.b.copy(l), Fe(s.a, s.b, 1, s.c);
|
|
499
|
+
const g = oe((performance.now() - e.start) / (e.phase === "call" ? e.dur : e.dur * 0.75)), m = ze(g);
|
|
500
|
+
ae(s.a, s.c, s.b, e.phase === "call" ? m : 1 - m, s.h), a.current.visible = g < 1, a.current.position.copy(s.h), a.current.scale.setScalar(1);
|
|
501
|
+
}), /* @__PURE__ */ p("sprite", { ref: a, material: r, visible: !1 });
|
|
499
502
|
}
|
|
500
|
-
const xe = 24,
|
|
503
|
+
const xe = 24, fe = 40, we = 3;
|
|
501
504
|
function Jt() {
|
|
502
505
|
const e = B(() => {
|
|
503
506
|
const a = new t.BufferGeometry();
|
|
504
|
-
return a.setAttribute("position", new t.BufferAttribute(new Float32Array(xe * we *
|
|
507
|
+
return a.setAttribute("position", new t.BufferAttribute(new Float32Array(xe * we * fe * 2 * 3), 3)), a.setAttribute("color", new t.BufferAttribute(new Float32Array(xe * we * fe * 2 * 3), 3)), a.boundingSphere = new t.Sphere(new t.Vector3(), 1e4), a;
|
|
505
508
|
}, []), o = B(() => new t.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: t.AdditiveBlending, depthWrite: !1, toneMapped: !1 }), []), n = B(() => new Re(xe), []), r = B(() => ({ a: new t.Vector3(), b: new t.Vector3(), c: new t.Vector3(), p: new t.Vector3(), col: new t.Color(), k: new t.Color() }), []);
|
|
506
509
|
return ie(({ clock: a }) => {
|
|
507
|
-
const s = performance.now(), u =
|
|
510
|
+
const s = performance.now(), u = pe ? 0 : a.elapsedTime, l = e.getAttribute("position"), g = e.getAttribute("color");
|
|
508
511
|
let m = 0;
|
|
509
512
|
n.begin();
|
|
510
513
|
const x = (S, q, V, w) => {
|
|
511
514
|
if (m >= xe) return;
|
|
512
515
|
const i = de(S), b = H.mcpServers.get(q), P = De(q);
|
|
513
516
|
if (!i || !b || !P) return;
|
|
514
|
-
const { a:
|
|
515
|
-
|
|
517
|
+
const { a: F, b: A, c: O, p: Z, col: E, k: G } = r;
|
|
518
|
+
F.copy(i), A.copy(P), Fe(F, A, 1, O), E.set(b.color);
|
|
516
519
|
let j;
|
|
517
|
-
V === 0 ? (
|
|
520
|
+
V === 0 ? (E.lerp(qt, oe(w / 1.2)), w > 1.2 && E.lerp(Yt, oe((w - 1.2) / 1)), j = (0.22 + Math.min(0.6, w * 0.25)) * Ge(w / 0.3)) : (G.copy(E).lerp($t, 0.35), j = 1.3 * (w < 0.75 ? 1 : 1 - (w - 0.75) / 0.25));
|
|
518
521
|
const R = 1 - ze(w / 0.75), T = V === 0 ? 0.025 : 0.07;
|
|
519
522
|
for (let I = 0; I < we; I++) {
|
|
520
523
|
const N = (I - 1) * T;
|
|
521
|
-
for (let X = 0; X <
|
|
524
|
+
for (let X = 0; X < fe; X++)
|
|
522
525
|
for (let K = 0; K < 2; K++) {
|
|
523
|
-
const Q = (X + K) /
|
|
524
|
-
ae(
|
|
525
|
-
const D = ((m * we + I) *
|
|
526
|
+
const Q = (X + K) / fe;
|
|
527
|
+
ae(F, O, A, Q, Z);
|
|
528
|
+
const D = ((m * we + I) * fe + X) * 2 + K;
|
|
526
529
|
l.setXYZ(D, Z.x + N, Z.y - N, Z.z + N * 0.5);
|
|
527
530
|
let C;
|
|
528
531
|
if (V === 0) {
|
|
@@ -530,18 +533,18 @@ function Jt() {
|
|
|
530
533
|
C = j * (0.3 + d * 1.5) * (I === 1 ? 1 : 0.25);
|
|
531
534
|
} else
|
|
532
535
|
C = j * (0.3 + Math.exp(-(((Q - R) / 0.07) ** 2)) * 3.2 * (w < 0.8 ? 1 : 0)) * (I === 1 ? 1 : 0.65);
|
|
533
|
-
const W = V === 0 ?
|
|
534
|
-
|
|
536
|
+
const W = V === 0 ? E : G;
|
|
537
|
+
g.setXYZ(D, W.r * C, W.g * C, W.b * C);
|
|
535
538
|
}
|
|
536
539
|
}
|
|
537
|
-
V === 0 ? n.add(
|
|
540
|
+
V === 0 ? n.add(F, O, A, 0.92, 1, 0.48, E, 0.4 + j * 1.4) : n.add(F, O, A, 0.08, -1, 0.66, G, j * 1.6), m++;
|
|
538
541
|
};
|
|
539
542
|
for (const S of H.mcpPending.values()) x(S.instance, S.server, 0, St(S, s));
|
|
540
543
|
for (const S of H.mcpCalls) S.phase === "result" && x(S.instance, S.server, 1, oe((s - S.start) / S.dur));
|
|
541
|
-
e.setDrawRange(0, m * we *
|
|
544
|
+
e.setDrawRange(0, m * we * fe * 2), l.needsUpdate = !0, g.needsUpdate = !0, n.end();
|
|
542
545
|
}), /* @__PURE__ */ ne(he, { children: [
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ p("lineSegments", { geometry: e, material: o, frustumCulled: !1 }),
|
|
547
|
+
/* @__PURE__ */ p("primitive", { object: n.mesh })
|
|
545
548
|
] });
|
|
546
549
|
}
|
|
547
550
|
function en() {
|
|
@@ -550,8 +553,8 @@ function en() {
|
|
|
550
553
|
const r = n.current, a = H.mcpCalls, s = a.length ? a[0].id : -1, u = a.length ? a[a.length - 1].id : -1;
|
|
551
554
|
(a.length !== r.n || s !== r.first || u !== r.last) && (r.n = a.length, r.first = s, r.last = u, o(a.slice()));
|
|
552
555
|
}), /* @__PURE__ */ ne(he, { children: [
|
|
553
|
-
e.map((r) => /* @__PURE__ */
|
|
554
|
-
/* @__PURE__ */
|
|
556
|
+
e.map((r) => /* @__PURE__ */ p(Qt, { call: r }, r.id)),
|
|
557
|
+
/* @__PURE__ */ p(Jt, {})
|
|
555
558
|
] });
|
|
556
559
|
}
|
|
557
560
|
const tn = { tint: "#c084fc", tintAmt: 0.2, gain: 0.9 };
|
|
@@ -568,19 +571,19 @@ function un() {
|
|
|
568
571
|
fit: { nRef: 4, min: 0.62, max: 1.6, minRadius: 5.5 },
|
|
569
572
|
agentRadius: 1.25,
|
|
570
573
|
graph: { natural: te * 1.08, radius: 2.1 },
|
|
571
|
-
Background: /* @__PURE__ */
|
|
572
|
-
Agent:
|
|
574
|
+
Background: /* @__PURE__ */ p(Ze, { radius: 80, depth: 40, count: pe ? 1200 : 3500, factor: 2.6, saturation: 0.6, fade: !0, speed: 0.4 }),
|
|
575
|
+
Agent: Et,
|
|
573
576
|
RunMarker: Ht,
|
|
574
577
|
mcpStyle: tn,
|
|
575
578
|
GraphResource: Dt,
|
|
576
579
|
cluster: { radius: 1.45, variant: "orb" },
|
|
577
580
|
PostFX: /* @__PURE__ */ ne(Qe, { multisampling: 0, children: [
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ p(Je, { mipmapBlur: !0, intensity: 1.1, luminanceThreshold: 0.2, luminanceSmoothing: 0.3, radius: 0.75 }),
|
|
582
|
+
/* @__PURE__ */ p(et, { eskil: !1, offset: 0.22, darkness: 0.9 })
|
|
580
583
|
] }),
|
|
581
584
|
children: [
|
|
582
|
-
/* @__PURE__ */
|
|
583
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ p(jt, {}),
|
|
586
|
+
/* @__PURE__ */ p(en, {})
|
|
584
587
|
]
|
|
585
588
|
}
|
|
586
589
|
);
|