agentglow 0.2.11 → 0.3.0
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 +3 -16
- package/cli/agentglow.mjs +22 -3
- package/cli/lib/server.mjs +44 -13
- package/cli/lib/settings.mjs +3 -3
- package/dist/chunks/KitScene-C_6JIRsN.js +4264 -0
- package/dist/chunks/index-Bp54n3io.js +48 -0
- package/dist/chunks/{index-CTZbUTDY.js → index-C8H7LPMJ.js} +136 -136
- package/dist/chunks/{index-URn4zDHp.js → index-CDuUwfpS.js} +297 -297
- package/dist/chunks/{index-B4Cqo621.js → index-CXqvoWvI.js} +155 -155
- package/dist/chunks/{index-u4rYZ1UO.js → index-CqpUvfPA.js} +135 -135
- package/dist/chunks/index-TlqkewVz.js +948 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/AgentScene.d.ts +1 -1
- package/dist/types/themes.d.ts +1 -1
- package/dist/types/world.d.ts +270 -2
- package/package.json +1 -1
- package/dist/chunks/KitScene-DG_pcnWW.js +0 -3119
- package/dist/chunks/index-Agh7jdYu.js +0 -1086
- package/dist/chunks/index-B2EHxcBQ.js +0 -1010
- package/dist/chunks/index-BfQsJ0TH.js +0 -751
- package/dist/chunks/index-BmBGYhJS.js +0 -891
- package/dist/chunks/index-Bnn-x-aE.js +0 -767
- package/dist/chunks/index-CTQTtm9q.js +0 -784
- package/dist/chunks/index-CdKvybsL.js +0 -1143
- package/dist/chunks/index-CeiIEWek.js +0 -818
- package/dist/chunks/index-Ci8tSMhc.js +0 -68
- package/dist/chunks/index-Cls_VZdb.js +0 -980
- package/dist/chunks/index-DFFRhihO.js +0 -892
- package/dist/chunks/index-DMCETM4H.js +0 -605
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var L = (e, n, r) =>
|
|
1
|
+
var st = Object.defineProperty;
|
|
2
|
+
var at = (e, n, r) => n in e ? st(e, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[n] = r;
|
|
3
|
+
var L = (e, n, r) => at(e, typeof n != "symbol" ? n + "" : n, r);
|
|
4
4
|
import { jsxs as q, Fragment as de, jsx as g } from "react/jsx-runtime";
|
|
5
|
-
import { EffectComposer as
|
|
5
|
+
import { EffectComposer as it, Bloom as ct, Vignette as lt } from "@react-three/postprocessing";
|
|
6
6
|
import * as t from "three";
|
|
7
|
-
import { T as We, h as X, K as
|
|
7
|
+
import { T as We, h as X, K as ft, o as je, w as N, a as ce, x as ut, C as dt, L as ye, G as pt, t as ht, m as tt, c as qe, d as mt, D as Ye, R as vt, u as gt, v as bt, e as wt, s as yt, f as Ve, n as St } from "./KitScene-C_6JIRsN.js";
|
|
8
8
|
import { useThree as Re, useFrame as se } from "@react-three/fiber";
|
|
9
9
|
import { useMemo as P, useRef as T, useEffect as Mt } from "react";
|
|
10
10
|
var et;
|
|
11
|
-
const Q = typeof window < "u" && !!((et = window.matchMedia) != null && et.call(window, "(prefers-reduced-motion: reduce)").matches), Z = (e) => e < 0 ? 0 : e > 1 ? 1 : e, we = (e) => 1 - Math.pow(1 - Z(e), 3), Ae = (e) => (e = Z(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2), K = new t.Color(1, 1, 1), Ce = new t.Color("#cfe0ff"), ke = new t.Color("#fbbf24"),
|
|
11
|
+
const Q = typeof window < "u" && !!((et = window.matchMedia) != null && et.call(window, "(prefers-reduced-motion: reduce)").matches), Z = (e) => e < 0 ? 0 : e > 1 ? 1 : e, we = (e) => 1 - Math.pow(1 - Z(e), 3), Ae = (e) => (e = Z(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2), K = new t.Color(1, 1, 1), Ce = new t.Color("#cfe0ff"), ke = new t.Color("#fbbf24"), xt = new t.Color("#ff3b4e"), Oe = Object.fromEntries(Object.entries(We).map(([e, n]) => [e, new t.Color(n).lerp(Ce, 0.45)]));
|
|
12
12
|
Object.fromEntries(Object.entries(We).map(([e, n]) => [e, new t.Color(n)]));
|
|
13
13
|
function Ke(e, n) {
|
|
14
14
|
const r = document.createElement("canvas");
|
|
@@ -16,16 +16,16 @@ function Ke(e, n) {
|
|
|
16
16
|
const o = new t.CanvasTexture(r);
|
|
17
17
|
return o.colorSpace = t.SRGBColorSpace, o;
|
|
18
18
|
}
|
|
19
|
-
let
|
|
19
|
+
let At = null;
|
|
20
20
|
function Pe() {
|
|
21
|
-
return
|
|
21
|
+
return At ?? (At = Ke(128, (e, n) => {
|
|
22
22
|
const r = e.createRadialGradient(n / 2, n / 2, 0, n / 2, n / 2, n / 2);
|
|
23
23
|
r.addColorStop(0, "rgba(255,255,255,1)"), r.addColorStop(0.12, "rgba(255,255,255,0.65)"), r.addColorStop(0.4, "rgba(255,255,255,0.13)"), r.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = r, e.fillRect(0, 0, n, n);
|
|
24
24
|
}));
|
|
25
25
|
}
|
|
26
|
-
let
|
|
27
|
-
function
|
|
28
|
-
return
|
|
26
|
+
let Ct = null;
|
|
27
|
+
function Pt() {
|
|
28
|
+
return Ct ?? (Ct = Ke(256, (e, n) => {
|
|
29
29
|
const r = n / 2, o = (h, p, y, A) => {
|
|
30
30
|
e.save(), e.translate(r, r), e.rotate(h);
|
|
31
31
|
const z = e.createLinearGradient(-p, 0, p, 0);
|
|
@@ -36,9 +36,9 @@ function Ct() {
|
|
|
36
36
|
c.addColorStop(0, "rgba(255,255,255,1)"), c.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = c, e.fillRect(0, 0, n, n);
|
|
37
37
|
}));
|
|
38
38
|
}
|
|
39
|
-
let
|
|
40
|
-
function
|
|
41
|
-
return
|
|
39
|
+
let zt = null;
|
|
40
|
+
function ot() {
|
|
41
|
+
return zt ?? (zt = Ke(256, (e, n) => {
|
|
42
42
|
const r = n / 2, o = e.createRadialGradient(r, r, r * 0.78, r, r, r * 0.98);
|
|
43
43
|
o.addColorStop(0, "rgba(255,255,255,0)"), o.addColorStop(0.55, "rgba(255,255,255,0.9)"), o.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = o, e.fillRect(0, 0, n, n);
|
|
44
44
|
}));
|
|
@@ -46,7 +46,7 @@ function tt() {
|
|
|
46
46
|
function le(e, n = "#fff") {
|
|
47
47
|
return new t.SpriteMaterial({ map: e, color: n, blending: t.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1 });
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const nt = () => new t.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: t.AdditiveBlending, depthWrite: !1, toneMapped: !1 }), Xe = new t.SphereGeometry(1, 32, 24), Rt = new t.ConeGeometry(1, 1, 3).translate(0, 0.5, 0), $e = new t.TorusGeometry(1, 0.012, 6, 96);
|
|
50
50
|
function fe(e, n, r, o, c) {
|
|
51
51
|
const h = 1 - o;
|
|
52
52
|
return c.set(h * h * e.x + 2 * h * o * n.x + o * o * r.x, h * h * e.y + 2 * h * o * n.y + o * o * r.y, h * h * e.z + 2 * h * o * n.z + o * o * r.z);
|
|
@@ -63,7 +63,7 @@ const Ge = class Ge {
|
|
|
63
63
|
L(this, "o", new t.Object3D());
|
|
64
64
|
L(this, "a", new t.Vector3());
|
|
65
65
|
L(this, "b", new t.Vector3());
|
|
66
|
-
this.max = n, this.colors = new Float32Array(n * 3), this.mesh = new t.InstancedMesh(
|
|
66
|
+
this.max = n, this.colors = new Float32Array(n * 3), this.mesh = new t.InstancedMesh(Rt, new t.MeshBasicMaterial({ blending: t.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1 }), n), this.mesh.instanceColor = new t.InstancedBufferAttribute(this.colors, 3), this.mesh.frustumCulled = !1, this.mesh.count = 0;
|
|
67
67
|
}
|
|
68
68
|
begin() {
|
|
69
69
|
this.n = 0;
|
|
@@ -85,7 +85,7 @@ class De {
|
|
|
85
85
|
L(this, "C");
|
|
86
86
|
L(this, "n", 0);
|
|
87
87
|
L(this, "p", new t.Vector3());
|
|
88
|
-
this.max = n, this.seg = r, this.P = new t.BufferAttribute(new Float32Array(n * r * 6), 3), this.C = new t.BufferAttribute(new Float32Array(n * r * 6), 3), this.geo.setAttribute("position", this.P), this.geo.setAttribute("color", this.C), this.geo.boundingSphere = new t.Sphere(new t.Vector3(), 1e4), this.obj = new t.LineSegments(this.geo,
|
|
88
|
+
this.max = n, this.seg = r, this.P = new t.BufferAttribute(new Float32Array(n * r * 6), 3), this.C = new t.BufferAttribute(new Float32Array(n * r * 6), 3), this.geo.setAttribute("position", this.P), this.geo.setAttribute("color", this.C), this.geo.boundingSphere = new t.Sphere(new t.Vector3(), 1e4), this.obj = new t.LineSegments(this.geo, nt()), this.obj.frustumCulled = !1;
|
|
89
89
|
}
|
|
90
90
|
begin() {
|
|
91
91
|
this.n = 0;
|
|
@@ -96,17 +96,17 @@ class De {
|
|
|
96
96
|
* @param dash flowing dash strength; dashDir +1 flows toward b
|
|
97
97
|
* @param head travelling bright head position (-1 = none); headK its strength
|
|
98
98
|
*/
|
|
99
|
-
add(n, r, o, c, h, p, y, A, z,
|
|
99
|
+
add(n, r, o, c, h, p, y, A, z, M, b, u) {
|
|
100
100
|
if (this.n >= this.max || y <= p) return;
|
|
101
|
-
const
|
|
102
|
-
for (let i = 0; i <
|
|
101
|
+
const S = this.seg, a = this.P, l = this.C;
|
|
102
|
+
for (let i = 0; i < S; i++)
|
|
103
103
|
for (let x = 0; x < 2; x++) {
|
|
104
|
-
const d = p + (y - p) * (i + x) /
|
|
104
|
+
const d = p + (y - p) * (i + x) / S;
|
|
105
105
|
fe(n, r, o, d, this.p);
|
|
106
|
-
const s = (this.n *
|
|
106
|
+
const s = (this.n * S + i) * 2 + x;
|
|
107
107
|
a.setXYZ(s, this.p.x, this.p.y, this.p.z);
|
|
108
108
|
let f = h;
|
|
109
|
-
A > 0 && (f += A * Math.pow(Math.max(0, Math.sin((d * 9 -
|
|
109
|
+
A > 0 && (f += A * Math.pow(Math.max(0, Math.sin((d * 9 - M * 0.9 * z) * Math.PI)), 8)), f *= 0.2 + 0.8 * Z(Math.min((d - p) / 0.06, (y - d) / 0.04)), b >= 0 && (f += u * Math.exp(-(((d - b) / 0.045) ** 2))), l.setXYZ(s, c.r * f, c.g * f, c.b * f);
|
|
110
110
|
}
|
|
111
111
|
this.n++;
|
|
112
112
|
}
|
|
@@ -114,12 +114,12 @@ class De {
|
|
|
114
114
|
this.geo.setDrawRange(0, this.n * this.seg * 2), this.P.needsUpdate = !0, this.C.needsUpdate = !0;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
const _e = 15, Be = 7.5,
|
|
117
|
+
const _e = 15, Be = 7.5, Bt = (
|
|
118
118
|
/* glsl */
|
|
119
119
|
`
|
|
120
120
|
attribute float aSize; attribute vec3 aColor; uniform float uScale; varying vec3 vC;
|
|
121
121
|
void main(){ vec4 mv = modelViewMatrix * vec4(position, 1.0); vC = aColor; gl_PointSize = aSize * uScale / -mv.z; gl_Position = projectionMatrix * mv; }`
|
|
122
|
-
),
|
|
122
|
+
), Tt = (
|
|
123
123
|
/* glsl */
|
|
124
124
|
`
|
|
125
125
|
varying vec3 vC;
|
|
@@ -130,7 +130,7 @@ void main(){ float r = length(gl_PointCoord - 0.5) * 2.0; if (r > 1.0) discard;
|
|
|
130
130
|
class Fe {
|
|
131
131
|
constructor(n) {
|
|
132
132
|
L(this, "geo", new t.BufferGeometry());
|
|
133
|
-
L(this, "mat", new t.ShaderMaterial({ uniforms: { uScale: { value: 400 } }, vertexShader:
|
|
133
|
+
L(this, "mat", new t.ShaderMaterial({ uniforms: { uScale: { value: 400 } }, vertexShader: Bt, fragmentShader: Tt, transparent: !0, depthWrite: !1, blending: t.AdditiveBlending }));
|
|
134
134
|
L(this, "obj");
|
|
135
135
|
L(this, "P");
|
|
136
136
|
L(this, "S");
|
|
@@ -151,10 +151,10 @@ class Fe {
|
|
|
151
151
|
this.geo.setDrawRange(0, this.n), this.P.needsUpdate = !0, this.S.needsUpdate = !0, this.C.needsUpdate = !0;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
const
|
|
154
|
+
const Vt = 260, Ee = 40, Ie = 8, Te = 4, _t = new t.Color("#9db4ff"), jt = (
|
|
155
155
|
/* glsl */
|
|
156
156
|
"varying vec2 vUv; void main(){ vUv = uv; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }"
|
|
157
|
-
),
|
|
157
|
+
), Ot = (
|
|
158
158
|
/* glsl */
|
|
159
159
|
`
|
|
160
160
|
uniform float uTime; uniform float uAct; varying vec2 vUv;
|
|
@@ -181,15 +181,15 @@ void main(){
|
|
|
181
181
|
col = mix(col, teal, smoothstep(0.62, 0.9, fbm(q * 0.7 + 9.0)) * 0.6);
|
|
182
182
|
col = mix(col, rose, smoothstep(0.55, 0.85, fbm(q * 0.9 - 5.0)) * 0.35);
|
|
183
183
|
float dens = pow(f, 1.6) * arms * mask;
|
|
184
|
-
vec3 c = col * dens * (
|
|
184
|
+
vec3 c = col * dens * (2.0 + uAct * 0.9) + vec3(0.55, 0.6, 0.95) * core * 0.5;
|
|
185
185
|
gl_FragColor = vec4(c, 1.0);
|
|
186
186
|
}`
|
|
187
|
-
),
|
|
187
|
+
), Gt = (
|
|
188
188
|
/* glsl */
|
|
189
189
|
`
|
|
190
190
|
attribute float aSize; attribute vec3 aColor; uniform float uScale; varying vec3 vC;
|
|
191
191
|
void main(){ vec4 mv = modelViewMatrix * vec4(position, 1.0); vC = aColor; gl_PointSize = aSize * uScale / -mv.z; gl_Position = projectionMatrix * mv; }`
|
|
192
|
-
),
|
|
192
|
+
), Ft = (
|
|
193
193
|
/* glsl */
|
|
194
194
|
`
|
|
195
195
|
varying vec3 vC;
|
|
@@ -197,8 +197,8 @@ void main(){ float r = length(gl_PointCoord - 0.5) * 2.0; if (r > 1.0) discard;
|
|
|
197
197
|
float core = smoothstep(0.4, 0.0, r); float halo = pow(1.0 - r, 2.4);
|
|
198
198
|
gl_FragColor = vec4(vC * (core * 1.25 + halo * 0.4), 1.0); }`
|
|
199
199
|
);
|
|
200
|
-
function
|
|
201
|
-
const n = P(() => ({ nodes: e.nodes.slice(0,
|
|
200
|
+
function Et({ galaxy: e }) {
|
|
201
|
+
const n = P(() => ({ nodes: e.nodes.slice(0, Vt), links: e.links }), [e]), r = n.nodes.length, { size: o, gl: c, camera: h } = Re(), p = T([]), y = T([]), A = T(Array(Te).fill("")), z = T([]), M = P(() => {
|
|
202
202
|
const s = new Float32Array(r * 3), f = -0.18, m = Math.cos(f), w = Math.sin(f);
|
|
203
203
|
n.nodes.forEach((R, j) => {
|
|
204
204
|
const I = X(R.id, 1);
|
|
@@ -212,7 +212,7 @@ function Ft({ galaxy: e }) {
|
|
|
212
212
|
}
|
|
213
213
|
s.set([H * m - O * w, H * w + O * m, (X(R.id, 4) - 0.5) * 4], j * 3);
|
|
214
214
|
});
|
|
215
|
-
const B = n.nodes.map((R) => new t.Color(
|
|
215
|
+
const B = n.nodes.map((R) => new t.Color(ft[R.kind] ?? "#94a3b8").lerp(_t, 0.45).multiplyScalar(1)), U = n.nodes.map((R) => 0.42 + Math.pow(X(R.id, 5), 4) * 0.55), V = new t.BufferGeometry();
|
|
216
216
|
V.setAttribute("position", new t.BufferAttribute(s, 3)), V.setAttribute("aSize", new t.BufferAttribute(new Float32Array(r), 1)), V.setAttribute("aColor", new t.BufferAttribute(new Float32Array(r * 3), 3));
|
|
217
217
|
const k = new Map(n.nodes.map((R, j) => [R.id, j])), E = [], F = new t.Vector3(), G = new t.Vector3();
|
|
218
218
|
for (const R of n.links) {
|
|
@@ -225,21 +225,21 @@ function Ft({ galaxy: e }) {
|
|
|
225
225
|
return D.setAttribute("position", new t.BufferAttribute(_, 3)), D.setAttribute("color", new t.BufferAttribute(new Float32Array(E.length * 3), 3)), { pos: s, base: B, baseSize: U, ngeo: V, lgeo: D, owner: Int32Array.from(E), fire: new Float32Array(r), white: new Float32Array(r), fireC: Array.from({ length: r }, () => new t.Color()), phase: n.nodes.map((R) => X(R.id, 6) * 6.283) };
|
|
226
226
|
}, [n, r]), b = P(
|
|
227
227
|
() => ({
|
|
228
|
-
gas: new t.ShaderMaterial({ uniforms: { uTime: { value: 0 }, uAct: { value: 0 } }, vertexShader:
|
|
229
|
-
nodes: new t.ShaderMaterial({ uniforms: { uScale: { value: 400 } }, vertexShader:
|
|
228
|
+
gas: new t.ShaderMaterial({ uniforms: { uTime: { value: 0 }, uAct: { value: 0 } }, vertexShader: jt, fragmentShader: Ot, transparent: !0, depthWrite: !1, blending: t.AdditiveBlending }),
|
|
229
|
+
nodes: new t.ShaderMaterial({ uniforms: { uScale: { value: 400 } }, vertexShader: Gt, fragmentShader: Ft, transparent: !0, depthWrite: !1, blending: t.AdditiveBlending }),
|
|
230
230
|
fil: new t.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: t.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
|
|
231
|
-
ripples: Array.from({ length: Ie }, () => le(
|
|
231
|
+
ripples: Array.from({ length: Ie }, () => le(ot(), "#000"))
|
|
232
232
|
}),
|
|
233
233
|
[]
|
|
234
|
-
), u = P(() => new De(Ee, 24), []),
|
|
234
|
+
), u = P(() => new De(Ee, 24), []), S = P(() => new ze(Ee), []), a = P(() => new Fe(Ee), []), l = P(() => /* @__PURE__ */ new Map(), [n]), i = P(() => ({ v: new t.Vector3(), w: new t.Vector3(), ctrl: new t.Vector3(), h: new t.Vector3(), c: new t.Color(), act: 0 }), []), x = (s) => {
|
|
235
235
|
let f = l.get(s);
|
|
236
|
-
return f === void 0 && l.set(s, f =
|
|
236
|
+
return f === void 0 && l.set(s, f = ht(n, s)), f;
|
|
237
237
|
};
|
|
238
238
|
return se(({ clock: s }) => {
|
|
239
239
|
const f = performance.now(), m = Math.max(1e-4, je.graph.scale), w = Q ? 0 : s.elapsedTime, B = h.fov, U = c.getPixelRatio();
|
|
240
|
-
b.nodes.uniforms.uScale.value = o.height * U / (2 * Math.tan(B * Math.PI / 360)) * je.graph.scale * 1
|
|
241
|
-
const { pos: V, base: k, baseSize: E, fire: F, white: G, fireC: _, phase: D } =
|
|
242
|
-
F.fill(0), G.fill(0), u.begin(),
|
|
240
|
+
b.nodes.uniforms.uScale.value = o.height * U / (2 * Math.tan(B * Math.PI / 360)) * je.graph.scale * 2.1, a.setScale(o.height, U, B);
|
|
241
|
+
const { pos: V, base: k, baseSize: E, fire: F, white: G, fireC: _, phase: D } = M, { v: R, w: j, ctrl: I, h: H, c: O } = i;
|
|
242
|
+
F.fill(0), G.fill(0), u.begin(), S.begin(), a.begin();
|
|
243
243
|
let Y = 0, $ = 0;
|
|
244
244
|
for (const v of N.flares) {
|
|
245
245
|
const C = x(v.node), W = (f - v.start) / 1e3, me = N.instances.get(v.instance), ue = me ? Oe[me.type] : Ce, oe = v.op === "write", ee = W < 0.3 ? W / 0.3 : Math.exp(-(W - 0.3) * 1.1);
|
|
@@ -253,26 +253,26 @@ function Ft({ galaxy: e }) {
|
|
|
253
253
|
}
|
|
254
254
|
const ne = ce(v.instance);
|
|
255
255
|
if (ne && W < 2) {
|
|
256
|
-
|
|
256
|
+
ut(R, j), be(ne, j, 1.2, 2.5, I);
|
|
257
257
|
const re = Math.min(1, W / 0.25) * Math.pow(1 - W / 2, 1.5), ie = oe ? Math.min(1, W * 0.9) : 1 - Math.min(1, W * 0.9);
|
|
258
|
-
O.copy(oe ? K : ue).lerp(K, 0.2), u.add(ne, I, j, O, (oe ? 0.
|
|
258
|
+
O.copy(oe ? K : ue).lerp(K, 0.2), u.add(ne, I, j, O, (oe ? 0.55 : 0.4) * re, 0.04, 0.99, 0, 1, w, ie, 1.9 * re), ie > 0.02 && ie < 0.98 && (fe(ne, I, j, ie, H), a.add(H, 0.7, O, 1.6 * re)), oe ? S.add(ne, I, j, 0.95, 1, 0.4, K, re * 1.2) : S.add(ne, I, j, 0.07, -1, 0.4, O, re * 1.5);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
for (let v = Y; v < Ie; v++) {
|
|
262
262
|
const C = z.current[v];
|
|
263
263
|
C && (C.visible = !1);
|
|
264
264
|
}
|
|
265
|
-
u.end(),
|
|
266
|
-
const ae =
|
|
265
|
+
u.end(), S.end(), a.end(), i.act += ($ - i.act) * 0.05, b.gas.uniforms.uTime.value = w, b.gas.uniforms.uAct.value = i.act;
|
|
266
|
+
const ae = M.ngeo.getAttribute("aSize"), te = M.ngeo.getAttribute("aColor");
|
|
267
267
|
for (let v = 0; v < r; v++) {
|
|
268
268
|
const C = F[v], W = Q ? 1 : 0.85 + 0.15 * Math.sin(w * 0.9 + D[v]);
|
|
269
269
|
ae.setX(v, E[v] + C * (0.9 + G[v] * 0.5)), O.copy(k[v]).multiplyScalar(W), C > 0.01 && (O.r += _[v].r * C * 1.5 + C * (0.25 + G[v]), O.g += _[v].g * C * 1.5 + C * (0.25 + G[v]), O.b += _[v].b * C * 1.5 + C * (0.25 + G[v])), te.setXYZ(v, O.r, O.g, O.b);
|
|
270
270
|
}
|
|
271
271
|
ae.needsUpdate = !0, te.needsUpdate = !0;
|
|
272
|
-
const pe =
|
|
272
|
+
const pe = M.lgeo.getAttribute("color"), he = M.owner;
|
|
273
273
|
for (let v = 0; v < he.length; v++) {
|
|
274
274
|
const C = Math.max(F[he[v]], F[he[v ^ 1]]);
|
|
275
|
-
pe.setXYZ(v, 0.
|
|
275
|
+
pe.setXYZ(v, 0.11 + C * 0.45, 0.13 + C * 0.5, 0.3 + C * 0.6);
|
|
276
276
|
}
|
|
277
277
|
pe.needsUpdate = !0;
|
|
278
278
|
let J = 0;
|
|
@@ -297,19 +297,19 @@ function Ft({ galaxy: e }) {
|
|
|
297
297
|
}
|
|
298
298
|
}), /* @__PURE__ */ q(de, { children: [
|
|
299
299
|
/* @__PURE__ */ g("mesh", { material: b.gas, position: [0, 0, -1], rotation: [0, 0, -0.18], renderOrder: -5, children: /* @__PURE__ */ g("planeGeometry", { args: [_e * 2.6, Be * 2.9] }) }),
|
|
300
|
-
/* @__PURE__ */ g("lineSegments", { geometry:
|
|
301
|
-
/* @__PURE__ */ g("points", { geometry:
|
|
300
|
+
/* @__PURE__ */ g("lineSegments", { geometry: M.lgeo, material: b.fil, frustumCulled: !1 }),
|
|
301
|
+
/* @__PURE__ */ g("points", { geometry: M.ngeo, material: b.nodes, frustumCulled: !1 }),
|
|
302
302
|
b.ripples.map((s, f) => /* @__PURE__ */ g("sprite", { ref: (m) => void (z.current[f] = m), material: s, visible: !1 }, f)),
|
|
303
|
-
/* @__PURE__ */ q(
|
|
303
|
+
/* @__PURE__ */ q(dt, { children: [
|
|
304
304
|
/* @__PURE__ */ g("primitive", { object: u.obj }),
|
|
305
|
-
/* @__PURE__ */ g("primitive", { object:
|
|
305
|
+
/* @__PURE__ */ g("primitive", { object: S.mesh }),
|
|
306
306
|
/* @__PURE__ */ g("primitive", { object: a.obj })
|
|
307
307
|
] }),
|
|
308
308
|
Array.from({ length: Te }, (s, f) => /* @__PURE__ */ g("group", { ref: (m) => void (y.current[f] = m), children: /* @__PURE__ */ g(ye, { ref: (m) => void (p.current[f] = m), text: "", offset: [0, 0.4], size: 0.24, opacity: 0, fadeMs: 250, pxRange: [8, 12] }) }, f)),
|
|
309
|
-
/* @__PURE__ */ g(
|
|
309
|
+
/* @__PURE__ */ g(pt, { position: [0, Be * 1.15, 0], suffix: " · nebula", color: "#8b9cff", letterSpacing: 0.04, size: 0.28, opacity: 0.85, pxRange: [8, 12] })
|
|
310
310
|
] });
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const It = (
|
|
313
313
|
/* glsl */
|
|
314
314
|
`
|
|
315
315
|
varying vec3 vN; varying vec3 vV; varying vec3 vObj;
|
|
@@ -317,7 +317,7 @@ void main(){
|
|
|
317
317
|
vec4 wp = modelMatrix * vec4(position, 1.0);
|
|
318
318
|
vN = normalize(mat3(modelMatrix) * normal); vV = normalize(cameraPosition - wp.xyz); vObj = position;
|
|
319
319
|
gl_Position = projectionMatrix * viewMatrix * wp; }`
|
|
320
|
-
),
|
|
320
|
+
), Lt = (
|
|
321
321
|
/* glsl */
|
|
322
322
|
`
|
|
323
323
|
uniform vec3 uCol; uniform vec3 uAtmo; uniform float uAct; uniform float uBands; uniform float uSeed; uniform float uGlow;
|
|
@@ -339,31 +339,31 @@ void main(){
|
|
|
339
339
|
gl_FragColor = vec4(col, 1.0);
|
|
340
340
|
}`
|
|
341
341
|
);
|
|
342
|
-
function
|
|
342
|
+
function rt(e, n, r, o) {
|
|
343
343
|
return new t.ShaderMaterial({
|
|
344
344
|
uniforms: { uCol: { value: e.clone() }, uAtmo: { value: n.clone() }, uAct: { value: 0 }, uBands: { value: r }, uSeed: { value: o }, uGlow: { value: 0 } },
|
|
345
|
-
vertexShader:
|
|
346
|
-
fragmentShader:
|
|
345
|
+
vertexShader: It,
|
|
346
|
+
fragmentShader: Lt
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
|
-
const Ze = new t.Color("#8792b5"), Le = 32,
|
|
350
|
-
function
|
|
351
|
-
const r = e.srv, o = n.res, c = P(() => new t.Color(r.color), [r.color]), h = P(() =>
|
|
349
|
+
const Ze = new t.Color("#8792b5"), Le = 32, Nt = 0.42, Se = new t.Vector3();
|
|
350
|
+
function kt({ mcp: e, backend: n }) {
|
|
351
|
+
const r = e.srv, o = n.res, c = P(() => new t.Color(r.color), [r.color]), h = P(() => rt(Ze, new t.Color(r.color).lerp(K, 0.3), 0, X(o.name, 6)), [r.color, o.name]), p = P(() => le(Pe(), "#000"), []), y = P(() => new t.LineBasicMaterial({ color: "#000", transparent: !0, blending: t.AdditiveBlending, depthWrite: !1, toneMapped: !1 }), []), A = P(() => {
|
|
352
352
|
const x = new t.BufferGeometry().setAttribute("position", new t.BufferAttribute(new Float32Array((Le + 1) * 3), 3));
|
|
353
353
|
return x.boundingSphere = new t.Sphere(new t.Vector3(), 1e4), x;
|
|
354
|
-
}, []), z = P(() => Object.assign(new t.Line(A, y), { frustumCulled: !1 }), [A, y]),
|
|
354
|
+
}, []), z = P(() => Object.assign(new t.Line(A, y), { frustumCulled: !1 }), [A, y]), M = P(() => X(o.name, 5) < 0.5 ? 1 : -1, [o.name]), b = T(null), u = T(null), S = T(null), a = T(null), l = T("");
|
|
355
355
|
se(({ clock: x }) => {
|
|
356
356
|
var k, E;
|
|
357
357
|
const d = performance.now();
|
|
358
|
-
(k = b.current) == null || k.position.copy(n.pos), u.current && !Q && (u.current.rotation.y = x.elapsedTime * 0.3 *
|
|
359
|
-
const s = Math.hypot(
|
|
358
|
+
(k = b.current) == null || k.position.copy(n.pos), u.current && !Q && (u.current.rotation.y = x.elapsedTime * 0.3 * M), Se.subVectors(n.pos, e.pos);
|
|
359
|
+
const s = Math.hypot(Se.x, Se.y), f = Math.atan2(Se.y, Se.x), m = A.getAttribute("position");
|
|
360
360
|
for (let F = 0; F <= Le; F++) {
|
|
361
|
-
const G = f + (F / Le - 0.5) * 2 *
|
|
361
|
+
const G = f + (F / Le - 0.5) * 2 * Nt;
|
|
362
362
|
m.setXYZ(F, e.pos.x + Math.cos(G) * s, e.pos.y + Math.sin(G) * s, n.pos.z);
|
|
363
363
|
}
|
|
364
364
|
m.needsUpdate = !0;
|
|
365
|
-
const w = o.inflight > 0, B =
|
|
366
|
-
h.uniforms.uAct.value = w ? 1 : B, h.uniforms.uGlow.value = w ? 0.8 + U * 0.5 : B * 0.6, h.uniforms.uCol.value.copy(Ze).lerp(c, w ? 0.6 : B * 0.5), p.color.copy(c).lerp(K, 0.3).multiplyScalar(w ? 0.55 + U * 0.25 : B * 0.35), (E =
|
|
365
|
+
const w = o.inflight > 0, B = tt(o.activeAt, d, 1.4), U = w ? 0.5 + 0.5 * Math.sin(x.elapsedTime * 5) : 0;
|
|
366
|
+
h.uniforms.uAct.value = w ? 1 : B, h.uniforms.uGlow.value = w ? 0.8 + U * 0.5 : B * 0.6, h.uniforms.uCol.value.copy(Ze).lerp(c, w ? 0.6 : B * 0.5), p.color.copy(c).lerp(K, 0.3).multiplyScalar(w ? 0.55 + U * 0.25 : B * 0.35), (E = S.current) == null || E.scale.setScalar(w ? 2.6 + U * 0.4 : 1.6 + B), y.color.copy(c).lerp(K, 0.3).multiplyScalar(0.16 + (w ? 0.2 : B * 0.12));
|
|
367
367
|
let V = o.name;
|
|
368
368
|
if (w) {
|
|
369
369
|
let F = "";
|
|
@@ -376,28 +376,28 @@ function Nt({ mcp: e, backend: n }) {
|
|
|
376
376
|
return /* @__PURE__ */ q(de, { children: [
|
|
377
377
|
/* @__PURE__ */ g("primitive", { object: z }),
|
|
378
378
|
/* @__PURE__ */ q("group", { ref: b, children: [
|
|
379
|
-
/* @__PURE__ */ g("sprite", { ref:
|
|
379
|
+
/* @__PURE__ */ g("sprite", { ref: S, material: p }),
|
|
380
380
|
/* @__PURE__ */ g("mesh", { ref: u, geometry: Xe, material: h, scale: i }),
|
|
381
381
|
/* @__PURE__ */ g(ye, { ref: a, position: [0, -0.62, 0], text: o.name, color: r.color, size: 0.2, opacity: 0.5, pxRange: [7.5, 11.5] })
|
|
382
382
|
] })
|
|
383
383
|
] });
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Ut({ mcp: e }) {
|
|
386
386
|
const n = e.srv, r = P(() => new t.Color(n.color), [n.color]), o = P(() => X(n.name, 7), [n.name]), c = 0.72 + o * 0.28, h = X(n.name, 8) > 0.45, p = P(
|
|
387
387
|
() => ({
|
|
388
|
-
body:
|
|
388
|
+
body: rt(r.clone().lerp(new t.Color("#8090c0"), 0.35).multiplyScalar(0.45), r.clone().lerp(K, 0.25).multiplyScalar(0.7), 1, o),
|
|
389
389
|
halo: le(Pe(), "#000"),
|
|
390
390
|
ring: new t.MeshBasicMaterial({ color: r.clone().lerp(K, 0.4).multiplyScalar(0.22), side: t.DoubleSide, transparent: !0, blending: t.AdditiveBlending, depthWrite: !1, toneMapped: !1 })
|
|
391
391
|
}),
|
|
392
392
|
[r, o]
|
|
393
|
-
), y = P(() => new t.RingGeometry(c * 1.4, c * 1.9, 96, 1), [c]), A = T(null), z = T(null),
|
|
393
|
+
), y = P(() => new t.RingGeometry(c * 1.4, c * 1.9, 96, 1), [c]), A = T(null), z = T(null), M = T(null);
|
|
394
394
|
return se(({ clock: b }) => {
|
|
395
395
|
var l, i;
|
|
396
396
|
(l = A.current) == null || l.position.copy(e.pos);
|
|
397
|
-
const u = performance.now(),
|
|
398
|
-
p.body.uniforms.uAct.value =
|
|
397
|
+
const u = performance.now(), S = n.inflight > 0, a = tt(n.activeAt, u, 1.4);
|
|
398
|
+
p.body.uniforms.uAct.value = S ? 1 : a, p.halo.color.copy(r).multiplyScalar(S ? 0.28 : 0.07 + a * 0.18), (i = M.current) == null || i.scale.setScalar(c * (5 + (S ? 0.6 : 0))), z.current && !Q && (z.current.rotation.y = b.elapsedTime * 0.05);
|
|
399
399
|
}), /* @__PURE__ */ q("group", { ref: A, children: [
|
|
400
|
-
/* @__PURE__ */ g("sprite", { ref:
|
|
400
|
+
/* @__PURE__ */ g("sprite", { ref: M, material: p.halo }),
|
|
401
401
|
/* @__PURE__ */ q("group", { rotation: [0.25, 0, -0.32 + o * 0.3], children: [
|
|
402
402
|
/* @__PURE__ */ g("mesh", { ref: z, geometry: Xe, material: p.body, scale: c }),
|
|
403
403
|
h && /* @__PURE__ */ g("mesh", { geometry: y, material: p.ring, rotation: [Math.PI / 2 - 0.25, 0, 0] })
|
|
@@ -406,20 +406,20 @@ function kt({ mcp: e }) {
|
|
|
406
406
|
] });
|
|
407
407
|
}
|
|
408
408
|
const Ne = 48;
|
|
409
|
-
function
|
|
409
|
+
function Wt() {
|
|
410
410
|
const { size: e, gl: n, camera: r } = Re(), o = P(() => new De(Ne, 36), []), c = P(() => new ze(Ne), []), h = P(() => new Fe(Ne), []), p = P(() => ({ a: new t.Vector3(), b: new t.Vector3(), c: new t.Vector3(), h: new t.Vector3(), col: new t.Color() }), []);
|
|
411
411
|
return se(({ clock: y }) => {
|
|
412
412
|
const A = performance.now(), z = Q ? 0 : y.elapsedTime;
|
|
413
413
|
h.setScale(e.height, n.getPixelRatio(), r.fov), o.begin(), c.begin(), h.begin();
|
|
414
|
-
const { a:
|
|
414
|
+
const { a: M, b, c: u, h: S, col: a } = p;
|
|
415
415
|
for (const l of N.mcpPending.values()) {
|
|
416
416
|
const i = ce(l.instance), x = qe(l.server), d = N.mcpServers.get(l.server);
|
|
417
417
|
if (!i || !d || !x) continue;
|
|
418
|
-
b.copy(x),
|
|
419
|
-
const s =
|
|
420
|
-
a.set(d.color).lerp(ke, Z(s / 1.2)), s > 1.2 && a.lerp(
|
|
418
|
+
b.copy(x), M.copy(i), be(M, b, 1.5, 1.2, u);
|
|
419
|
+
const s = mt(l, A);
|
|
420
|
+
a.set(d.color).lerp(ke, Z(s / 1.2)), s > 1.2 && a.lerp(xt, Z((s - 1.2) / 1));
|
|
421
421
|
const f = (0.2 + Math.min(0.35, s * 0.15)) * we(s / 0.3), m = 0.06 + 0.86 * we(s / 0.45);
|
|
422
|
-
if (o.add(
|
|
422
|
+
if (o.add(M, u, b, a, f, 0.06, m, 0.9, 1, z, s < 0.45 ? m : -1, 1.2), s > 0.45 && c.add(M, u, b, 0.9, 1, 0.42, a, 0.6 + f), l.resource) {
|
|
423
423
|
const w = Ye(l.server, l.resource);
|
|
424
424
|
w && (be(b, w, 0.3, 0.2, u), o.add(b, u, w, a, f * 0.9, 0.12, 0.88, 0.9, 1, z, -1, 0), c.add(b, u, w, 0.8, 1, 0.3, a, 0.5 + f));
|
|
425
425
|
}
|
|
@@ -434,12 +434,12 @@ function Ut() {
|
|
|
434
434
|
const f = l.resource ? Ye(l.server, l.resource) : void 0, m = f ? 0.3 : 0;
|
|
435
435
|
if (f && i < m) {
|
|
436
436
|
const w = Ae(i / m);
|
|
437
|
-
be(b, f, 0.3, 0.2, u), o.add(b, u, f, a, 0.15, 0.12, 0.88, 0, 1, z, 1 - w, 1.4), fe(b, u, f, 1 - w,
|
|
437
|
+
be(b, f, 0.3, 0.2, u), o.add(b, u, f, a, 0.15, 0.12, 0.88, 0, 1, z, 1 - w, 1.4), fe(b, u, f, 1 - w, S), h.add(S, 0.6, a, 1.5);
|
|
438
438
|
} else {
|
|
439
439
|
const w = Ae((i - m) / (1 - m));
|
|
440
|
-
|
|
440
|
+
M.copy(x), be(M, b, 1.5, 1.2, u);
|
|
441
441
|
const B = 1 - Math.max(0, (w - 0.85) / 0.15);
|
|
442
|
-
o.add(
|
|
442
|
+
o.add(M, u, b, a, 0.22 * B, 0.06, 0.94, 0, 1, z, 1 - w, 1.6 * B), fe(M, u, b, 1 - w, S), h.add(S, 0.75, a, 1.6 * B), c.add(M, u, b, 0.08, -1, 0.45, a, 1.3 * B);
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
o.end(), c.end(), h.end();
|
|
@@ -449,27 +449,27 @@ function Ut() {
|
|
|
449
449
|
/* @__PURE__ */ g("primitive", { object: h.obj })
|
|
450
450
|
] });
|
|
451
451
|
}
|
|
452
|
-
function
|
|
452
|
+
function Kt({ run: e }) {
|
|
453
453
|
const n = P(() => new t.Color(e.color), [e.color]), r = P(() => le(Pe(), "#000"), []), o = T(null), c = T(null);
|
|
454
454
|
return se(({ clock: h }) => {
|
|
455
|
-
var
|
|
456
|
-
const p = performance.now(), y = e.run ?? N.runs.get(e.id), A = y ? we((p - y.startedAt) / 1500) : 1, z = y != null && y.endedAt ? Z(1 - (p - y.endedAt - (
|
|
457
|
-
r.color.copy(n).multiplyScalar(0.075 * A * z *
|
|
455
|
+
var S;
|
|
456
|
+
const p = performance.now(), y = e.run ?? N.runs.get(e.id), A = y ? we((p - y.startedAt) / 1500) : 1, z = y != null && y.endedAt ? Z(1 - (p - y.endedAt - (vt - 2500)) / 2500) : 1, M = Q ? 1 : 0.9 + 0.1 * Math.sin(h.elapsedTime * 0.5 + e.index);
|
|
457
|
+
r.color.copy(n).multiplyScalar(0.075 * A * z * M);
|
|
458
458
|
const b = Math.abs(e.side.x) * e.hu + Math.abs(e.axis.x) * e.hv, u = Math.abs(e.side.y) * e.hu + Math.abs(e.axis.y) * e.hv;
|
|
459
|
-
o.current && (o.current.position.set(e.origin.x, e.origin.y, -3), o.current.scale.set(b * 2.8 + 6, u * 2.8 + 5, 1)), (
|
|
459
|
+
o.current && (o.current.position.set(e.origin.x, e.origin.y, -3), o.current.scale.set(b * 2.8 + 6, u * 2.8 + 5, 1)), (S = c.current) == null || S.position.set(e.origin.x, e.origin.y + u + 0.7, 0);
|
|
460
460
|
}), /* @__PURE__ */ q(de, { children: [
|
|
461
461
|
/* @__PURE__ */ g("sprite", { ref: o, material: r }),
|
|
462
|
-
/* @__PURE__ */ g("group", { ref: c, children: e.run && /* @__PURE__ */ g(
|
|
462
|
+
/* @__PURE__ */ g("group", { ref: c, children: e.run && /* @__PURE__ */ g(Xt, { run: e.run }) })
|
|
463
463
|
] });
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
|
|
465
|
+
function Xt({ run: e }) {
|
|
466
|
+
gt();
|
|
467
467
|
const n = e.status !== "started";
|
|
468
468
|
return /* @__PURE__ */ g(
|
|
469
469
|
ye,
|
|
470
470
|
{
|
|
471
471
|
text: e.topic,
|
|
472
|
-
secondary:
|
|
472
|
+
secondary: bt(e, { base: "#94a3c8", current: "#fde68a", done: "#cbd5e1" }, ["running…", "run complete"]),
|
|
473
473
|
color: e.color,
|
|
474
474
|
textColor: "#e6ecff",
|
|
475
475
|
plate: "none",
|
|
@@ -485,12 +485,12 @@ function Kt({ run: e }) {
|
|
|
485
485
|
}
|
|
486
486
|
);
|
|
487
487
|
}
|
|
488
|
-
const ve = 6,
|
|
489
|
-
function
|
|
488
|
+
const ve = 6, Me = 6, ge = 28, xe = 3, Dt = 2.2;
|
|
489
|
+
function qt() {
|
|
490
490
|
const { size: e, gl: n, camera: r } = Re(), o = T(/* @__PURE__ */ new Set()), c = T([]), h = T([]), p = T([]), y = T([]), A = P(() => {
|
|
491
491
|
const u = new t.BufferGeometry();
|
|
492
492
|
return u.setAttribute("position", new t.BufferAttribute(new Float32Array(ve * xe * ge * 6), 3)), u.setAttribute("color", new t.BufferAttribute(new Float32Array(ve * xe * ge * 6), 3)), u.boundingSphere = new t.Sphere(new t.Vector3(), 1e4), u;
|
|
493
|
-
}, []), z = P(() =>
|
|
493
|
+
}, []), z = P(() => nt(), []), M = P(() => new Fe(ve * (2 + Me)), []), b = P(() => ({ h: new t.Vector3(), p: new t.Vector3() }), []);
|
|
494
494
|
return se(() => {
|
|
495
495
|
const u = performance.now();
|
|
496
496
|
for (const d of N.runs.values()) {
|
|
@@ -505,8 +505,8 @@ function Dt() {
|
|
|
505
505
|
}
|
|
506
506
|
if (o.current.size > 200)
|
|
507
507
|
for (const d of o.current) N.runs.has(d) || o.current.delete(d);
|
|
508
|
-
c.current = c.current.filter((d) => u - d.start < 5200),
|
|
509
|
-
const
|
|
508
|
+
c.current = c.current.filter((d) => u - d.start < 5200), M.setScale(e.height, n.getPixelRatio(), r.fov), M.begin();
|
|
509
|
+
const S = A.getAttribute("position"), a = A.getAttribute("color");
|
|
510
510
|
let l = 0;
|
|
511
511
|
const { h: i, p: x } = b;
|
|
512
512
|
for (let d = 0; d < ve; d++) {
|
|
@@ -517,7 +517,7 @@ function Dt() {
|
|
|
517
517
|
}
|
|
518
518
|
const w = (u - s.start) / 1e3;
|
|
519
519
|
f && m && (m.position.copy(s.from).add(x.set(0, -2.3, 0)), y.current[d] !== s.run + s.start && (y.current[d] = s.run + s.start, f.setText(`final answer - ${s.text.length > 64 ? s.text.slice(0, 62) + "…" : s.text}`)), f.setOpacity(Z(w / 0.3) * Z((5.2 - w) / 1.2)));
|
|
520
|
-
const B = w /
|
|
520
|
+
const B = w / Dt;
|
|
521
521
|
if (B >= 1.25) continue;
|
|
522
522
|
const U = s.travel * (Q ? 0.6 : 1), V = U * we(Math.min(1, B)), k = Math.min(7.5, U * 0.4) * Math.min(1, B * 3) * (B > 1 ? Math.max(0, 1 - (B - 1) / 0.25) : 1), E = B > 1 ? Math.max(0, 1 - (B - 1) / 0.25) : 1, F = -s.dir.y, G = s.dir.x;
|
|
523
523
|
for (let _ = 0; _ < xe; _++)
|
|
@@ -526,29 +526,29 @@ function Dt() {
|
|
|
526
526
|
const j = (D + R) / ge, I = (_ - 1) * 0.05 * (1 - j);
|
|
527
527
|
x.copy(s.from).addScaledVector(s.dir, V - k * (1 - j));
|
|
528
528
|
const H = ((l * xe + _) * ge + D) * 2 + R;
|
|
529
|
-
|
|
529
|
+
S.setXYZ(H, x.x + F * I, x.y + G * I, x.z);
|
|
530
530
|
const O = Math.pow(j, 2) * (_ === 1 ? 2.6 : 1.2) * E;
|
|
531
531
|
a.setXYZ(H, s.color.r * O, s.color.g * O, s.color.b * O);
|
|
532
532
|
}
|
|
533
|
-
l++, i.copy(s.from).addScaledVector(s.dir, V),
|
|
534
|
-
for (let _ = 1; _ <=
|
|
535
|
-
const D = _ /
|
|
536
|
-
x.copy(s.from).addScaledVector(s.dir, V - D), x.y += Math.sin(_ * 2.3 + s.start) * 0.08,
|
|
533
|
+
l++, i.copy(s.from).addScaledVector(s.dir, V), M.add(i, 1.3, K, 1.6 * E), M.add(i, 3.2, Ce, 0.35 * E);
|
|
534
|
+
for (let _ = 1; _ <= Me; _++) {
|
|
535
|
+
const D = _ / Me * k;
|
|
536
|
+
x.copy(s.from).addScaledVector(s.dir, V - D), x.y += Math.sin(_ * 2.3 + s.start) * 0.08, M.add(x, 0.5 * (1 - _ / (Me + 1)), s.color, 0.9 * E * (1 - _ / (Me + 1)));
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
A.setDrawRange(0, l * xe * ge * 2),
|
|
539
|
+
A.setDrawRange(0, l * xe * ge * 2), S.needsUpdate = !0, a.needsUpdate = !0, M.end();
|
|
540
540
|
}), /* @__PURE__ */ q(de, { children: [
|
|
541
541
|
/* @__PURE__ */ g("lineSegments", { geometry: A, material: z, frustumCulled: !1 }),
|
|
542
|
-
/* @__PURE__ */ g("primitive", { object:
|
|
543
|
-
Array.from({ length: ve }, (u,
|
|
542
|
+
/* @__PURE__ */ g("primitive", { object: M.obj }),
|
|
543
|
+
Array.from({ length: ve }, (u, S) => /* @__PURE__ */ g("group", { ref: (a) => void (p.current[S] = a), children: /* @__PURE__ */ g(ye, { ref: (a) => void (h.current[S] = a), text: "", color: "#e0e7ff", size: 0.26, maxWidth: 11, opacity: 0, pxRange: [8, 12], renderOrder: 24 }) }, S))
|
|
544
544
|
] });
|
|
545
545
|
}
|
|
546
|
-
const
|
|
546
|
+
const Yt = (
|
|
547
547
|
/* glsl */
|
|
548
548
|
`
|
|
549
549
|
varying vec3 vDir;
|
|
550
550
|
void main(){ vDir = normalize(position); gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }`
|
|
551
|
-
),
|
|
551
|
+
), $t = (
|
|
552
552
|
/* glsl */
|
|
553
553
|
`
|
|
554
554
|
varying vec3 vDir;
|
|
@@ -573,7 +573,7 @@ void main(){
|
|
|
573
573
|
col += band * max(vec3(0.0), vec3(0.010, 0.012, 0.03) * (0.3 + dust * dust * 1.4) - vec3(0.006, 0.007, 0.014) * lanes);
|
|
574
574
|
gl_FragColor = vec4(col, 1.0);
|
|
575
575
|
}`
|
|
576
|
-
),
|
|
576
|
+
), Zt = (
|
|
577
577
|
/* glsl */
|
|
578
578
|
`
|
|
579
579
|
attribute float aSize; attribute float aPhase; attribute vec3 aColor;
|
|
@@ -585,7 +585,7 @@ void main(){
|
|
|
585
585
|
gl_PointSize = max(1.0, aSize * uScale / -mv.z);
|
|
586
586
|
gl_Position = projectionMatrix * mv;
|
|
587
587
|
}`
|
|
588
|
-
),
|
|
588
|
+
), Ht = (
|
|
589
589
|
/* glsl */
|
|
590
590
|
`
|
|
591
591
|
varying vec3 vC;
|
|
@@ -593,11 +593,11 @@ void main(){ float r = length(gl_PointCoord - 0.5) * 2.0; if (r > 1.0) discard;
|
|
|
593
593
|
float core = smoothstep(0.5, 0.0, r); float halo = pow(1.0 - r, 3.0);
|
|
594
594
|
gl_FragColor = vec4(vC * (core + halo * 0.35), 1.0); }`
|
|
595
595
|
), He = ["#ffffff", "#dbe7ff", "#b9cdff", "#9fb8ff", "#fff3dd", "#ffe2bf"].map((e) => new t.Color(e));
|
|
596
|
-
function
|
|
596
|
+
function Jt() {
|
|
597
597
|
const { size: e, gl: n, camera: r } = Re(), o = P(() => {
|
|
598
|
-
const p = Q ? 1600 : 3200, y = new Float32Array(p * 3), A = new Float32Array(p), z = new Float32Array(p),
|
|
599
|
-
let
|
|
600
|
-
const a = () => (
|
|
598
|
+
const p = Q ? 1600 : 3200, y = new Float32Array(p * 3), A = new Float32Array(p), z = new Float32Array(p), M = new Float32Array(p * 3), b = new t.Vector3(0.42, 0.9, -0.12).normalize(), u = new t.Vector3();
|
|
599
|
+
let S = 1234567;
|
|
600
|
+
const a = () => (S = S * 16807 % 2147483647) / 2147483647;
|
|
601
601
|
for (let i = 0; i < p; i++) {
|
|
602
602
|
for (let m = 0; m < 8 && (u.set(a() * 2 - 1, a() * 2 - 1, a() * 2 - 1), !(!(u.lengthSq() > 1 || u.lengthSq() < 0.01) && (u.normalize(), !(i % 5 < 2 && Math.abs(u.dot(b)) > 0.22)))); m++)
|
|
603
603
|
;
|
|
@@ -607,14 +607,14 @@ function Ht() {
|
|
|
607
607
|
const d = Math.pow(a(), 3.2);
|
|
608
608
|
A[i] = 0.55 + d * 2.6, z[i] = a();
|
|
609
609
|
const s = He[Math.floor(a() * He.length)], f = 0.22 + d * 0.75;
|
|
610
|
-
|
|
610
|
+
M.set([s.r * f, s.g * f, s.b * f], i * 3);
|
|
611
611
|
}
|
|
612
612
|
const l = new t.BufferGeometry();
|
|
613
|
-
return l.setAttribute("position", new t.BufferAttribute(y, 3)), l.setAttribute("aSize", new t.BufferAttribute(A, 1)), l.setAttribute("aPhase", new t.BufferAttribute(z, 1)), l.setAttribute("aColor", new t.BufferAttribute(
|
|
613
|
+
return l.setAttribute("position", new t.BufferAttribute(y, 3)), l.setAttribute("aSize", new t.BufferAttribute(A, 1)), l.setAttribute("aPhase", new t.BufferAttribute(z, 1)), l.setAttribute("aColor", new t.BufferAttribute(M, 3)), l;
|
|
614
614
|
}, []), c = P(
|
|
615
615
|
() => ({
|
|
616
|
-
dome: new t.ShaderMaterial({ vertexShader:
|
|
617
|
-
stars: new t.ShaderMaterial({ uniforms: { uTime: { value: 0 }, uScale: { value: 400 } }, vertexShader:
|
|
616
|
+
dome: new t.ShaderMaterial({ vertexShader: Yt, fragmentShader: $t, side: t.BackSide, depthWrite: !1 }),
|
|
617
|
+
stars: new t.ShaderMaterial({ uniforms: { uTime: { value: 0 }, uScale: { value: 400 } }, vertexShader: Zt, fragmentShader: Ht, transparent: !0, depthWrite: !1, blending: t.AdditiveBlending })
|
|
618
618
|
}),
|
|
619
619
|
[]
|
|
620
620
|
), h = T(null);
|
|
@@ -626,14 +626,14 @@ function Ht() {
|
|
|
626
626
|
/* @__PURE__ */ g("points", { geometry: o, material: c.stars, frustumCulled: !1, renderOrder: -9 })
|
|
627
627
|
] });
|
|
628
628
|
}
|
|
629
|
-
const
|
|
630
|
-
function
|
|
631
|
-
const o = e.inst, c = T(null), h = T(null), p = T(null), y = T(null), A = T(null), z = T(null),
|
|
629
|
+
const Qt = new t.Color("#6f7fb8"), eo = new t.Color("#ff6b7a"), Ue = 0.95, to = new t.MeshBasicMaterial({ colorWrite: !1, depthWrite: !1, transparent: !0, opacity: 0 });
|
|
630
|
+
function oo({ agent: e, selected: n, onSelect: r }) {
|
|
631
|
+
const o = e.inst, c = T(null), h = T(null), p = T(null), y = T(null), A = T(null), z = T(null), M = T(null), b = T(null), u = T(null), S = P(() => [...o.id].reduce((s, f) => (s * 31 + f.charCodeAt(0)) % 9973, 7) / 9973, [o.id]), a = Oe[o.type], l = P(
|
|
632
632
|
() => ({
|
|
633
633
|
halo: le(Pe(), a),
|
|
634
|
-
spikes: le(
|
|
634
|
+
spikes: le(Pt(), a),
|
|
635
635
|
core: le(Pe(), "#fff"),
|
|
636
|
-
flare: le(
|
|
636
|
+
flare: le(ot(), a),
|
|
637
637
|
corona: new t.MeshBasicMaterial({ color: ke, blending: t.AdditiveBlending, transparent: !0, depthWrite: !1, toneMapped: !1 }),
|
|
638
638
|
sel: new t.MeshBasicMaterial({ color: "#dbe7ff", blending: t.AdditiveBlending, transparent: !0, depthWrite: !1, toneMapped: !1 })
|
|
639
639
|
}),
|
|
@@ -644,20 +644,20 @@ function to({ agent: e, selected: n, onSelect: r }) {
|
|
|
644
644
|
[]
|
|
645
645
|
);
|
|
646
646
|
Mt(() => {
|
|
647
|
-
l.spikes.rotation = (
|
|
648
|
-
}, [l,
|
|
647
|
+
l.spikes.rotation = (S - 0.5) * 0.5;
|
|
648
|
+
}, [l, S]), se(({ clock: s }) => {
|
|
649
649
|
var he, J;
|
|
650
650
|
const f = performance.now(), m = s.elapsedTime, w = Q ? 0 : 0.05 * Ve.spread;
|
|
651
|
-
e.live.set(e.pos.x + Math.sin(m * 0.21 +
|
|
651
|
+
e.live.set(e.pos.x + Math.sin(m * 0.21 + S * 20) * w, e.pos.y + Math.cos(m * 0.17 + S * 13) * w, e.pos.z);
|
|
652
652
|
const B = e.scale;
|
|
653
653
|
c.current && (c.current.position.copy(e.live), c.current.scale.setScalar(Math.max(1e-4, B))), (he = b.current) == null || he.position.set(e.live.x, e.live.y - 0.95 * B - 0.35, e.live.z);
|
|
654
654
|
const U = (f - o.bornAt) / 1e3, V = o.parent && N.instances.has(o.parent) ? Ue * 0.85 : 0.05, k = Z((U - V) / 0.55), E = we(k), F = k > 0 ? Math.exp(-(U - V) * 3.2) : 0, G = o.exitAt ? (f - o.exitAt) / 1e3 : -1, _ = G >= 0 ? Ae(G / 0.7) : 0, D = G >= 0 ? Z((G - 0.7) / 1.7) : 0, R = G < 0;
|
|
655
655
|
o.llmCalls !== i.calls && (i.calls = o.llmCalls, i.flareAt = f, i.flareK = o.pulse);
|
|
656
|
-
const j = (f - i.flareAt) / 1e3, I =
|
|
656
|
+
const j = (f - i.flareAt) / 1e3, I = wt(o, f);
|
|
657
657
|
let H = !1;
|
|
658
658
|
for (const v of N.mcpPending.values()) v.instance === o.id && (H = !0);
|
|
659
|
-
const O = R && (o.status === "thinking" || o.status === "spawning"), Y = Q ? 0 : 1, $ = 1 + (O ? 0.16 : 0.05) * Math.sin(m * 3.3 +
|
|
660
|
-
i.c.copy(a), R || i.c.lerp(o.status === "failed" ?
|
|
659
|
+
const O = R && (o.status === "thinking" || o.status === "spawning"), Y = Q ? 0 : 1, $ = 1 + (O ? 0.16 : 0.05) * Math.sin(m * 3.3 + S * 40) * Math.sin(m * 1.9 + S * 17) * Y, ae = (O ? 1 : 0.62) * $ + I * 0.25 + F * 1.2;
|
|
660
|
+
i.c.copy(a), R || i.c.lerp(o.status === "failed" ? eo : Qt, _);
|
|
661
661
|
const te = (1 - _ * 0.8) * (1 - D), pe = E * (1 - _ * 0.62);
|
|
662
662
|
if (y.current && (y.current.scale.setScalar(Math.max(1e-4, pe * (0.95 + I * 0.12))), l.core.color.copy(K).lerp(i.c, _).multiplyScalar(Math.min(1.6, ae) * te)), h.current && (h.current.scale.setScalar(Math.max(1e-4, pe * (O ? 3.4 : 2.7) * (1 + I * 0.18))), l.halo.color.copy(i.c).multiplyScalar(0.42 * ae * te)), p.current) {
|
|
663
663
|
const v = j < 1.2 ? Math.exp(-j * 2.6) * i.flareK * 0.5 : 0, C = (O ? 1 : 0.55) * (1 - _);
|
|
@@ -675,20 +675,20 @@ function to({ agent: e, selected: n, onSelect: r }) {
|
|
|
675
675
|
const v = 0.75 + 0.25 * Math.sin(m * 2.4) * Y;
|
|
676
676
|
z.current.scale.setScalar(0.95 + 0.06 * v), z.current.rotation.z = m * 0.6 * Y, l.corona.color.copy(ke).multiplyScalar(1.4 * i.coronaK * v);
|
|
677
677
|
}
|
|
678
|
-
i.selK += ((n ? 1 : 0) - i.selK) * 0.12,
|
|
678
|
+
i.selK += ((n ? 1 : 0) - i.selK) * 0.12, M.current && (M.current.visible = i.selK > 0.02, M.current.scale.setScalar(1.1 + (1 - i.selK) * 0.5), l.sel.color.setScalar(0.9 * i.selK * te)), (J = u.current) == null || J.setOpacity(yt(o.id) ? E * (R ? 0.95 : 0.6 * (1 - D)) : 0);
|
|
679
679
|
});
|
|
680
680
|
const x = (s) => {
|
|
681
681
|
s.stopPropagation(), r(o.id);
|
|
682
682
|
}, d = o.id.split(":")[2];
|
|
683
683
|
return /* @__PURE__ */ q(de, { children: [
|
|
684
684
|
/* @__PURE__ */ q("group", { ref: c, scale: 1e-4, children: [
|
|
685
|
-
/* @__PURE__ */ g("mesh", { geometry: Xe, material:
|
|
685
|
+
/* @__PURE__ */ g("mesh", { geometry: Xe, material: to, scale: 0.75, onClick: x, onPointerOver: () => document.body.style.cursor = "pointer", onPointerOut: () => document.body.style.cursor = "" }),
|
|
686
686
|
/* @__PURE__ */ g("sprite", { ref: h, material: l.halo, scale: 1e-4 }),
|
|
687
687
|
/* @__PURE__ */ g("sprite", { ref: p, material: l.spikes, scale: 1e-4 }),
|
|
688
688
|
/* @__PURE__ */ g("sprite", { ref: y, material: l.core, scale: 1e-4 }),
|
|
689
689
|
/* @__PURE__ */ g("sprite", { ref: A, material: l.flare, visible: !1 }),
|
|
690
690
|
/* @__PURE__ */ g("mesh", { ref: z, geometry: $e, material: l.corona, visible: !1 }),
|
|
691
|
-
/* @__PURE__ */ g("mesh", { ref:
|
|
691
|
+
/* @__PURE__ */ g("mesh", { ref: M, geometry: $e, material: l.sel, visible: !1 })
|
|
692
692
|
] }),
|
|
693
693
|
/* @__PURE__ */ g("group", { ref: b, children: /* @__PURE__ */ g(
|
|
694
694
|
ye,
|
|
@@ -706,12 +706,12 @@ function to({ agent: e, selected: n, onSelect: r }) {
|
|
|
706
706
|
] });
|
|
707
707
|
}
|
|
708
708
|
const Je = 96, Qe = 32;
|
|
709
|
-
function
|
|
709
|
+
function no() {
|
|
710
710
|
const { size: e, gl: n, camera: r } = Re(), o = P(() => new De(Je + Qe, 28), []), c = P(() => new ze(Je), []), h = P(() => new Fe(Qe), []), p = P(() => /* @__PURE__ */ new Map(), []), y = P(() => ({ ctrl: new t.Vector3(), h: new t.Vector3(), col: new t.Color(), a: new t.Vector3(), b: new t.Vector3() }), []);
|
|
711
711
|
return se(({ clock: A }) => {
|
|
712
|
-
const z = performance.now(),
|
|
712
|
+
const z = performance.now(), M = Q ? 0 : A.elapsedTime;
|
|
713
713
|
h.setScale(e.height, n.getPixelRatio(), r.fov), o.begin(), c.begin(), h.begin();
|
|
714
|
-
const { ctrl: b, col: u, h:
|
|
714
|
+
const { ctrl: b, col: u, h: S } = y;
|
|
715
715
|
for (const a of p.keys()) N.instances.has(a) || p.delete(a);
|
|
716
716
|
for (const a of N.instances.values()) {
|
|
717
717
|
if (!a.parent) continue;
|
|
@@ -726,7 +726,7 @@ function oo() {
|
|
|
726
726
|
const V = w + (1 - B - w) * U;
|
|
727
727
|
u.copy(Oe[a.type]).lerp(Ce, 0.5);
|
|
728
728
|
const k = U < 1;
|
|
729
|
-
o.add(l, b, i, u, (k ? 0.8 : 0.62) * s, w, V, k ? 0 : 0.55 * s, 1,
|
|
729
|
+
o.add(l, b, i, u, (k ? 0.8 : 0.62) * s, w, V, k ? 0 : 0.55 * s, 1, M, k ? V : -1, 2.2), k ? (fe(l, b, i, V, S), h.add(S, 0.55, K, 1.3)) : c.add(l, b, i, 1 - B - 0.04, 1, (a.subagent ? 0.32 : 0.4) * Math.min(1.3, Ve.scale), u, 0.95 * s);
|
|
730
730
|
}
|
|
731
731
|
for (const a of N.comets) {
|
|
732
732
|
const l = ce(a.from), i = ce(a.to);
|
|
@@ -738,7 +738,7 @@ function oo() {
|
|
|
738
738
|
const m = Ae(x);
|
|
739
739
|
u.copy(d ? Oe[d.type] : Ce).lerp(K, 0.45);
|
|
740
740
|
const w = Math.min(1, x / 0.1) * Math.min(1, (1 - x) / 0.15);
|
|
741
|
-
o.add(l, b, i, u, 0.9 * w, Math.max(0, m - 0.2), m, 0, 1,
|
|
741
|
+
o.add(l, b, i, u, 0.9 * w, Math.max(0, m - 0.2), m, 0, 1, M, m, 1.6 * w), fe(l, b, i, m, S), h.add(S, 0.8, u, 1.4 * w);
|
|
742
742
|
}
|
|
743
743
|
o.end(), c.end(), h.end();
|
|
744
744
|
}), /* @__PURE__ */ q(de, { children: [
|
|
@@ -747,46 +747,46 @@ function oo() {
|
|
|
747
747
|
/* @__PURE__ */ g("primitive", { object: h.obj })
|
|
748
748
|
] });
|
|
749
749
|
}
|
|
750
|
-
const
|
|
750
|
+
const ro = {
|
|
751
751
|
minPolarAngle: Math.PI * 0.22,
|
|
752
752
|
maxPolarAngle: Math.PI * 0.78,
|
|
753
753
|
minAzimuthAngle: -Math.PI * 0.35,
|
|
754
754
|
maxAzimuthAngle: Math.PI * 0.35
|
|
755
755
|
};
|
|
756
|
-
function
|
|
756
|
+
function uo() {
|
|
757
757
|
return /* @__PURE__ */ q(
|
|
758
|
-
|
|
758
|
+
St,
|
|
759
759
|
{
|
|
760
760
|
title: "constellation · night sky",
|
|
761
761
|
subtitle: "Agents are stars (brighter = parent) · delegation draws constellation lines · stars flare on LLM calls · ◉ MCP planets with backend moons · the graph nebula lights on reads/writes · ✦ final answer = shooting star",
|
|
762
762
|
preset: "radial",
|
|
763
763
|
plane: "xy",
|
|
764
764
|
camera: { position: [0, 0, 34], fov: 46, far: 1200 },
|
|
765
|
-
controls:
|
|
765
|
+
controls: ro,
|
|
766
766
|
bg: "#040618",
|
|
767
767
|
gl: { antialias: !0 },
|
|
768
768
|
fit: { nRef: 4, min: 0.62, max: 1.6, minRadius: 5.5 },
|
|
769
769
|
agentRadius: 1.3,
|
|
770
|
-
graph: { natural: _e * 1.1, radius: 3 },
|
|
771
|
-
Background: /* @__PURE__ */ g(
|
|
772
|
-
Agent:
|
|
773
|
-
RunMarker:
|
|
774
|
-
McpServer:
|
|
775
|
-
Backend:
|
|
776
|
-
GraphResource:
|
|
770
|
+
graph: { natural: _e * 1.1, radius: 3.6 },
|
|
771
|
+
Background: /* @__PURE__ */ g(Jt, {}),
|
|
772
|
+
Agent: oo,
|
|
773
|
+
RunMarker: Kt,
|
|
774
|
+
McpServer: Ut,
|
|
775
|
+
Backend: kt,
|
|
776
|
+
GraphResource: Et,
|
|
777
777
|
cluster: { radius: 1.5, variant: "stars", glowGain: 0.9 },
|
|
778
|
-
PostFX: /* @__PURE__ */ q(
|
|
779
|
-
/* @__PURE__ */ g(
|
|
780
|
-
/* @__PURE__ */ g(
|
|
778
|
+
PostFX: /* @__PURE__ */ q(it, { multisampling: 0, children: [
|
|
779
|
+
/* @__PURE__ */ g(ct, { mipmapBlur: !0, intensity: 0.95, luminanceThreshold: 0.22, luminanceSmoothing: 0.35, radius: 0.7 }),
|
|
780
|
+
/* @__PURE__ */ g(lt, { eskil: !1, offset: 0.25, darkness: 0.75 })
|
|
781
781
|
] }),
|
|
782
782
|
children: [
|
|
783
|
-
/* @__PURE__ */ g(
|
|
784
|
-
/* @__PURE__ */ g(
|
|
785
|
-
/* @__PURE__ */ g(
|
|
783
|
+
/* @__PURE__ */ g(no, {}),
|
|
784
|
+
/* @__PURE__ */ g(Wt, {}),
|
|
785
|
+
/* @__PURE__ */ g(qt, {})
|
|
786
786
|
]
|
|
787
787
|
}
|
|
788
788
|
);
|
|
789
789
|
}
|
|
790
790
|
export {
|
|
791
|
-
|
|
791
|
+
uo as default
|
|
792
792
|
};
|