agentglow 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -3
- package/dist/chunks/KitScene-C3SZiKL5.js +2793 -0
- package/dist/chunks/index--dwzdFRh.js +753 -0
- package/dist/chunks/index-B2PGx_wt.js +1010 -0
- package/dist/chunks/index-BZOG_CQS.js +838 -0
- package/dist/chunks/index-BfGluv59.js +784 -0
- package/dist/chunks/index-Bm4te7Ug.js +980 -0
- package/dist/chunks/index-Bqv_wy49.js +889 -0
- package/dist/chunks/index-Bsmr7FwH.js +763 -0
- package/dist/chunks/index-Bw31uayO.js +792 -0
- package/dist/chunks/index-C4F16M9q.js +887 -0
- package/dist/chunks/index-CRRHsMqy.js +68 -0
- package/dist/chunks/index-CS8eZTr_.js +818 -0
- package/dist/chunks/index-CdzGoWrn.js +1086 -0
- package/dist/chunks/index-CvDEulcq.js +492 -0
- package/dist/chunks/index-DXBfdHew.js +1143 -0
- package/dist/chunks/index-DdCs_ye9.js +605 -0
- package/dist/chunks/index-_KrED-np.js +677 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/AgentScene.d.ts +14 -1
- package/dist/types/world.d.ts +69 -0
- package/package.json +1 -1
- package/dist/chunks/ClusterBall-CPsd6JvJ.js +0 -1489
- package/dist/chunks/index-0Bqa57T_.js +0 -786
- package/dist/chunks/index-4JCQqMml.js +0 -831
- package/dist/chunks/index-55W5crSg.js +0 -63
- package/dist/chunks/index-78lWZCrQ.js +0 -984
- package/dist/chunks/index-Bv6_kdaq.js +0 -768
- package/dist/chunks/index-Cgb5ir1r.js +0 -688
- package/dist/chunks/index-CqVCWpP7.js +0 -796
- package/dist/chunks/index-D1O5v601.js +0 -1065
- package/dist/chunks/index-DOoA9htC.js +0 -1181
- package/dist/chunks/index-K__sPGRy.js +0 -1134
- package/dist/chunks/index-N0zWN8NS.js +0 -857
- package/dist/chunks/index-NiYqQci9.js +0 -936
- package/dist/chunks/index-PQRnbPiJ.js +0 -565
- package/dist/chunks/index-VOXn1m-Q.js +0 -848
- package/dist/chunks/index-o4vs5msj.js +0 -837
- package/dist/chunks/index-yos7IepY.js +0 -890
- package/dist/chunks/spread-CWdeDFd9.js +0 -35
|
@@ -1,565 +0,0 @@
|
|
|
1
|
-
import { jsx as o, Fragment as re, jsxs as C } from "react/jsx-runtime";
|
|
2
|
-
import { Trail as me, Sparkles as Te, Stars as Ee, OrbitControls as ze } from "@react-three/drei";
|
|
3
|
-
import { useFrame as F, Canvas as Ie } from "@react-three/fiber";
|
|
4
|
-
import { EffectComposer as Le, Bloom as Oe, Vignette as qe, Noise as We } from "@react-three/postprocessing";
|
|
5
|
-
import { useState as se, useRef as S, useMemo as G, useEffect as De } from "react";
|
|
6
|
-
import { w as g, h as pe, C as _e, l as ee, i as j, T as ce, p as $e, e as Ye, a as Fe, s as Xe, L as ge, b as Ue, K as Ze, G as Ne, c as Ve, S as fe, R as He, u as je, d as Qe, f as Ke, H as Je, t as et, g as tt } from "./ClusterBall-CPsd6JvJ.js";
|
|
7
|
-
import * as p from "three";
|
|
8
|
-
import { r as nt, a as rt, j as st, i as ot } from "./spread-CWdeDFd9.js";
|
|
9
|
-
var Ge;
|
|
10
|
-
const V = typeof window < "u" && !!((Ge = window.matchMedia) != null && Ge.call(window, "(prefers-reduced-motion: reduce)").matches), ne = Math.PI * 2, U = { plan: Math.PI * 0.5, research: Math.PI * 0.5 + ne / 3, write: Math.PI * 0.5 + ne * 2 / 3 }, at = {
|
|
11
|
-
planner: U.plan,
|
|
12
|
-
researcher: U.research,
|
|
13
|
-
graph_scout: U.research,
|
|
14
|
-
records_scout: U.research,
|
|
15
|
-
data_scout: U.research,
|
|
16
|
-
writer: U.write
|
|
17
|
-
}, J = ot, Re = (e) => (pe(e, 11) - 0.5) * 2.4, ct = [
|
|
18
|
-
[0.2, 0, -0.1, 7.4],
|
|
19
|
-
[-0.46, 1.15, 0.24, 9.6],
|
|
20
|
-
[0.6, 2.35, -0.32, 11.8],
|
|
21
|
-
[-0.24, 3.5, 0.52, 13.8],
|
|
22
|
-
[0.42, 4.6, 0.12, 15.6]
|
|
23
|
-
], Ce = ct.map(([e, t, n, s]) => ({ q: new p.Quaternion().setFromEuler(new p.Euler(e, t, n)), r: s })), Ae = (e) => Ce[e % Ce.length];
|
|
24
|
-
function ie(e, t, n) {
|
|
25
|
-
return n.set(Math.cos(t) * e, 0, Math.sin(t) * e);
|
|
26
|
-
}
|
|
27
|
-
const de = /* @__PURE__ */ new Map(), be = /* @__PURE__ */ new Map();
|
|
28
|
-
function it() {
|
|
29
|
-
be.clear();
|
|
30
|
-
const e = /* @__PURE__ */ new Map();
|
|
31
|
-
for (const t of g.instances.values()) {
|
|
32
|
-
if (!J(t.type) || !t.parent) continue;
|
|
33
|
-
const n = e.get(t.parent) ?? [];
|
|
34
|
-
n.push(t.id), e.set(t.parent, n);
|
|
35
|
-
}
|
|
36
|
-
for (const t of e.values()) t.forEach((n, s) => be.set(n, { k: s, n: t.length }));
|
|
37
|
-
for (const t of de.keys()) g.instances.has(t) || de.delete(t);
|
|
38
|
-
}
|
|
39
|
-
function lt(e) {
|
|
40
|
-
let t = 7;
|
|
41
|
-
for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) >>> 0;
|
|
42
|
-
return t % 1e3 / 1e3;
|
|
43
|
-
}
|
|
44
|
-
function Z(e, t, n) {
|
|
45
|
-
var A;
|
|
46
|
-
const s = g.instances.get(e);
|
|
47
|
-
let r = de.get(e);
|
|
48
|
-
if (!s) return r ? r.pos : null;
|
|
49
|
-
if (!r) {
|
|
50
|
-
const B = J(s.type) ? 0 : nt(s);
|
|
51
|
-
r = {
|
|
52
|
-
phase: 0,
|
|
53
|
-
stamp: -1,
|
|
54
|
-
last: t,
|
|
55
|
-
seed: lt(e) * ne,
|
|
56
|
-
off: Re(s.run) + rt(B) * 0.34 + st(e, 12) * 0.2,
|
|
57
|
-
rr: 1.55 + pe(e, 13) * 0.75,
|
|
58
|
-
tilt: 0.2 + pe(e, 14) * 0.45,
|
|
59
|
-
pos: new p.Vector3(),
|
|
60
|
-
target: new p.Vector3()
|
|
61
|
-
}, de.set(e, r);
|
|
62
|
-
}
|
|
63
|
-
if (r.stamp === t) return r.pos;
|
|
64
|
-
r.stamp = t;
|
|
65
|
-
const c = Math.min(0.1, Math.max(0, t - r.last));
|
|
66
|
-
r.last = t;
|
|
67
|
-
const i = J(s.type), y = s.status, a = y === "thinking" ? i ? 0.7 : 0.06 : y === "waiting" ? i ? 0.15 : 0.012 : i ? 0.35 : 0.03;
|
|
68
|
-
r.phase += c * a * (V ? 0.3 : 1);
|
|
69
|
-
const M = ((A = g.runs.get(s.run)) == null ? void 0 : A.slot) ?? 0, u = Ae(M), f = s.parent ? Z(s.parent, t, n) : null;
|
|
70
|
-
if (i && f && g.instances.has(s.parent)) {
|
|
71
|
-
const B = be.get(e) ?? { k: 0, n: 1 }, v = B.k / B.n * ne + r.phase + pe(s.run, 15) * ne, x = r.rr;
|
|
72
|
-
r.target.set(Math.cos(v) * x, Math.sin(v * 2 + r.seed) * r.tilt, Math.sin(v) * x).applyQuaternion(u.q).add(f);
|
|
73
|
-
} else
|
|
74
|
-
ie(u.r, at[s.type] + r.off + r.phase, r.target).applyQuaternion(u.q), r.target.y += Math.sin(t * 0.9 + r.seed) * (V ? 0 : 0.18);
|
|
75
|
-
const w = Math.min(1, (n - s.bornAt) / 950);
|
|
76
|
-
if (w < 1 && f) {
|
|
77
|
-
const B = 1 - Math.pow(1 - w, 3);
|
|
78
|
-
r.pos.copy(f).lerp(r.target, B);
|
|
79
|
-
} else r.pos.copy(r.target);
|
|
80
|
-
return r.pos;
|
|
81
|
-
}
|
|
82
|
-
const N = {
|
|
83
|
-
group: null,
|
|
84
|
-
pos: [],
|
|
85
|
-
index: /* @__PURE__ */ new Map()
|
|
86
|
-
};
|
|
87
|
-
function Se(e) {
|
|
88
|
-
const t = e.toLowerCase();
|
|
89
|
-
let n = N.index.get(t);
|
|
90
|
-
if (n === void 0) {
|
|
91
|
-
const s = Math.max(1, N.pos.length);
|
|
92
|
-
let r = 7;
|
|
93
|
-
for (let c = 0; c < t.length; c++) r = r * 31 + t.charCodeAt(c) >>> 0;
|
|
94
|
-
n = r % s, N.index.set(t, n);
|
|
95
|
-
}
|
|
96
|
-
return n;
|
|
97
|
-
}
|
|
98
|
-
function ut(e, t) {
|
|
99
|
-
const n = N.group;
|
|
100
|
-
return !n || !N.pos.length ? !1 : (t.copy(N.pos[Se(e)]).applyMatrix4(n.matrixWorld), !0);
|
|
101
|
-
}
|
|
102
|
-
const pt = 18.5;
|
|
103
|
-
function he(e, t, n) {
|
|
104
|
-
const s = e / 5 * ne + 0.35 + 0 * t, r = pt + e % 2 * 1.6;
|
|
105
|
-
return n.set(Math.cos(s) * r, (e % 2 ? -1 : 1) * (2.2 + e % 3 * 1.1), Math.sin(s) * r);
|
|
106
|
-
}
|
|
107
|
-
const ft = Math.PI * 2, dt = [[4, 1], [1, 1], [1, 1], [2, 1.15], [7, 1], [2, 1]], ht = [[5, 1.3], [4, 1.15], [11, 1.15], [1, 1], [5, 1], [3, 1.3]];
|
|
108
|
-
function mt(e, t) {
|
|
109
|
-
const n = Ae(e), [s, r] = (ee.laneExpanded[e] ? ht : dt)[e];
|
|
110
|
-
return ie(n.r * r, s / 12 * ft, t).applyQuaternion(n.q);
|
|
111
|
-
}
|
|
112
|
-
function gt() {
|
|
113
|
-
return /* @__PURE__ */ o(_e, { place: mt, radius: 1.35, variant: "stars" });
|
|
114
|
-
}
|
|
115
|
-
const yt = new p.Color("#ef4444"), Mt = new p.Color("#f59e0b"), wt = new p.Color("#ffffff");
|
|
116
|
-
function xt(e) {
|
|
117
|
-
for (const t of g.mcpPending.values()) if (t.instance === e) return !0;
|
|
118
|
-
return !1;
|
|
119
|
-
}
|
|
120
|
-
function bt({ id: e, selected: t, onSelect: n }) {
|
|
121
|
-
const r = g.instances.get(e).type, c = ce[r], i = J(r) ? 0.3 : 0.52, y = S(null), a = S(null), M = S(null), u = S(null), f = S(null), w = S(null), A = S(null), B = S(""), v = S(1), x = G(() => new p.Color(c), [c]), b = G(() => new p.Color(), []);
|
|
122
|
-
F(({ clock: L, camera: T }) => {
|
|
123
|
-
const E = y.current, m = g.instances.get(e);
|
|
124
|
-
if (!E) return;
|
|
125
|
-
if (!m) {
|
|
126
|
-
E.visible = !1;
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
const z = performance.now(), $ = L.elapsedTime, D = Z(e, $, z);
|
|
130
|
-
D && E.position.copy(D);
|
|
131
|
-
const d = $e(m, z), l = Ye(m, z), h = (z - m.bornAt) / 1e3, k = m.exitAt ? (z - m.exitAt) / Fe(m) : 0, R = Ue(), P = !m.exitAt && m.status === "thinking", O = !m.exitAt && m.status === "waiting", Q = !m.exitAt && xt(e), H = V ? 0.3 : 1, ye = P ? 0.5 + 0.5 * Math.sin($ * 7 * H) : 0, Me = O || Q ? 0.5 + 0.5 * Math.sin($ * 1.7 * H) : 0;
|
|
132
|
-
let le = P ? 2.4 + ye * 1.8 : O ? 0.35 + Me * 0.55 : 1.3;
|
|
133
|
-
le += l * 5;
|
|
134
|
-
const we = h < 0.6 ? 1 - h / 0.6 : 0;
|
|
135
|
-
le += we * 3.5;
|
|
136
|
-
let xe = d * (1 + l * 0.35 + ye * 0.12 + Me * 0.08), oe = 0;
|
|
137
|
-
if (m.exitAt && (oe = k < 0.1 ? 1 - k / 0.1 : 0, xe = k < 0.1 ? 1 + k * 4 : 1.4 * Math.pow(Math.max(0, 1 - (k - 0.1) / 0.75), 2), le = 2 + oe * 5), a.current) {
|
|
138
|
-
a.current.scale.setScalar(Math.max(1e-3, i * xe * R));
|
|
139
|
-
const _ = a.current.material;
|
|
140
|
-
b.copy(x), Q && b.lerp(Mt, 0.25 + Me * 0.25), m.status === "failed" && b.lerp(yt, 0.8), oe > 0 && b.lerp(wt, oe * 0.7), _.color.copy(b).multiplyScalar(le);
|
|
141
|
-
}
|
|
142
|
-
if (M.current) {
|
|
143
|
-
M.current.scale.setScalar(Math.max(1e-3, R * i * xe * (1.45 + l * 0.6 + ye * 0.2 + we * 1)));
|
|
144
|
-
const _ = M.current.material;
|
|
145
|
-
_.opacity = (P ? 0.09 : O ? 0.04 : 0.06) + l * 0.06 + we * 0.15 + oe * 0.25;
|
|
146
|
-
}
|
|
147
|
-
if (u.current && (u.current.visible = P, u.current.scale.setScalar(i * 2.2 * d * R), u.current.rotation.y += 0.07 * H, u.current.rotation.x += 0.03 * H), f.current) {
|
|
148
|
-
const _ = f.current.material;
|
|
149
|
-
let X = -1;
|
|
150
|
-
h < 0.9 ? (X = h / 0.9, _.color.copy(x).multiplyScalar(2.2 * (1 - X) * (1 - X))) : m.exitAt && k < 0.5 && (X = k / 0.5, _.color.set(m.status === "failed" ? "#ef4444" : "#ffffff").multiplyScalar(2.5 * (1 - X) * (1 - X))), f.current.visible = X >= 0, X >= 0 && (f.current.quaternion.copy(T.quaternion), f.current.scale.setScalar(R * i * (1.2 + X * 2.6)));
|
|
151
|
-
}
|
|
152
|
-
if (w.current && (w.current.visible = t, w.current.quaternion.copy(T.quaternion), w.current.scale.setScalar(R * i * 2.6 * Math.max(0.2, d))), A.current) {
|
|
153
|
-
const _ = m.exitAt ? m.status === "failed" ? "failed" : "done" : h < 2.4 ? "born" : "";
|
|
154
|
-
_ !== B.current && (B.current = _, A.current.setText(_ === "born" ? `+ ${m.name}` : _ === "done" ? `${m.name} done` : _ === "failed" ? `× ${m.name}` : ""));
|
|
155
|
-
const X = _ === "born" ? Math.min(1, (2.4 - h) / 0.6) : _ ? Math.max(0, 1 - k * 1.6) : t ? 1 : 0;
|
|
156
|
-
!_ && t && A.current.setText(m.name), v.current += ((Xe(e) ? 1 : 0) - v.current) * 0.12, A.current.setOpacity(X * v.current);
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
const W = (L) => (L.stopPropagation(), n(e));
|
|
160
|
-
return /* @__PURE__ */ C("group", { ref: y, children: [
|
|
161
|
-
/* @__PURE__ */ o(me, { width: i * 5, length: J(r) ? 3 : 5, color: c, attenuation: (L) => L * L, decay: 1, children: /* @__PURE__ */ C("mesh", { ref: a, scale: 1e-3, onClick: W, onPointerOver: () => document.body.style.cursor = "pointer", onPointerOut: () => document.body.style.cursor = "", children: [
|
|
162
|
-
/* @__PURE__ */ o("sphereGeometry", { args: [1, 32, 32] }),
|
|
163
|
-
/* @__PURE__ */ o("meshBasicMaterial", { toneMapped: !1 })
|
|
164
|
-
] }) }),
|
|
165
|
-
/* @__PURE__ */ C("mesh", { ref: M, scale: 1e-3, onClick: W, children: [
|
|
166
|
-
/* @__PURE__ */ o("sphereGeometry", { args: [1, 24, 24] }),
|
|
167
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: c, transparent: !0, opacity: 0.1, blending: p.AdditiveBlending, depthWrite: !1, toneMapped: !1 })
|
|
168
|
-
] }),
|
|
169
|
-
/* @__PURE__ */ o("group", { ref: u, visible: !1, children: [0, 1, 2].map((L) => /* @__PURE__ */ C("mesh", { position: [Math.cos(L * Math.PI * 2 / 3), Math.sin(L * 2.1) * 0.35, Math.sin(L * Math.PI * 2 / 3)], children: [
|
|
170
|
-
/* @__PURE__ */ o("sphereGeometry", { args: [0.06, 10, 10] }),
|
|
171
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: [4, 4, 4], toneMapped: !1 })
|
|
172
|
-
] }, L)) }),
|
|
173
|
-
/* @__PURE__ */ C("mesh", { ref: f, visible: !1, raycast: () => null, children: [
|
|
174
|
-
/* @__PURE__ */ o("ringGeometry", { args: [0.85, 1, 48] }),
|
|
175
|
-
/* @__PURE__ */ o("meshBasicMaterial", { transparent: !0, blending: p.AdditiveBlending, depthWrite: !1, toneMapped: !1, side: p.DoubleSide })
|
|
176
|
-
] }),
|
|
177
|
-
/* @__PURE__ */ C("mesh", { ref: w, visible: !1, raycast: () => null, children: [
|
|
178
|
-
/* @__PURE__ */ o("ringGeometry", { args: [0.92, 1, 48] }),
|
|
179
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: [3, 3, 3], transparent: !0, opacity: 0.8, depthWrite: !1, toneMapped: !1, side: p.DoubleSide })
|
|
180
|
-
] }),
|
|
181
|
-
/* @__PURE__ */ o(ge, { ref: A, position: [0, J(r) ? 0.75 : 1.05, 0], text: "", color: c, size: 0.3, opacity: 0, pxRange: [8.5, 12.5] })
|
|
182
|
-
] });
|
|
183
|
-
}
|
|
184
|
-
function St({ selected: e, onSelect: t }) {
|
|
185
|
-
const [n, s] = se([]), r = S(-1);
|
|
186
|
-
return F(() => {
|
|
187
|
-
let c = g.instances.size * 7919 + ee.version * 104729;
|
|
188
|
-
for (const i of g.instances.values()) c += i.bornAt;
|
|
189
|
-
if (c !== r.current) {
|
|
190
|
-
r.current = c, it();
|
|
191
|
-
const i = [];
|
|
192
|
-
for (const y of g.instances.values()) j(y) && i.push(y.id);
|
|
193
|
-
s(i);
|
|
194
|
-
}
|
|
195
|
-
}), /* @__PURE__ */ o(re, { children: n.map((c) => g.instances.has(c) ? /* @__PURE__ */ o(bt, { id: c, selected: e === c, onSelect: t }, c) : null) });
|
|
196
|
-
}
|
|
197
|
-
function vt(e) {
|
|
198
|
-
const t = [];
|
|
199
|
-
for (let s = 0; s < e; s++) {
|
|
200
|
-
const r = s / e, c = 0.45 + 4.1 * Math.sqrt(r) + (Math.random() - 0.5) * 0.4, y = s % 3 / 3 * Math.PI * 2 + c * 1.3 + (Math.random() - 0.5) * 0.5;
|
|
201
|
-
t.push(new p.Vector3(Math.cos(y) * c, (Math.random() - 0.5) * 0.5 * (1.4 - r), Math.sin(y) * c));
|
|
202
|
-
}
|
|
203
|
-
return t;
|
|
204
|
-
}
|
|
205
|
-
const Be = 32, ke = new p.Color(5, 5, 5), At = 200, ue = 6;
|
|
206
|
-
function Ct({ galaxy: e }) {
|
|
207
|
-
const t = G(() => {
|
|
208
|
-
const T = e.nodes.slice(0, At), E = new Set(T.map((m) => m.id));
|
|
209
|
-
return { nodes: T, links: e.links.filter((m) => E.has(m.source) && E.has(m.target)) };
|
|
210
|
-
}, [e]), n = S([]), s = S([]), r = S([]), c = S(Array(ue).fill(-1)), i = S(null), y = S(null), a = S(null), M = S(null), u = t.nodes.length, f = G(() => vt(u), [u]), w = G(() => t.nodes.map((T) => new p.Color(Ze[T.kind] ?? "#94a3b8")), [t]), A = G(() => new Float32Array(Math.max(1, u)), [u]), B = G(() => new Uint8Array(Math.max(1, u)), [u]), v = G(() => new p.Object3D(), []), x = G(() => new p.Color(), []), b = G(() => new p.Vector3(), []), W = G(() => {
|
|
211
|
-
const T = new Map(t.nodes.map((d, l) => [d.id, l])), E = [], m = [], z = /* @__PURE__ */ new Set(), $ = (d, l) => {
|
|
212
|
-
const h = d < l ? `${d}-${l}` : `${l}-${d}`;
|
|
213
|
-
d === l || z.has(h) || (z.add(h), E.push(f[d].x, f[d].y, f[d].z, f[l].x, f[l].y, f[l].z), m.push(w[d].r, w[d].g, w[d].b, w[l].r, w[l].g, w[l].b));
|
|
214
|
-
};
|
|
215
|
-
for (const d of t.links) {
|
|
216
|
-
const l = T.get(d.source), h = T.get(d.target);
|
|
217
|
-
l !== void 0 && h !== void 0 && f[l].distanceTo(f[h]) < 3 && $(l, h);
|
|
218
|
-
}
|
|
219
|
-
for (let d = 0; d < u; d++) {
|
|
220
|
-
let l = -1, h = -1, k = 1e9, R = 1e9;
|
|
221
|
-
for (let P = 0; P < u; P++) {
|
|
222
|
-
if (P === d) continue;
|
|
223
|
-
const O = f[d].distanceToSquared(f[P]);
|
|
224
|
-
O < k ? (h = l, R = k, l = P, k = O) : O < R && (h = P, R = O);
|
|
225
|
-
}
|
|
226
|
-
l >= 0 && $(d, l), h >= 0 && R < 1.2 && $(d, h);
|
|
227
|
-
}
|
|
228
|
-
const D = new p.BufferGeometry();
|
|
229
|
-
return D.setAttribute("position", new p.Float32BufferAttribute(E, 3)), D.setAttribute("color", new p.Float32BufferAttribute(m, 3)), D;
|
|
230
|
-
}, [t, f, w, u]);
|
|
231
|
-
De(() => (N.pos = f, N.index = new Map(t.nodes.map((T, E) => [T.name.toLowerCase(), E])), N.group = i.current, () => void (N.group = null)), [t, f]), F(({ camera: T, clock: E }) => {
|
|
232
|
-
const m = i.current, z = y.current;
|
|
233
|
-
if (!m || !z) return;
|
|
234
|
-
m.updateMatrixWorld();
|
|
235
|
-
const $ = performance.now();
|
|
236
|
-
A.fill(0), B.fill(0);
|
|
237
|
-
let D = 0;
|
|
238
|
-
for (const l of g.flares) {
|
|
239
|
-
const h = ($ - l.start) / 1e3, k = Se(l.node), R = Math.exp(-h * 1.3);
|
|
240
|
-
if (R > A[k] && (A[k] = R), l.op === "write" && (B[k] = 1), a.current && D < Be && h < 1.6) {
|
|
241
|
-
b.copy(f[k]).applyMatrix4(m.matrixWorld), v.position.copy(b), v.quaternion.copy(T.quaternion);
|
|
242
|
-
const P = h / 1.6;
|
|
243
|
-
v.scale.setScalar((l.op === "write" ? 0.6 + P * 3.2 : 0.3 + P * 1.4) * (1 - P * 0.2)), v.updateMatrix(), a.current.setMatrixAt(D, v.matrix), l.op === "write" ? x.copy(ke).multiplyScalar(1 - P) : x.copy(w[k]).multiplyScalar(3 * (1 - P)), a.current.setColorAt(D, x), D++;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
a.current && (a.current.count = D, a.current.instanceMatrix.needsUpdate = !0, a.current.instanceColor && (a.current.instanceColor.needsUpdate = !0));
|
|
247
|
-
let d = 0;
|
|
248
|
-
for (let l = g.flares.length - 1; l >= 0 && d < ue; l--) {
|
|
249
|
-
const h = g.flares[l], k = ($ - h.start) / 1e3;
|
|
250
|
-
if (k > 1.8) continue;
|
|
251
|
-
const R = Se(h.node);
|
|
252
|
-
let P = !1;
|
|
253
|
-
for (let H = 0; H < d; H++) c.current[H] === R && (P = !0);
|
|
254
|
-
if (P) continue;
|
|
255
|
-
const O = n.current[d], Q = s.current[d];
|
|
256
|
-
O && Q && (O.position.copy(f[R]), (c.current[d] !== R || r.current[d] !== h.op) && (Q.setText(`${h.op === "write" ? "wrote · " : ""}${h.node}`), r.current[d] = h.op, Q.setColor(h.op === "write" ? "#ffffff" : `#${w[R].getHexString()}`)), Q.setOpacity(Math.min(1, (1.8 - k) / 0.5)), O.visible = !0), c.current[d] = R, d++;
|
|
257
|
-
}
|
|
258
|
-
for (let l = d; l < ue; l++)
|
|
259
|
-
c.current[l] = -1, n.current[l] && (n.current[l].visible = !1);
|
|
260
|
-
for (let l = 0; l < u; l++) {
|
|
261
|
-
const h = A[l];
|
|
262
|
-
v.position.copy(f[l]), v.quaternion.identity(), v.scale.setScalar(1 + h * (B[l] ? 4.5 : 3)), v.updateMatrix(), z.setMatrixAt(l, v.matrix), x.copy(w[l]).multiplyScalar(0.85 + h * 5), B[l] && x.lerp(ke, h * 0.7), z.setColorAt(l, x);
|
|
263
|
-
}
|
|
264
|
-
z.instanceMatrix.needsUpdate = !0, z.instanceColor && (z.instanceColor.needsUpdate = !0), M.current && M.current.scale.setScalar(1 + Math.sin(E.elapsedTime * 1.3) * 0.06);
|
|
265
|
-
});
|
|
266
|
-
const L = G(() => new p.Color("#c7d2fe").multiplyScalar(2.4), []);
|
|
267
|
-
return /* @__PURE__ */ C(re, { children: [
|
|
268
|
-
/* @__PURE__ */ C("group", { ref: i, rotation: [0.3, 0, 0.08], scale: 1.35, children: [
|
|
269
|
-
/* @__PURE__ */ C("instancedMesh", { ref: y, args: [void 0, void 0, Math.max(1, u)], frustumCulled: !1, children: [
|
|
270
|
-
/* @__PURE__ */ o("sphereGeometry", { args: [0.065, 10, 10] }),
|
|
271
|
-
/* @__PURE__ */ o("meshBasicMaterial", { toneMapped: !1 })
|
|
272
|
-
] }),
|
|
273
|
-
/* @__PURE__ */ o("lineSegments", { geometry: W, children: /* @__PURE__ */ o("lineBasicMaterial", { vertexColors: !0, transparent: !0, opacity: 0.4, blending: p.AdditiveBlending, depthWrite: !1, toneMapped: !1 }) }),
|
|
274
|
-
/* @__PURE__ */ C("mesh", { ref: M, children: [
|
|
275
|
-
/* @__PURE__ */ o("sphereGeometry", { args: [0.38, 32, 32] }),
|
|
276
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: L, toneMapped: !1 })
|
|
277
|
-
] }),
|
|
278
|
-
/* @__PURE__ */ C("mesh", { children: [
|
|
279
|
-
/* @__PURE__ */ o("sphereGeometry", { args: [1.1, 32, 32] }),
|
|
280
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: "#818cf8", transparent: !0, opacity: 0.07, blending: p.AdditiveBlending, depthWrite: !1, toneMapped: !1 })
|
|
281
|
-
] }),
|
|
282
|
-
Array.from({ length: ue }, (T, E) => /* @__PURE__ */ o("group", { ref: (m) => void (n.current[E] = m), visible: !1, children: /* @__PURE__ */ o(ge, { ref: (m) => void (s.current[E] = m), position: [0, 0.32, 0], text: "", size: 0.2, opacity: 0, pxRange: [8, 11.5] }) }, E)),
|
|
283
|
-
/* @__PURE__ */ o(Te, { count: V ? 30 : 110, scale: [9, 1.3, 9], size: 1.7, speed: V ? 0.05 : 0.3, color: "#a5b4fc", opacity: 0.6 })
|
|
284
|
-
] }),
|
|
285
|
-
/* @__PURE__ */ C("instancedMesh", { ref: a, args: [void 0, void 0, Be], frustumCulled: !1, children: [
|
|
286
|
-
/* @__PURE__ */ o("ringGeometry", { args: [0.2, 0.26, 40] }),
|
|
287
|
-
/* @__PURE__ */ o("meshBasicMaterial", { transparent: !0, blending: p.AdditiveBlending, depthWrite: !1, toneMapped: !1, side: p.DoubleSide })
|
|
288
|
-
] }),
|
|
289
|
-
/* @__PURE__ */ o(Ne, { position: [0, -2.6, 0], color: "#a5b4fc", size: 0.42, pxRange: [10, 15] })
|
|
290
|
-
] });
|
|
291
|
-
}
|
|
292
|
-
const q = new p.Vector3(), Y = new p.Vector3(), I = new p.Color(), K = new p.Color(), Pe = new p.Color("#f59e0b"), Bt = new p.Color("#ef4444");
|
|
293
|
-
function kt(e, t, n) {
|
|
294
|
-
const s = g.mcpServers.get(e);
|
|
295
|
-
return s ? (he(s.slot, t, n), !0) : !1;
|
|
296
|
-
}
|
|
297
|
-
const ae = 900, te = 22;
|
|
298
|
-
function Pt() {
|
|
299
|
-
const e = G(() => {
|
|
300
|
-
const t = new p.BufferGeometry();
|
|
301
|
-
return t.setAttribute("position", new p.BufferAttribute(new Float32Array(ae * 6), 3)), t.setAttribute("color", new p.BufferAttribute(new Float32Array(ae * 6), 3)), t;
|
|
302
|
-
}, []);
|
|
303
|
-
return F(({ clock: t }) => {
|
|
304
|
-
const n = e.getAttribute("position"), s = e.getAttribute("color"), r = performance.now(), c = t.elapsedTime;
|
|
305
|
-
let i = 0;
|
|
306
|
-
const y = (a, M, u, f) => {
|
|
307
|
-
i >= ae || (n.setXYZ(i * 2, a.x, a.y, a.z), n.setXYZ(i * 2 + 1, M.x, M.y, M.z), s.setXYZ(i * 2, u.r, u.g, u.b), s.setXYZ(i * 2 + 1, f.r, f.g, f.b), i++);
|
|
308
|
-
};
|
|
309
|
-
for (const a of g.flares) {
|
|
310
|
-
const M = (r - a.start) / 1900;
|
|
311
|
-
if (M >= 1 || !j(a.instance)) continue;
|
|
312
|
-
const u = Z(a.instance, c, r);
|
|
313
|
-
if (!u || !ut(a.node, Y)) continue;
|
|
314
|
-
const f = g.instances.get(a.instance), w = 1 - M;
|
|
315
|
-
a.op === "write" ? (I.setRGB(3, 3, 3.4).multiplyScalar(w), K.setRGB(5, 5, 5).multiplyScalar(w)) : (I.set(f ? ce[f.type] : "#c7d2fe").multiplyScalar(1.6 * w), K.copy(I).multiplyScalar(1.6)), y(u, Y, I, K);
|
|
316
|
-
}
|
|
317
|
-
for (const a of g.instances.values()) {
|
|
318
|
-
if (!a.parent || !j(a)) continue;
|
|
319
|
-
const M = g.instances.get(a.parent);
|
|
320
|
-
if (!M) continue;
|
|
321
|
-
const u = (r - a.bornAt) / 1e3, f = u < 1.4 ? 1 - u / 1.4 : 0, w = J(a.type) && !a.exitAt ? 0.35 : 0, A = Math.max(f * 3, w);
|
|
322
|
-
if (A <= 0.01) continue;
|
|
323
|
-
const B = Z(a.parent, c, r), v = Z(a.id, c, r);
|
|
324
|
-
!B || !v || (I.set(ce[M.type]).multiplyScalar(A), K.set(ce[a.type]).multiplyScalar(A * 1.4), y(B, v, I, K));
|
|
325
|
-
}
|
|
326
|
-
for (const a of g.mcpPending.values()) {
|
|
327
|
-
if (!j(a.instance)) continue;
|
|
328
|
-
const M = Z(a.instance, c, r), u = g.mcpServers.get(a.server);
|
|
329
|
-
if (!M || !u) continue;
|
|
330
|
-
he(u.slot, c, Y);
|
|
331
|
-
const f = Ve(a, r), w = Math.min(1, f / 2.2), A = K.set(u.color);
|
|
332
|
-
w < 0.5 ? A.lerp(Pe, w * 2) : A.copy(Pe).lerp(Bt, (w - 0.5) * 2);
|
|
333
|
-
const B = 0.8 + Math.min(2.5, f * 0.9), v = c * (V ? 0.3 : 1.4);
|
|
334
|
-
for (let x = 0; x < te; x++) {
|
|
335
|
-
const b = x / te, W = (x + 0.55) / te, L = ((b - v) % 1 + 1) % 1, T = 0.25 + Math.pow(1 - L, 6) * 2.2 + ((b * 3 - v * 3) % 1 + 1) % 1 * 0.15;
|
|
336
|
-
I.copy(A).multiplyScalar(T * B), q.copy(M).lerp(Y, b);
|
|
337
|
-
const E = q.x, m = q.y, z = q.z;
|
|
338
|
-
if (q.copy(M).lerp(Y, W), i >= ae) break;
|
|
339
|
-
n.setXYZ(i * 2, E, m, z), n.setXYZ(i * 2 + 1, q.x, q.y, q.z), s.setXYZ(i * 2, I.r, I.g, I.b), s.setXYZ(i * 2 + 1, I.r, I.g, I.b), i++;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
for (const a of g.mcpResolved) {
|
|
343
|
-
const M = (r - a.resolvedAt) / 700;
|
|
344
|
-
if (M >= 1 || !j(a.instance)) continue;
|
|
345
|
-
const u = Z(a.instance, c, r), f = g.mcpServers.get(a.server);
|
|
346
|
-
if (!u || !f) continue;
|
|
347
|
-
he(f.slot, c, Y);
|
|
348
|
-
const w = 1 - M;
|
|
349
|
-
for (let A = 0; A < te; A++) {
|
|
350
|
-
const B = A / te, v = (A + 1) / te, x = Math.abs(B - w), b = (1 - M) * (0.15 + Math.exp(-x * 18) * 5);
|
|
351
|
-
I.set(f.color).lerp(K.setRGB(1, 1, 1), 0.6).multiplyScalar(b), q.copy(u).lerp(Y, B);
|
|
352
|
-
const W = q.x, L = q.y, T = q.z;
|
|
353
|
-
if (q.copy(u).lerp(Y, v), i >= ae) break;
|
|
354
|
-
n.setXYZ(i * 2, W, L, T), n.setXYZ(i * 2 + 1, q.x, q.y, q.z), s.setXYZ(i * 2, I.r, I.g, I.b), s.setXYZ(i * 2 + 1, I.r, I.g, I.b), i++;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
e.setDrawRange(0, i * 2), n.needsUpdate = !0, s.needsUpdate = !0;
|
|
358
|
-
}), /* @__PURE__ */ o("lineSegments", { geometry: e, frustumCulled: !1, children: /* @__PURE__ */ o("lineBasicMaterial", { vertexColors: !0, transparent: !0, opacity: 0.95, blending: p.AdditiveBlending, depthWrite: !1, toneMapped: !1 }) });
|
|
359
|
-
}
|
|
360
|
-
function Gt(e, t, n, s, r) {
|
|
361
|
-
const c = (e.x + t.x) / 2, i = (e.y + t.y) / 2 + s, y = (e.z + t.z) / 2, a = 1 - n;
|
|
362
|
-
return r.set(a * a * e.x + 2 * a * n * c + n * n * t.x, a * a * e.y + 2 * a * n * i + n * n * t.y, a * a * e.z + 2 * a * n * y + n * n * t.z);
|
|
363
|
-
}
|
|
364
|
-
function Rt({ comet: e }) {
|
|
365
|
-
const t = S(null), n = g.instances.get(e.from), s = n ? ce[n.type] : "#ffffff", r = G(() => new p.Color(s).multiplyScalar(4), [s]);
|
|
366
|
-
return F(({ clock: c }) => {
|
|
367
|
-
const i = performance.now(), y = Math.min(1, (i - e.start) / e.dur), a = y < 0.5 ? 2 * y * y : 1 - Math.pow(-2 * y + 2, 2) / 2, M = Z(e.from, c.elapsedTime, i), u = Z(e.to, c.elapsedTime, i);
|
|
368
|
-
!t.current || !M || !u || (Y.copy(M), Gt(Y, u, a, 1.2 + M.distanceTo(u) * 0.15, t.current.position), t.current.scale.setScalar(y >= 1 ? 1e-3 : 1));
|
|
369
|
-
}), /* @__PURE__ */ o(me, { width: 2.2, length: 7, color: s, attenuation: (c) => c * c, decay: 1.2, children: /* @__PURE__ */ C("mesh", { ref: t, scale: 1e-3, children: [
|
|
370
|
-
/* @__PURE__ */ o("sphereGeometry", { args: [0.13, 14, 14] }),
|
|
371
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: r, toneMapped: !1 })
|
|
372
|
-
] }) });
|
|
373
|
-
}
|
|
374
|
-
function Tt() {
|
|
375
|
-
const [e, t] = se([]), n = S(-1);
|
|
376
|
-
return F(() => {
|
|
377
|
-
let s = g.comets.length * 7919 + ee.version * 104729;
|
|
378
|
-
for (const r of g.comets) s += r.id;
|
|
379
|
-
s !== n.current && (n.current = s, t(ee.grouped ? g.comets.filter((r) => j(r.from) && j(r.to)) : g.comets.slice()));
|
|
380
|
-
}), /* @__PURE__ */ o(re, { children: e.map((s) => /* @__PURE__ */ o(Rt, { comet: s }, s.id)) });
|
|
381
|
-
}
|
|
382
|
-
const Et = new p.Vector3(0, 1, 0);
|
|
383
|
-
function zt({ call: e }) {
|
|
384
|
-
var r;
|
|
385
|
-
const t = S(null), n = ((r = g.mcpServers.get(e.server)) == null ? void 0 : r.color) ?? "#e5e7eb", s = G(() => new p.Color(n).lerp(new p.Color("#ffffff"), 0.35).multiplyScalar(6), [n]);
|
|
386
|
-
return F(({ clock: c }) => {
|
|
387
|
-
const i = performance.now(), y = Math.min(1, (i - e.start) / e.dur), a = y * y * (3 - 2 * y), M = Z(e.instance, c.elapsedTime, i);
|
|
388
|
-
if (!t.current || !M || !kt(e.server, c.elapsedTime, Y)) return;
|
|
389
|
-
const u = e.phase === "call" ? M : Y, f = e.phase === "call" ? Y : M;
|
|
390
|
-
t.current.position.copy(u).lerp(f, a), q.copy(f).sub(u).normalize(), t.current.quaternion.setFromUnitVectors(Et, q), t.current.scale.set(y >= 1 ? 1e-3 : 1, y >= 1 ? 1e-3 : 1, y >= 1 ? 1e-3 : 1);
|
|
391
|
-
}), /* @__PURE__ */ o(me, { width: 1.4, length: 10, color: n, attenuation: (c) => c * c * c, decay: 1.5, children: /* @__PURE__ */ C("mesh", { ref: t, scale: 1e-3, children: [
|
|
392
|
-
/* @__PURE__ */ o("capsuleGeometry", { args: [0.05, 0.7, 4, 8] }),
|
|
393
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: s, toneMapped: !1 })
|
|
394
|
-
] }) });
|
|
395
|
-
}
|
|
396
|
-
function It() {
|
|
397
|
-
const [e, t] = se([]), n = S(-1);
|
|
398
|
-
return F(() => {
|
|
399
|
-
let s = g.mcpCalls.length * 7919 + ee.version * 104729;
|
|
400
|
-
for (const r of g.mcpCalls) s += r.id;
|
|
401
|
-
s !== n.current && (n.current = s, t(ee.grouped ? g.mcpCalls.filter((r) => j(r.instance)) : g.mcpCalls.slice()));
|
|
402
|
-
}), /* @__PURE__ */ o(re, { children: e.map((s) => /* @__PURE__ */ o(zt, { call: s }, s.id)) });
|
|
403
|
-
}
|
|
404
|
-
function Lt({ name: e }) {
|
|
405
|
-
const n = g.mcpServers.get(e).color, s = S(null), r = S(null), c = S(null), i = S(null), y = S(null), a = G(() => new p.Color(n), [n]), M = G(() => new p.Color(n).lerp(new p.Color("#1e3a8a"), 0.6).multiplyScalar(0.9), [n]);
|
|
406
|
-
return F(({ clock: u }, f) => {
|
|
407
|
-
const w = g.mcpServers.get(e);
|
|
408
|
-
if (!w || !s.current) return;
|
|
409
|
-
const A = performance.now(), B = u.elapsedTime;
|
|
410
|
-
he(w.slot, B, s.current.position);
|
|
411
|
-
const v = Math.exp(-((A - w.activeAt) / 1e3) * 1.8), x = w.inflight > 0, b = V ? 0.25 : 1;
|
|
412
|
-
r.current && (r.current.rotation.x += f * (x ? 2.4 : 0.35) * b), c.current && c.current.material.color.copy(a).multiplyScalar(0.9 + (x ? 1.6 + Math.sin(B * 6) * 0.6 : 0) + v * 3), i.current && (i.current.rotation.z += f * (x ? 1.5 : 0.25) * b, i.current.material.color.copy(a).multiplyScalar(0.7 + v * 3 + (x ? 1 : 0))), y.current && (y.current.scale.setScalar(1 + v * 1.2 + (x ? 0.4 + Math.sin(B * 6) * 0.25 : 0)), y.current.material.opacity = 0.05 + v * 0.1 + (x ? 0.07 : 0));
|
|
413
|
-
}), /* @__PURE__ */ C("group", { ref: s, children: [
|
|
414
|
-
/* @__PURE__ */ C("mesh", { ref: c, children: [
|
|
415
|
-
/* @__PURE__ */ o("cylinderGeometry", { args: [0.22, 0.22, 0.75, 12] }),
|
|
416
|
-
/* @__PURE__ */ o("meshBasicMaterial", { toneMapped: !1 })
|
|
417
|
-
] }),
|
|
418
|
-
/* @__PURE__ */ C("mesh", { ref: i, rotation: [Math.PI / 2, 0, 0], children: [
|
|
419
|
-
/* @__PURE__ */ o("torusGeometry", { args: [0.5, 0.04, 8, 40] }),
|
|
420
|
-
/* @__PURE__ */ o("meshBasicMaterial", { toneMapped: !1 })
|
|
421
|
-
] }),
|
|
422
|
-
/* @__PURE__ */ o("group", { ref: r, children: [-1, 1].map((u) => /* @__PURE__ */ C("group", { children: [
|
|
423
|
-
/* @__PURE__ */ C("mesh", { position: [u * 0.55, 0, 0], children: [
|
|
424
|
-
/* @__PURE__ */ o("boxGeometry", { args: [0.3, 0.03, 0.03] }),
|
|
425
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: "#94a3b8" })
|
|
426
|
-
] }),
|
|
427
|
-
/* @__PURE__ */ C("mesh", { position: [u * 1.05, 0, 0], children: [
|
|
428
|
-
/* @__PURE__ */ o("boxGeometry", { args: [0.75, 0.02, 0.42] }),
|
|
429
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: M, toneMapped: !1 })
|
|
430
|
-
] })
|
|
431
|
-
] }, u)) }),
|
|
432
|
-
/* @__PURE__ */ C("mesh", { ref: y, children: [
|
|
433
|
-
/* @__PURE__ */ o("sphereGeometry", { args: [0.55, 20, 20] }),
|
|
434
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: n, transparent: !0, opacity: 0.1, blending: p.AdditiveBlending, depthWrite: !1, toneMapped: !1 })
|
|
435
|
-
] }),
|
|
436
|
-
/* @__PURE__ */ o(ge, { position: [0, -1.1, 0], text: `MCP · ${e}`, color: n, size: 0.3, pxRange: [9, 13] })
|
|
437
|
-
] });
|
|
438
|
-
}
|
|
439
|
-
function Ot() {
|
|
440
|
-
const [e, t] = se([]), n = S(-1);
|
|
441
|
-
return F(() => {
|
|
442
|
-
g.mcpServers.size !== n.current && (n.current = g.mcpServers.size, t([...g.mcpServers.keys()]));
|
|
443
|
-
}), /* @__PURE__ */ o(re, { children: e.map((s) => g.mcpServers.has(s) ? /* @__PURE__ */ o(Lt, { name: s }, s) : null) });
|
|
444
|
-
}
|
|
445
|
-
const ve = { queued: "#64748b", running: "#fbbf24", done: "#22c55e", failed: "#ef4444" };
|
|
446
|
-
function qt({ id: e, color: t, pos: n, lref: s }) {
|
|
447
|
-
const c = je().runs.get(e);
|
|
448
|
-
if (!c) return null;
|
|
449
|
-
const i = c.status !== "started", y = [{ text: "hatchet ", color: t }, { text: c.topic, color: "#f1f5f9" }, { text: " " }];
|
|
450
|
-
for (const a of fe) y.push({ text: ` ${c.steps[a] === "running" ? "›" : "·"}${a}`, color: ve[c.steps[a]] });
|
|
451
|
-
return i && y.push({ text: " brief ready", color: "#4ade80" }), /* @__PURE__ */ o(ge, { ref: s, position: n, text: y, color: t, size: 0.34, maxWidth: 16, opacity: i ? 0.65 : 1, fadeMs: 300, pxRange: [9.5, 14] });
|
|
452
|
-
}
|
|
453
|
-
function Wt({ id: e }) {
|
|
454
|
-
const t = g.runs.get(e), n = Ae(t.slot), s = G(() => Re(e), [e]), r = t.color, c = S(null), i = S([]), y = S([]), a = S(null), M = S(null), u = G(() => new p.Color(), []), f = G(() => new p.Color(r), [r]), w = G(() => fe.map((x) => ie(n.r, U[x], new p.Vector3())), [n.r]), A = G(() => ie(n.r, U.plan - 0.42, new p.Vector3()).setY(1), [n.r]);
|
|
455
|
-
F(({ clock: x }) => {
|
|
456
|
-
var D;
|
|
457
|
-
const b = g.runs.get(e);
|
|
458
|
-
if (!b) return;
|
|
459
|
-
const W = performance.now(), L = x.elapsedTime, T = Math.min(1, (W - b.startedAt) / 900), E = b.endedAt ? Math.max(0, 1 - (W - b.endedAt) / He) : 1, m = T * E, z = b.endedAt ? Math.exp(-((W - b.endedAt) / 1e3) * 2.5) : 0;
|
|
460
|
-
if (c.current) {
|
|
461
|
-
const d = c.current.material;
|
|
462
|
-
d.opacity = m * 0.75, d.color.copy(f).multiplyScalar(1.1 + z * 3), b.status === "completed" && d.color.lerp(u.set("#4ade80"), z);
|
|
463
|
-
}
|
|
464
|
-
fe.forEach((d, l) => {
|
|
465
|
-
const h = b.steps[d], k = h === "running" ? 0.5 + 0.5 * Math.sin(L * (V ? 2 : 6)) : 0, R = i.current[l];
|
|
466
|
-
if (R) {
|
|
467
|
-
u.set(ve[h]).multiplyScalar(h === "queued" ? 0.7 : h === "running" ? 2 + k * 2 : 2.4);
|
|
468
|
-
const O = R.material;
|
|
469
|
-
O.color.copy(u), O.opacity = m, R.scale.setScalar((h === "running" ? 1.3 + k * 0.25 : h === "done" ? 1.05 : 0.8) * Math.max(0.01, m));
|
|
470
|
-
}
|
|
471
|
-
const P = y.current[l];
|
|
472
|
-
if (P) {
|
|
473
|
-
P.visible = h !== "queued";
|
|
474
|
-
const O = P.material;
|
|
475
|
-
O.color.set(ve[h]), O.opacity = m * (h === "running" ? 0.35 + k * 0.4 : 0.18), P.scale.setScalar(h === "running" ? 1.6 + k * 0.9 : 1.3);
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
const $ = b.handoffAt ? (W - b.handoffAt) / 1400 : 2;
|
|
479
|
-
if (a.current) {
|
|
480
|
-
const d = U[b.handoffFrom];
|
|
481
|
-
let l = U[b.handoffTo];
|
|
482
|
-
l < d && (l += Math.PI * 2);
|
|
483
|
-
const h = $ >= 1 ? 1 : 1 - Math.pow(1 - Math.max(0, $), 3);
|
|
484
|
-
ie(n.r, d + (l - d) * h, a.current.position), a.current.scale.setScalar($ < 1 ? 1 : 1e-3);
|
|
485
|
-
}
|
|
486
|
-
(D = M.current) == null || D.setOpacity(m);
|
|
487
|
-
});
|
|
488
|
-
const B = G(() => new p.Color(r), [r]), v = G(() => new p.Color("#fde68a").multiplyScalar(5), []);
|
|
489
|
-
return /* @__PURE__ */ o("group", { quaternion: n.q, children: /* @__PURE__ */ C("group", { rotation: [0, -s, 0], children: [
|
|
490
|
-
/* @__PURE__ */ C("mesh", { ref: c, rotation: [Math.PI / 2, 0, 0], children: [
|
|
491
|
-
/* @__PURE__ */ o("torusGeometry", { args: [n.r, 0.028, 8, 320] }),
|
|
492
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: B, transparent: !0, opacity: 0, toneMapped: !1, depthWrite: !1 })
|
|
493
|
-
] }),
|
|
494
|
-
fe.map((x, b) => /* @__PURE__ */ C("group", { position: w[b], children: [
|
|
495
|
-
/* @__PURE__ */ C("mesh", { ref: (W) => void (i.current[b] = W), children: [
|
|
496
|
-
/* @__PURE__ */ o("octahedronGeometry", { args: [0.26, 0] }),
|
|
497
|
-
/* @__PURE__ */ o("meshBasicMaterial", { transparent: !0, toneMapped: !1 })
|
|
498
|
-
] }),
|
|
499
|
-
/* @__PURE__ */ C("mesh", { ref: (W) => void (y.current[b] = W), rotation: [Math.PI / 2, 0, 0], children: [
|
|
500
|
-
/* @__PURE__ */ o("ringGeometry", { args: [0.34, 0.42, 40] }),
|
|
501
|
-
/* @__PURE__ */ o("meshBasicMaterial", { transparent: !0, blending: p.AdditiveBlending, depthWrite: !1, toneMapped: !1, side: p.DoubleSide })
|
|
502
|
-
] })
|
|
503
|
-
] }, x)),
|
|
504
|
-
/* @__PURE__ */ o(me, { width: 3.2, length: 9, color: "#fde68a", attenuation: (x) => x * x, children: /* @__PURE__ */ C("mesh", { ref: a, scale: 1e-3, children: [
|
|
505
|
-
/* @__PURE__ */ o("sphereGeometry", { args: [0.16, 12, 12] }),
|
|
506
|
-
/* @__PURE__ */ o("meshBasicMaterial", { color: v, toneMapped: !1 })
|
|
507
|
-
] }) }),
|
|
508
|
-
/* @__PURE__ */ o(qt, { id: e, color: r, pos: A, lref: M })
|
|
509
|
-
] }) });
|
|
510
|
-
}
|
|
511
|
-
function Dt() {
|
|
512
|
-
const [e, t] = se([]), n = S(-1);
|
|
513
|
-
return F(() => {
|
|
514
|
-
let s = g.runs.size * 7919 + ee.version * 104729;
|
|
515
|
-
for (const r of g.runs.values()) s += r.startedAt;
|
|
516
|
-
if (s !== n.current) {
|
|
517
|
-
n.current = s;
|
|
518
|
-
const r = [];
|
|
519
|
-
for (const c of g.runs.keys()) Qe(c) && r.push(c);
|
|
520
|
-
t(r);
|
|
521
|
-
}
|
|
522
|
-
}), /* @__PURE__ */ o(re, { children: e.map((s) => g.runs.has(s) ? /* @__PURE__ */ o(Wt, { id: s }, s) : null) });
|
|
523
|
-
}
|
|
524
|
-
function _t() {
|
|
525
|
-
return F(() => {
|
|
526
|
-
et(), tt();
|
|
527
|
-
}), null;
|
|
528
|
-
}
|
|
529
|
-
function Vt() {
|
|
530
|
-
const e = Ke(), [t, n] = se(null);
|
|
531
|
-
return /* @__PURE__ */ C("div", { className: "scene-root", children: [
|
|
532
|
-
/* @__PURE__ */ C(Ie, { camera: { position: [0, 14, 30], fov: 50 }, dpr: [1, 2], gl: { antialias: !1, powerPreference: "high-performance" }, onPointerMissed: () => n(null), children: [
|
|
533
|
-
/* @__PURE__ */ o("color", { attach: "background", args: ["#03050b"] }),
|
|
534
|
-
/* @__PURE__ */ o("fog", { attach: "fog", args: ["#03050b", 40, 90] }),
|
|
535
|
-
/* @__PURE__ */ o(_t, {}),
|
|
536
|
-
/* @__PURE__ */ o(Ee, { radius: 110, depth: 50, count: V ? 1500 : 5e3, factor: 3.4, saturation: 0.4, fade: !0, speed: V ? 0 : 0.2 }),
|
|
537
|
-
/* @__PURE__ */ o(Ct, { galaxy: e }),
|
|
538
|
-
/* @__PURE__ */ o(Dt, {}),
|
|
539
|
-
/* @__PURE__ */ o(St, { selected: t, onSelect: n }),
|
|
540
|
-
/* @__PURE__ */ o(Pt, {}),
|
|
541
|
-
/* @__PURE__ */ o(Tt, {}),
|
|
542
|
-
/* @__PURE__ */ o(It, {}),
|
|
543
|
-
/* @__PURE__ */ o(Ot, {}),
|
|
544
|
-
/* @__PURE__ */ o(gt, {}),
|
|
545
|
-
/* @__PURE__ */ o(ze, { makeDefault: !0, enableDamping: !0, dampingFactor: 0.06, autoRotate: !1, minDistance: 8, maxDistance: 70 }),
|
|
546
|
-
/* @__PURE__ */ C(Le, { multisampling: 0, children: [
|
|
547
|
-
/* @__PURE__ */ o(Oe, { mipmapBlur: !0, intensity: 1.3, luminanceThreshold: 0.2, luminanceSmoothing: 0.25, radius: 0.78 }),
|
|
548
|
-
/* @__PURE__ */ o(qe, { eskil: !1, offset: 0.25, darkness: 0.85 }),
|
|
549
|
-
/* @__PURE__ */ o(We, { opacity: 0.025 })
|
|
550
|
-
] })
|
|
551
|
-
] }),
|
|
552
|
-
/* @__PURE__ */ o(
|
|
553
|
-
Je,
|
|
554
|
-
{
|
|
555
|
-
title: "orbit · planetary system",
|
|
556
|
-
subtitle: "knowledge-graph galaxy core · each Hatchet run is an orbit · agents are born, work and implode · MCP stations on the rim",
|
|
557
|
-
selected: t,
|
|
558
|
-
onClose: () => n(null)
|
|
559
|
-
}
|
|
560
|
-
)
|
|
561
|
-
] });
|
|
562
|
-
}
|
|
563
|
-
export {
|
|
564
|
-
Vt as default
|
|
565
|
-
};
|