agentglow 0.4.3 → 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 +5 -0
- package/dist/chunks/{KitScene-DsZmpTf7.js → KitScene-CsXvCpWR.js} +3204 -2979
- package/dist/chunks/{index-CW8fTJn1.js → index-06NeTpVb.js} +7 -7
- package/dist/chunks/{index-nw9i304P.js → index-CMyk3b1y.js} +1 -1
- package/dist/chunks/{index-CoeLwySn.js → index-CZCnCMDL.js} +1 -1
- package/dist/chunks/{index-DATZHNA0.js → index-CaU-znb0.js} +42 -42
- package/dist/chunks/{index-DlvN9YSt.js → index-DS_Ev4sI.js} +169 -169
- package/dist/chunks/{index-s99mYaJ9.js → index-DvmCk82M.js} +39 -39
- package/dist/chunks/{index-B6EboYGn.js → index-jIBsR1lw.js} +30 -30
- package/dist/chunks/{index-avfwD6eP.js → index-zAkSg1r8.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/world.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var le = Object.defineProperty;
|
|
2
2
|
var he = (g, e, c) => e in g ? le(g, e, { enumerable: !0, configurable: !0, writable: !0, value: c }) : g[e] = c;
|
|
3
|
-
var
|
|
3
|
+
var d = (g, e, c) => he(g, typeof e != "symbol" ? e + "" : e, c);
|
|
4
4
|
import { jsxs as dt, jsx as O, Fragment as fe } from "react/jsx-runtime";
|
|
5
5
|
import { useFrame as gt, useThree as ue } from "@react-three/fiber";
|
|
6
6
|
import { EffectComposer as de, Bloom as pe, Vignette as ge, Noise as me } from "@react-three/postprocessing";
|
|
7
7
|
import { useMemo as Me, useRef as st, useEffect as At } from "react";
|
|
8
8
|
import * as w from "three";
|
|
9
|
-
import { g as ye, K as Ae, F as be, f as et, A as Z, w as q, H as ne, I as ie, R as xe, k as $t, p as we, e as Re, q as zt, o as Se, n as Ge, d as Tt, J as ze, M as ve, T as oe, i as
|
|
9
|
+
import { g as ye, K as Ae, F as be, f as et, A as Z, w as q, H as ne, I as ie, R as xe, k as $t, p as we, e as Re, q as zt, o as Se, n as Ge, d as Tt, J as ze, M as ve, N as Ie, T as oe, i as Ce, x as Pe, G as Fe, u as Be, L as vt, t as Jt, v as Qt, S as Oe, O as Te, P as Ee, j as ke, r as _e } from "./KitScene-CsXvCpWR.js";
|
|
10
10
|
var se;
|
|
11
|
-
const pt = typeof window < "u" && !!((se = window.matchMedia) != null && se.call(window, "(prefers-reduced-motion: reduce)").matches), nt = pt ? 0.3 : 1, W = pt ? 9e3 : 24e3, it = pt ? 3500 : 8e3, F = 12, $ = pt ? 450 : 1100, Et = 9e3, Y = 64, kt = 31,
|
|
11
|
+
const pt = typeof window < "u" && !!((se = window.matchMedia) != null && se.call(window, "(prefers-reduced-motion: reduce)").matches), nt = pt ? 0.3 : 1, W = pt ? 9e3 : 24e3, it = pt ? 3500 : 8e3, F = 12, $ = pt ? 450 : 1100, Et = 9e3, Y = 64, kt = 31, Le = 4.6, ot = 28, _t = 64, Rt = 18, Lt = 16, ht = 8, X = Math.PI * 2, re = 200, tt = re + Ie, Dt = 5.4, Gt = 3.2, De = ["planner", "researcher", "writer"], yt = Object.fromEntries(Object.entries(oe).map(([g, e]) => [g, new w.Color(e)])), Ue = Ce, je = () => ({ used: !1, id: "", inst: null, seen: 0, x: 0, y: 0, z: 0, r: 1, g: 1, b: 1, omega: 0, bright: 0, swirl: 0, rscale: 1, tiltA: 0, tiltB: 0, count: 0, want: 0, rank: 0, ka: null, released: !1, p: 0, e: 0, waitMcp: 0 }), St = tt * 3, Ne = (g) => {
|
|
12
12
|
let e = 7;
|
|
13
13
|
for (let c = 0; c < g.length; c++) e = e * 31 + g.charCodeAt(c) >>> 0;
|
|
14
14
|
return e % 100003;
|
|
@@ -59,109 +59,109 @@ function te() {
|
|
|
59
59
|
blending: w.AdditiveBlending
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
const S = new w.Vector3(), N = new w.Vector3(), T = new w.Vector3(), G = new w.Color(), J = new w.Color(), Q = new w.Object3D(), V = new w.Color(1, 1, 1), ee = new w.Color("#fbbf24"),
|
|
63
|
-
class
|
|
62
|
+
const S = new w.Vector3(), N = new w.Vector3(), T = new w.Vector3(), G = new w.Color(), J = new w.Color(), Q = new w.Object3D(), V = new w.Color(1, 1, 1), ee = new w.Color("#fbbf24"), We = new w.Color("#ef4444"), Xe = new w.Color("#ef4444");
|
|
63
|
+
class qe {
|
|
64
64
|
constructor() {
|
|
65
|
-
|
|
65
|
+
d(this, "material", te());
|
|
66
66
|
/** nebula points live in the (scaled) side graph group: their sprite size follows kit.graph.scale */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
d(this, "nebMaterial", te());
|
|
68
|
+
d(this, "frame", 0);
|
|
69
|
+
d(this, "selectedId", null);
|
|
70
70
|
/** field radius (grows with the kit core so the murmuration always surrounds the agents + periphery) */
|
|
71
|
-
|
|
71
|
+
d(this, "fieldR", kt);
|
|
72
72
|
// ---- field
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
73
|
+
d(this, "fieldGeo", ft(W));
|
|
74
|
+
d(this, "fP", j(this.fieldGeo, "position"));
|
|
75
|
+
d(this, "fC", j(this.fieldGeo, "acol"));
|
|
76
|
+
d(this, "fS", j(this.fieldGeo, "size"));
|
|
77
|
+
d(this, "fYb", new Float32Array(W));
|
|
78
|
+
d(this, "fIvx", new Float32Array(W));
|
|
79
|
+
d(this, "fIvz", new Float32Array(W));
|
|
80
|
+
d(this, "fHeat", new Float32Array(W));
|
|
81
|
+
d(this, "fT", new Float32Array(W * 3));
|
|
82
|
+
d(this, "fOwner", new Int16Array(W).fill(-1));
|
|
83
|
+
d(this, "fAng", new Float32Array(W));
|
|
84
|
+
d(this, "fOrb", new Float32Array(W));
|
|
85
|
+
d(this, "fRnd", new Float32Array(W));
|
|
86
86
|
// ---- slots (agent eddies, one per drawn kit agent)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
d(this, "slots", Array.from({ length: Y }, je));
|
|
88
|
+
d(this, "idToSlot", /* @__PURE__ */ new Map());
|
|
89
|
+
d(this, "pendingByInst", /* @__PURE__ */ new Map());
|
|
90
90
|
// ---- runs (pooled vortices, one per drawn kit run; a vortex fades out after its run leaves the kit)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
d(this, "runRef", new Array(F).fill(null));
|
|
92
|
+
d(this, "runKit", new Array(F).fill(null));
|
|
93
|
+
d(this, "runId", new Array(F).fill(""));
|
|
94
|
+
d(this, "runPool", /* @__PURE__ */ new Map());
|
|
95
|
+
d(this, "rPresent", new Uint8Array(F));
|
|
96
|
+
d(this, "rSteps", new Uint8Array(F));
|
|
97
|
+
d(this, "rX", new Float32Array(F));
|
|
98
|
+
d(this, "rZ", new Float32Array(F));
|
|
99
99
|
/** vortex loop radius per run (around its agents) */
|
|
100
|
-
|
|
100
|
+
d(this, "rR", new Float32Array(F).fill(Le));
|
|
101
101
|
/** step attractors (x, z) per run: at the kit's role slots (plan | research | write) */
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
102
|
+
d(this, "rAt", new Float32Array(F * 6));
|
|
103
|
+
d(this, "rAlpha", new Float32Array(F));
|
|
104
|
+
d(this, "rCol", Array.from({ length: F }, () => new w.Color()));
|
|
105
|
+
d(this, "rColStr", new Array(F).fill(""));
|
|
106
|
+
d(this, "runGeo", ft(F * $));
|
|
107
|
+
d(this, "rTh", new Float32Array(F * $));
|
|
108
|
+
d(this, "rSp", new Float32Array(F * $));
|
|
109
|
+
d(this, "rRr", new Float32Array(F * $));
|
|
110
|
+
d(this, "rY", new Float32Array(F * $));
|
|
111
111
|
// ---- nebula (FalkorDB side current; local frame of the kit side graph)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
112
|
+
d(this, "nebGeo", ft(it));
|
|
113
|
+
d(this, "anchorGeo", ft(tt));
|
|
114
|
+
d(this, "nA", new Uint16Array(it));
|
|
115
|
+
d(this, "nO", new Float32Array(it * 3));
|
|
116
|
+
d(this, "nSpin", new Float32Array(it));
|
|
117
|
+
d(this, "nB", new Float32Array(it));
|
|
118
|
+
d(this, "aLocal", new Float32Array(tt * 3));
|
|
119
|
+
d(this, "aCol", new Float32Array(tt * 3));
|
|
120
|
+
d(this, "aNamed", new Uint8Array(tt));
|
|
121
|
+
d(this, "burst", new Float32Array(tt));
|
|
122
|
+
d(this, "burstW", new Float32Array(tt));
|
|
123
|
+
d(this, "flareCol", new Float32Array(tt * 3));
|
|
124
|
+
d(this, "nameIdx", /* @__PURE__ */ new Map());
|
|
125
|
+
d(this, "nebAngle", 0.4);
|
|
126
|
+
d(this, "nAnchors", 0);
|
|
127
|
+
d(this, "edgeGeo", new w.BufferGeometry());
|
|
128
|
+
d(this, "edgeA", new Uint16Array(St * 2));
|
|
129
|
+
d(this, "nEdge", 0);
|
|
130
|
+
d(this, "lastFlareId", 0);
|
|
131
|
+
d(this, "lastFlare", null);
|
|
132
132
|
// ---- streams + lines
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
d(this, "streamGeo", ft(Et));
|
|
134
|
+
d(this, "beamGeo");
|
|
135
|
+
d(this, "glowGeo", ft(Y + F * 3 + ht));
|
|
136
136
|
// ---- meshes
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
137
|
+
d(this, "cores");
|
|
138
|
+
d(this, "attractors");
|
|
139
|
+
d(this, "stepRings");
|
|
140
|
+
d(this, "rings");
|
|
141
|
+
d(this, "pulsars");
|
|
142
|
+
d(this, "pulsarBeams");
|
|
143
|
+
d(this, "selRing");
|
|
144
|
+
d(this, "ringStart", new Float32Array(ot).fill(-1e9));
|
|
145
|
+
d(this, "ringDur", new Float32Array(ot).fill(1));
|
|
146
|
+
d(this, "ringMax", new Float32Array(ot));
|
|
147
|
+
d(this, "ringPos", new Float32Array(ot * 3));
|
|
148
|
+
d(this, "ringCol", new Float32Array(ot * 3));
|
|
149
|
+
d(this, "ringNext", 0);
|
|
150
|
+
d(this, "mcpSpin", new Float32Array(ht));
|
|
151
151
|
// ------------------------------------------------------------------ frame
|
|
152
152
|
/** kit fit size multiplier for eddies, sampled once per frame */
|
|
153
|
-
|
|
153
|
+
d(this, "lodK", 1);
|
|
154
154
|
// active runs / swirls packed for the hot loop
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
155
|
+
d(this, "aX", new Float32Array(F));
|
|
156
|
+
d(this, "aZ", new Float32Array(F));
|
|
157
|
+
d(this, "aA", new Float32Array(F));
|
|
158
|
+
d(this, "aRR", new Float32Array(F));
|
|
159
|
+
d(this, "aR", new Float32Array(F * 3));
|
|
160
|
+
d(this, "sX", new Float32Array(Y));
|
|
161
|
+
d(this, "sZ", new Float32Array(Y));
|
|
162
|
+
d(this, "sS", new Float32Array(Y));
|
|
163
|
+
d(this, "stTh", new Float32Array(3));
|
|
164
|
+
d(this, "stB", new Float32Array(3));
|
|
165
165
|
for (let t = 0; t < W; t++) {
|
|
166
166
|
const o = Math.sqrt(Math.random()) * kt, p = Math.random() * X;
|
|
167
167
|
this.fP[t * 3] = Math.cos(p) * o, this.fP[t * 3 + 2] = Math.sin(p) * o, this.fYb[t] = (Math.random() - 0.5) * (0.6 + o * 0.05), this.fP[t * 3 + 1] = this.fYb[t], this.fRnd[t] = Math.random(), this.fOrb[t] = 0.16 + 1.35 * Math.pow(Math.random(), 1.5), this.fAng[t] = Math.random() * X;
|
|
@@ -212,7 +212,7 @@ class Xe {
|
|
|
212
212
|
for (let p = 0; p < i; p++) {
|
|
213
213
|
const b = c.nodes[p];
|
|
214
214
|
this.nameIdx.set(b.name.toLowerCase(), p), n.set(b.id, p);
|
|
215
|
-
const R =
|
|
215
|
+
const R = Ne(b.id), z = K(R), v = 0.5 + (Dt - 0.9) * Math.sqrt(z) + (K(R + 1) - 0.5) * 0.45, h = R % 3 / 3 * X + v * 1.15 + (K(R + 2) - 0.5) * 0.5;
|
|
216
216
|
this.aLocal[p * 3] = Math.cos(h) * v, this.aLocal[p * 3 + 1] = (K(R + 3) - 0.5) * 0.7 * (1.3 - z) + 0.4, this.aLocal[p * 3 + 2] = Math.sin(h) * v, G.set(Ae[b.kind] ?? "#94a3b8"), this.aCol[p * 3] = G.r, this.aCol[p * 3 + 1] = G.g, this.aCol[p * 3 + 2] = G.b, this.aNamed[p] = p < 22 ? 1 : 0;
|
|
217
217
|
}
|
|
218
218
|
if (i > 0) {
|
|
@@ -288,7 +288,7 @@ class Xe {
|
|
|
288
288
|
const i = e.inst, s = this.slots.findIndex((r) => !r.used);
|
|
289
289
|
if (s < 0) return -1;
|
|
290
290
|
const n = this.slots[s], f = yt[i.type];
|
|
291
|
-
Object.assign(n, { used: !0, id: i.id, inst: i, ka: e, count: 0, released: !1, r: f.r, g: f.g, b: f.b, omega: 2, bright: 0.6, swirl: 0, p: 0, e: 0 }), n.tiltA = (K(s + c) - 0.5) * 0.7, n.tiltB = (K(s * 3.1 + c) - 0.5) * 0.7, n.rscale =
|
|
291
|
+
Object.assign(n, { used: !0, id: i.id, inst: i, ka: e, count: 0, released: !1, r: f.r, g: f.g, b: f.b, omega: 2, bright: 0.6, swirl: 0, p: 0, e: 0 }), n.tiltA = (K(s + c) - 0.5) * 0.7, n.tiltB = (K(s * 3.1 + c) - 0.5) * 0.7, n.rscale = Ue(i.type) || e.depth > 0 ? 0.72 : 1, n.want = Math.round((n.rscale < 1 ? 380 : 620) * (pt ? 0.5 : 1));
|
|
292
292
|
const l = i.parent ? this.slotOf(i.parent) : null;
|
|
293
293
|
if (l ? (n.x = l.x, n.y = l.y, n.z = l.z) : (n.x = e.pos.x, n.y = 0.9, n.z = e.pos.z), this.idToSlot.set(i.id, s), this.emitRing(n.x, n.y, n.z, f, 2.4 * et.scale, 0.9, c, 2.2), l) {
|
|
294
294
|
const r = this.idToSlot.get(i.parent);
|
|
@@ -334,7 +334,7 @@ class Xe {
|
|
|
334
334
|
}
|
|
335
335
|
this.rPresent[n] = 1, this.runKit[n] = s, this.runRef[n] = s.run ?? q.runs.get(s.id) ?? null, this.rX[n] = s.origin.x, this.rZ[n] = s.origin.z, this.rR[n] = Math.max(2.6, Math.min(11, Math.hypot(s.hu, s.hv) * 0.92 + 0.6));
|
|
336
336
|
for (let f = 0; f < 3; f++)
|
|
337
|
-
ne(s, ie(
|
|
337
|
+
ne(s, ie(De[f]), 0, S), this.rAt[n * 6 + f * 2] = S.x, this.rAt[n * 6 + f * 2 + 1] = S.z;
|
|
338
338
|
this.rSteps[n] = (i = this.runRef[n]) != null && i.hasSteps ? 1 : 0;
|
|
339
339
|
}
|
|
340
340
|
for (let s = 0; s < F; s++) {
|
|
@@ -385,21 +385,21 @@ class Xe {
|
|
|
385
385
|
updateField(e, c) {
|
|
386
386
|
const i = this.fP, s = this.fC, n = this.fS, f = this.fOwner, l = this.slots, r = this.fRnd, t = e * nt, o = c * nt, p = 1 - Math.exp(-e * 2.8), b = Math.exp(-e * 0.5), R = Math.exp(-e * 1.3), z = 0.23 * o, v = 0.17 * o, h = 0.11 * o;
|
|
387
387
|
let A = 0;
|
|
388
|
-
for (let
|
|
389
|
-
this.rAlpha[
|
|
388
|
+
for (let u = 0; u < F; u++)
|
|
389
|
+
this.rAlpha[u] < 0.01 || (this.aX[A] = this.rX[u], this.aZ[A] = this.rZ[u], this.aRR[A] = this.rR[u], this.aA[A] = this.rAlpha[u], this.aR[A * 3] = this.rCol[u].r, this.aR[A * 3 + 1] = this.rCol[u].g, this.aR[A * 3 + 2] = this.rCol[u].b, A++);
|
|
390
390
|
let I = 0;
|
|
391
|
-
for (const
|
|
392
|
-
!
|
|
391
|
+
for (const u of l)
|
|
392
|
+
!u.used || u.swirl <= 0.01 || (this.sX[I] = u.x, this.sZ[I] = u.z, this.sS[I] = u.swirl, I++);
|
|
393
393
|
const a = this.fieldR, M = a * a;
|
|
394
|
-
for (let
|
|
395
|
-
const x =
|
|
394
|
+
for (let u = 0; u < W; u++) {
|
|
395
|
+
const x = u * 3;
|
|
396
396
|
let y = i[x], m = i[x + 1], P = i[x + 2];
|
|
397
|
-
const _ = f[
|
|
397
|
+
const _ = f[u];
|
|
398
398
|
if (_ >= 0) {
|
|
399
|
-
const B = l[_], E = this.fOrb[
|
|
399
|
+
const B = l[_], E = this.fOrb[u] * B.rscale * (0.35 + 0.65 * B.p) * this.lodK, k = this.fAng[u] += B.omega * e / (0.3 + E), D = Math.cos(k), C = Math.sin(k), L = B.x + D * E, bt = B.z + C * E, It = B.y + (C * B.tiltA + D * B.tiltB) * E + (r[u] - 0.5) * 0.14;
|
|
400
400
|
y += (L - y) * p, m += (It - m) * p, P += (bt - P) * p;
|
|
401
|
-
const mt = B.bright * (1.5 - E * 0.55) * (0.6 + 0.4 * r[
|
|
402
|
-
s[x] = B.r * mt + 0.05, s[x + 1] = B.g * mt + 0.05, s[x + 2] = B.b * mt + 0.05, n[
|
|
401
|
+
const mt = B.bright * (1.5 - E * 0.55) * (0.6 + 0.4 * r[u]);
|
|
402
|
+
s[x] = B.r * mt + 0.05, s[x + 1] = B.g * mt + 0.05, s[x + 2] = B.b * mt + 0.05, n[u] = 0.5 + 0.35 * r[u];
|
|
403
403
|
} else {
|
|
404
404
|
const B = y * y + P * P, E = Math.sqrt(B) + 1e-4, k = E / 11, D = 1.25 * k / (1 + k * k);
|
|
405
405
|
let C = -P / E * D, L = y / E * D;
|
|
@@ -421,11 +421,11 @@ class Xe {
|
|
|
421
421
|
const ct = this.sS[U] / (1 + Mt * 0.9);
|
|
422
422
|
C -= at * ct, L += H * ct;
|
|
423
423
|
}
|
|
424
|
-
C += this.fIvx[
|
|
425
|
-
const xt = this.fHeat[
|
|
426
|
-
if (s[x] = (0.05 + 0.05 * Ft) * Pt + Yt * 0.42 + this.fT[x] * xt * 1.8, s[x + 1] = (0.08 + 0.03 * Ft) * Pt + Kt * 0.42 + this.fT[x + 1] * xt * 1.8, s[x + 2] = (0.2 - 0.04 * Ft) * Pt + Zt * 0.42 + this.fT[x + 2] * xt * 1.8, n[
|
|
424
|
+
C += this.fIvx[u], L += this.fIvz[u], this.fIvx[u] *= R, this.fIvz[u] *= R, y += C * t, P += L * t, m += (this.fYb[u] - m) * e * 1.2;
|
|
425
|
+
const xt = this.fHeat[u] *= b, ce = C * C + L * L, Pt = (0.14 + qt * 2.8) * (0.6 + Math.min(1.2, ce * 0.3)) * (0.45 + 0.75 * r[u]), Ft = 0.5 + 0.5 * Math.sin(Xt * 1.3 + 1);
|
|
426
|
+
if (s[x] = (0.05 + 0.05 * Ft) * Pt + Yt * 0.42 + this.fT[x] * xt * 1.8, s[x + 1] = (0.08 + 0.03 * Ft) * Pt + Kt * 0.42 + this.fT[x + 1] * xt * 1.8, s[x + 2] = (0.2 - 0.04 * Ft) * Pt + Zt * 0.42 + this.fT[x + 2] * xt * 1.8, n[u] = 0.26 + 0.2 * r[u] + qt * 0.12 + xt * 0.35, B > M) {
|
|
427
427
|
const U = Math.sqrt(Math.random()) * a * 0.97, H = Math.random() * X;
|
|
428
|
-
y = Math.cos(H) * U, P = Math.sin(H) * U, this.fHeat[
|
|
428
|
+
y = Math.cos(H) * U, P = Math.sin(H) * U, this.fHeat[u] = 0, this.fIvx[u] = this.fIvz[u] = 0;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
i[x] = y, i[x + 1] = m, i[x + 2] = P;
|
|
@@ -457,25 +457,25 @@ class Xe {
|
|
|
457
457
|
if (!this.nAnchors || !Z.graphWanted) return;
|
|
458
458
|
const c = j(this.nebGeo, "position"), i = j(this.nebGeo, "acol"), s = j(this.nebGeo, "size"), n = Math.cos(this.nebAngle), f = Math.sin(this.nebAngle), l = e * nt, r = this.aLocal, t = this.aCol, o = this.flareCol;
|
|
459
459
|
for (let a = 0; a < it; a++) {
|
|
460
|
-
const M = this.nA[a],
|
|
460
|
+
const M = this.nA[a], u = this.burst[M], x = l * this.nSpin[a], y = Math.cos(x), m = Math.sin(x), P = this.nO[a * 3], _ = this.nO[a * 3 + 2], B = 1 + u * (2.2 + this.burstW[M] * 4.5), E = r[M * 3] + (P * y - _ * m) * B, k = r[M * 3 + 2] + (P * m + _ * y) * B, D = r[M * 3 + 1] + this.nO[a * 3 + 1] * B;
|
|
461
461
|
c[a * 3] = E * n - k * f, c[a * 3 + 1] = D, c[a * 3 + 2] = E * f + k * n;
|
|
462
462
|
const C = this.nB[a] * 0.3;
|
|
463
|
-
i[a * 3] = t[M * 3] * C + 0.05 + o[M * 3] *
|
|
463
|
+
i[a * 3] = t[M * 3] * C + 0.05 + o[M * 3] * u * 2.4, i[a * 3 + 1] = t[M * 3 + 1] * C + 0.06 + o[M * 3 + 1] * u * 2.4, i[a * 3 + 2] = t[M * 3 + 2] * C + 0.12 + o[M * 3 + 2] * u * 2.4, s[a] = 0.3 + this.nB[a] * 0.2 + u * 0.5;
|
|
464
464
|
}
|
|
465
465
|
ut(this.nebGeo);
|
|
466
466
|
const p = j(this.anchorGeo, "position"), b = j(this.anchorGeo, "acol"), R = j(this.anchorGeo, "size"), z = this.nAnchors;
|
|
467
467
|
for (let a = 0; a < z; a++) {
|
|
468
|
-
const M = r[a * 3],
|
|
469
|
-
p[a * 3] = M * n -
|
|
468
|
+
const M = r[a * 3], u = r[a * 3 + 2];
|
|
469
|
+
p[a * 3] = M * n - u * f, p[a * 3 + 1] = r[a * 3 + 1], p[a * 3 + 2] = M * f + u * n;
|
|
470
470
|
const x = this.burst[a], y = this.aNamed[a] ? 2.2 : 1.1;
|
|
471
471
|
b[a * 3] = t[a * 3] * y + o[a * 3] * x * 7, b[a * 3 + 1] = t[a * 3 + 1] * y + o[a * 3 + 1] * x * 7, b[a * 3 + 2] = t[a * 3 + 2] * y + o[a * 3 + 2] * x * 7, R[a] = (this.aNamed[a] ? 1.25 : 0.75) * (1 + x * 3.5);
|
|
472
472
|
}
|
|
473
473
|
ut(this.anchorGeo);
|
|
474
474
|
const v = this.edgeGeo.getAttribute("position").array, h = this.edgeGeo.getAttribute("color").array, A = this.edgeA, I = this.nEdge * 2;
|
|
475
475
|
for (let a = 0; a < I; a++) {
|
|
476
|
-
const M = A[a],
|
|
476
|
+
const M = A[a], u = A[a ^ 1], x = r[M * 3], y = r[M * 3 + 2];
|
|
477
477
|
v[a * 3] = x * n - y * f, v[a * 3 + 1] = r[M * 3 + 1], v[a * 3 + 2] = x * f + y * n;
|
|
478
|
-
const m = Math.max(this.burst[M], this.burst[
|
|
478
|
+
const m = Math.max(this.burst[M], this.burst[u] * 0.6);
|
|
479
479
|
h[a * 3] = t[M * 3] * 0.32 + 0.05 + o[M * 3] * m * 3, h[a * 3 + 1] = t[M * 3 + 1] * 0.32 + 0.06 + o[M * 3 + 1] * m * 3, h[a * 3 + 2] = t[M * 3 + 2] * 0.32 + 0.1 + o[M * 3 + 2] * m * 3;
|
|
480
480
|
}
|
|
481
481
|
this.edgeGeo.getAttribute("color").needsUpdate = !0, this.edgeGeo.getAttribute("position").needsUpdate = !0;
|
|
@@ -498,7 +498,7 @@ class Xe {
|
|
|
498
498
|
const h = (e - o.handoffAt) / 1e3, A = this.rSteps[t] === 1 && o.handoffAt > 0 && h < 2.4, I = l[o.handoffFrom];
|
|
499
499
|
let a = (l[o.handoffTo] - I) % X;
|
|
500
500
|
a < 0 && (a += X);
|
|
501
|
-
const M = a * Math.min(1, 1 - Math.pow(1 - Math.min(1, h / 1.4), 3)),
|
|
501
|
+
const M = a * Math.min(1, 1 - Math.pow(1 - Math.min(1, h / 1.4), 3)), u = A ? 3.2 * (1 - h / 2.4) : 0, x = this.rCol[t];
|
|
502
502
|
for (let y = 0; y < $; y++) {
|
|
503
503
|
const m = b + y, P = this.rTh[m] + f * this.rSp[m], _ = v + this.rRr[m] + 0.16 * Math.sin(3 * P + f * 0.6 + m);
|
|
504
504
|
i[m * 3] = R + Math.cos(P) * _, i[m * 3 + 1] = 0.25 + this.rY[m], i[m * 3 + 2] = z + Math.sin(P) * _;
|
|
@@ -513,7 +513,7 @@ class Xe {
|
|
|
513
513
|
let C = (P - I) % X;
|
|
514
514
|
if (C < 0 && (C += X), C <= M && C <= a + 0.1) {
|
|
515
515
|
const L = Math.exp(-(M - C) * 2.2);
|
|
516
|
-
B +=
|
|
516
|
+
B += u * (0.4 + L), E = 0.6 * L;
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
const k = Math.exp(-this.rRr[m] * this.rRr[m] * 4), D = p * (0.32 + 0.5 * k + B);
|
|
@@ -525,11 +525,11 @@ class Xe {
|
|
|
525
525
|
updateStreams(e, c) {
|
|
526
526
|
const i = j(this.streamGeo, "position"), s = j(this.streamGeo, "acol"), n = j(this.streamGeo, "size");
|
|
527
527
|
let f = 0;
|
|
528
|
-
const l = (h, A, I, a, M,
|
|
529
|
-
f >= Et || (i[f * 3] = h, i[f * 3 + 1] = A, i[f * 3 + 2] = I, s[f * 3] = a, s[f * 3 + 1] = M, s[f * 3 + 2] =
|
|
528
|
+
const l = (h, A, I, a, M, u, x) => {
|
|
529
|
+
f >= Et || (i[f * 3] = h, i[f * 3 + 1] = A, i[f * 3 + 2] = I, s[f * 3] = a, s[f * 3 + 1] = M, s[f * 3 + 2] = u, n[f] = x, f++);
|
|
530
530
|
}, r = (h, A, I, a, M) => {
|
|
531
|
-
const
|
|
532
|
-
return M.set(m * m * h.x + 2 * m * a *
|
|
531
|
+
const u = (h.x + A.x) / 2, x = (h.y + A.y) / 2 + I, y = (h.z + A.z) / 2, m = 1 - a;
|
|
532
|
+
return M.set(m * m * h.x + 2 * m * a * u + a * a * A.x, m * m * h.y + 2 * m * a * x + a * a * A.y, m * m * h.z + 2 * m * a * y + a * a * A.z);
|
|
533
533
|
};
|
|
534
534
|
for (let h = 0; h < F; h++) {
|
|
535
535
|
const A = this.runRef[h];
|
|
@@ -538,12 +538,12 @@ class Xe {
|
|
|
538
538
|
if (I > 2.4 || !this.rSteps[h] || this.rAlpha[h] < 0.01) continue;
|
|
539
539
|
this.attractor(h, A.handoffFrom, S), this.attractor(h, A.handoffTo, N);
|
|
540
540
|
const a = this.rCol[h], M = 220;
|
|
541
|
-
for (let
|
|
542
|
-
const x = (I -
|
|
541
|
+
for (let u = 0; u < M; u++) {
|
|
542
|
+
const x = (I - u / M * 1.4) / 0.9;
|
|
543
543
|
if (x < 0 || x > 1) continue;
|
|
544
544
|
r(S, N, 2.2, x, T);
|
|
545
545
|
const y = Math.sin(x * Math.PI) * 0.35, m = (1 - x * 0.4) * 2.4;
|
|
546
|
-
l(T.x + (K(
|
|
546
|
+
l(T.x + (K(u) - 0.5) * y, T.y + (K(u + 7) - 0.5) * y, T.z + (K(u + 13) - 0.5) * y, (a.r * 0.6 + 0.4) * m, (a.g * 0.6 + 0.4) * m, (a.b * 0.6 + 0.4) * m, 0.7 + (u % 9 === 0 ? 0.8 : 0));
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
for (const h of q.comets) {
|
|
@@ -551,19 +551,19 @@ class Xe {
|
|
|
551
551
|
if (!A || !I || h.failed && !Se(h, e)) continue;
|
|
552
552
|
const a = Ge(h, e), M = a < 0.5 ? 2 * a * a : 1 - Math.pow(-2 * a + 2, 2) / 2;
|
|
553
553
|
S.set(A.x, A.y, A.z), N.set(I.x, I.y, I.z);
|
|
554
|
-
const
|
|
554
|
+
const u = S.distanceTo(N), x = A.inst ? yt[A.inst.type] : V, y = h.failed ? 1 : a >= 1 ? Math.max(0, 1 - (e - h.start - h.dur) / 250) : 1;
|
|
555
555
|
for (let m = 0; m < 90; m++) {
|
|
556
556
|
const P = M - m * 55e-4;
|
|
557
557
|
if (P < 0) break;
|
|
558
|
-
r(S, N, 1.2 +
|
|
558
|
+
r(S, N, 1.2 + u * 0.16, P, T);
|
|
559
559
|
const _ = m * 6e-3, B = (m === 0 ? 7 : 3.2 * Math.pow(1 - m / 90, 1.6)) * y;
|
|
560
560
|
l(T.x + (K(h.id + m) - 0.5) * _, T.y + (K(h.id * 3 + m) - 0.5) * _, T.z + (K(h.id * 7 + m) - 0.5) * _, (x.r * 0.7 + 0.3) * B, (x.g * 0.7 + 0.3) * B, (x.b * 0.7 + 0.3) * B, m === 0 ? 2.6 : 0.85 - m * 6e-3);
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
const t = this.beamGeo.getAttribute("position").array, o = this.beamGeo.getAttribute("color").array;
|
|
564
564
|
let p = 0;
|
|
565
|
-
const b = (h, A, I, a, M,
|
|
566
|
-
t.set([h, A, I, a, M,
|
|
565
|
+
const b = (h, A, I, a, M, u, x, y, m, P, _, B) => {
|
|
566
|
+
t.set([h, A, I, a, M, u], p * 6), o.set([x, y, m, P, _, B], p * 6), p++;
|
|
567
567
|
}, R = this.nAnchors > 0 && Z.graphWanted && Z.graph.mix > 0.05;
|
|
568
568
|
for (const h of q.flares) {
|
|
569
569
|
if (!R || p >= _t) break;
|
|
@@ -572,12 +572,12 @@ class Xe {
|
|
|
572
572
|
const I = (e - h.start) / 2600;
|
|
573
573
|
if (I >= 1) continue;
|
|
574
574
|
this.anchorWorld(this.anchorIdx(h.node), N), S.set(A.x, A.y, A.z);
|
|
575
|
-
const a = h.op === "write", M = a ? V : A.inst ? yt[A.inst.type] : V,
|
|
576
|
-
b(S.x, S.y, S.z, N.x, N.y, N.z, M.r *
|
|
575
|
+
const a = h.op === "write", M = a ? V : A.inst ? yt[A.inst.type] : V, u = (1 - I) * (a ? 1.6 : 1);
|
|
576
|
+
b(S.x, S.y, S.z, N.x, N.y, N.z, M.r * u * 0.6, M.g * u * 0.6, M.b * u * 0.6, M.r * u * 1.4, M.g * u * 1.4, M.b * u * 1.4);
|
|
577
577
|
for (let x = 0; x < 22; x++) {
|
|
578
578
|
let y = ((e - h.start) / 1e3 * 0.75 + x / 22) % 1;
|
|
579
579
|
a || (y = 1 - y), r(S, N, 1.2, y, T);
|
|
580
|
-
const m = 2.4 *
|
|
580
|
+
const m = 2.4 * u * Math.sin(y * Math.PI);
|
|
581
581
|
l(T.x, T.y, T.z, M.r * m, M.g * m, M.b * m, 0.55);
|
|
582
582
|
}
|
|
583
583
|
}
|
|
@@ -587,13 +587,13 @@ class Xe {
|
|
|
587
587
|
const M = (e - h.start) / h.dur;
|
|
588
588
|
if (M > 1) continue;
|
|
589
589
|
S.set(A.x, A.y, A.z), N.copy(a).setY(Gt);
|
|
590
|
-
const
|
|
590
|
+
const u = h.phase === "call" ? S : N, x = h.phase === "call" ? N : S;
|
|
591
591
|
G.set(I.color);
|
|
592
592
|
const y = 1 - Math.pow(1 - M, 2);
|
|
593
593
|
for (let m = 0; m < 60; m++) {
|
|
594
594
|
const P = y - m * 8e-3;
|
|
595
595
|
if (P < 0) break;
|
|
596
|
-
r(
|
|
596
|
+
r(u, x, 3, P, T);
|
|
597
597
|
const _ = (m === 0 ? 6 : 2.6 * (1 - m / 60)) * (h.phase === "result" ? 1.2 : 1);
|
|
598
598
|
l(T.x, T.y, T.z, (G.r * 0.75 + 0.25) * _, (G.g * 0.75 + 0.25) * _, (G.b * 0.75 + 0.25) * _, m === 0 ? 2.2 : 0.7);
|
|
599
599
|
}
|
|
@@ -601,9 +601,9 @@ class Xe {
|
|
|
601
601
|
let z = 0;
|
|
602
602
|
const v = (h, A, I, a) => {
|
|
603
603
|
if (z >= Lt) return;
|
|
604
|
-
const M = this.slotOf(h),
|
|
605
|
-
if (!M || !
|
|
606
|
-
z++, S.set(M.x, M.y, M.z), N.copy(x).setY(Gt), G.set(
|
|
604
|
+
const M = this.slotOf(h), u = q.mcpServers.get(A), x = Tt(A);
|
|
605
|
+
if (!M || !u || !x) return;
|
|
606
|
+
z++, S.set(M.x, M.y, M.z), N.copy(x).setY(Gt), G.set(u.color), I < 2 ? G.lerp(ee, Math.min(1, I / 2)) : G.copy(ee).lerp(We, Math.min(1, I - 2));
|
|
607
607
|
const y = a >= 0 ? (1 - a) * 1.2 : 0.5 + Math.min(1.8, I * 0.6), m = c * 2.2;
|
|
608
608
|
let P = S.x, _ = S.y, B = S.z;
|
|
609
609
|
for (let E = 1; E <= Rt; E++) {
|
|
@@ -652,8 +652,8 @@ class Xe {
|
|
|
652
652
|
continue;
|
|
653
653
|
}
|
|
654
654
|
o.id === this.selectedId && (r = o);
|
|
655
|
-
const p = o.inst, b = (e - p.bornAt) / 1e3, R = Math.exp(-b * 3.5), z = p.exitAt ? (e - p.exitAt) / 1e3 : -1, v = z >= 0 ? Math.exp(-z * 5) : 0, A = p.status === "thinking" && !p.exitAt ? 0.1 * Math.sin(c * 9 + t) : 0, I = z >= 0 ? Math.pow(o.p, 1.6) : o.p, a = et.scale, M = (I * (1 + o.e * 0.45 + A) + v * 0.9 + R * 0.6) * a;
|
|
656
|
-
G.setRGB(o.r, o.g, o.b).multiplyScalar(1.3 + o.bright * 1.5 + o.e * 1.1), G.lerp(J.setRGB(4, 4, 4), Math.min(1, R + v)), this.setInst(this.cores, t, o.x, o.y, o.z, M, G, c * o.omega * 0.3, c * o.omega, 0), G.setRGB(o.r, o.g, o.b), l(t, o.x, o.y, o.z, G, (0.3 + o.bright * 0.4 + o.e * 0.5 + R * 2 + v * 2.5) * o.p + v, (5 + o.e * 4 + R * 10 + v * 14) * Math.max(o.p, v) * a);
|
|
655
|
+
const p = o.inst, b = (e - p.bornAt) / 1e3, R = Math.exp(-b * 3.5), z = p.exitAt ? (e - p.exitAt) / 1e3 : -1, v = z >= 0 ? Math.exp(-z * 5) : 0, A = p.status === "thinking" && !p.exitAt ? 0.1 * Math.sin(c * 9 + t) : 0, I = z >= 0 ? Math.pow(o.p, 1.6) : o.p, a = et.scale, M = (I * (1 + o.e * 0.45 + A) + v * 0.9 + R * 0.6) * a, u = 1 - 0.75 * ze(o.id);
|
|
656
|
+
G.setRGB(o.r, o.g, o.b).multiplyScalar((1.3 + o.bright * 1.5 + o.e * 1.1) * u), G.lerp(J.setRGB(4, 4, 4), Math.min(1, R + v)), this.setInst(this.cores, t, o.x, o.y, o.z, M, G, c * o.omega * 0.3, c * o.omega, 0), G.setRGB(o.r, o.g, o.b).multiplyScalar(u), l(t, o.x, o.y, o.z, G, (0.3 + o.bright * 0.4 + o.e * 0.5 + R * 2 + v * 2.5) * o.p + v, (5 + o.e * 4 + R * 10 + v * 14) * Math.max(o.p, v) * a);
|
|
657
657
|
}
|
|
658
658
|
r ? (this.selRing.visible = !0, this.selRing.position.set(r.x, r.y, r.z), this.selRing.rotation.y = c * 1.5, this.selRing.scale.setScalar(1 + 0.08 * Math.sin(c * 4)), this.selRing.material.color.setRGB(r.r * 3, r.g * 3, r.b * 3)) : this.selRing.visible = !1;
|
|
659
659
|
for (let t = 0; t < F; t++) {
|
|
@@ -666,19 +666,19 @@ class Xe {
|
|
|
666
666
|
}
|
|
667
667
|
this.attractor(t, b, S);
|
|
668
668
|
const v = zt(o, b), h = this.rCol[t];
|
|
669
|
-
let A = 0.6, I = 0.5, a = 0.25, M = 0.9,
|
|
669
|
+
let A = 0.6, I = 0.5, a = 0.25, M = 0.9, u = 0.12, x = 4;
|
|
670
670
|
if (G.copy(h), v === "running") {
|
|
671
671
|
const y = 0.5 + 0.5 * Math.sin(c * 5);
|
|
672
|
-
A = 1.15 + y * 0.2, G.lerp(V, 0.45), I = 3 + y * 1.5, a = 1.4 + y, M = 1.15 + y * 0.25,
|
|
673
|
-
} else v === "done" ? (A = 0.85, I = 1.8, a = 0.7, M = 0.95,
|
|
672
|
+
A = 1.15 + y * 0.2, G.lerp(V, 0.45), I = 3 + y * 1.5, a = 1.4 + y, M = 1.15 + y * 0.25, u = 1.1 + y * 0.6, x = 12;
|
|
673
|
+
} else v === "done" ? (A = 0.85, I = 1.8, a = 0.7, M = 0.95, u = 0.4, x = 6) : v === "failed" && G.copy(Xe);
|
|
674
674
|
if (o.handoffAt && b === o.handoffTo) {
|
|
675
675
|
const y = (e - o.handoffAt) / 1e3 - 1.2;
|
|
676
676
|
if (y > 0 && y < 1) {
|
|
677
677
|
const m = Math.exp(-y * 4);
|
|
678
|
-
A += m * 0.8,
|
|
678
|
+
A += m * 0.8, u += m * 2, x += m * 10;
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
J.copy(G).multiplyScalar(I * p), this.setInst(this.attractors, R, S.x, S.y, S.z, A, J, 0, c * 0.6, 0), J.copy(G).multiplyScalar(a * p), this.setInst(this.stepRings, R, S.x, S.y, S.z, M, J, 0, v === "running" ? c * 1.6 : 0.3, 0), l(z, S.x, S.y, S.z, G,
|
|
681
|
+
J.copy(G).multiplyScalar(I * p), this.setInst(this.attractors, R, S.x, S.y, S.z, A, J, 0, c * 0.6, 0), J.copy(G).multiplyScalar(a * p), this.setInst(this.stepRings, R, S.x, S.y, S.z, M, J, 0, v === "running" ? c * 1.6 : 0.3, 0), l(z, S.x, S.y, S.z, G, u * p, x);
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
for (let t = 0; t < ht; t++) {
|
|
@@ -689,7 +689,7 @@ class Xe {
|
|
|
689
689
|
const o = t.slot % ht, p = Y + F * 3 + o, b = Tt(t.name);
|
|
690
690
|
if (!b) continue;
|
|
691
691
|
S.copy(b).setY(Gt);
|
|
692
|
-
const R =
|
|
692
|
+
const R = ve(t.activeAt, e, 2.5), z = t.inflight > 0 ? 1 : 0;
|
|
693
693
|
this.mcpSpin[o] += i * (0.4 + z * 3.5) * nt;
|
|
694
694
|
const v = 0.5 + 0.5 * Math.sin(c * (z ? 9 : 2.2) + o);
|
|
695
695
|
G.set(t.color), J.copy(G).multiplyScalar(1.6 + z * 1.6 + R * 3 + v * 0.6), this.setInst(this.pulsars, o, S.x, S.y, S.z, 1 + R * 0.6 + z * 0.2 * v, J, 0, this.mcpSpin[o], 0), J.copy(G).multiplyScalar(0.25 + z * 0.9 * v + R * 0.8), this.setInst(this.pulsarBeams, o, S.x, S.y, S.z, 1 + z * 0.3, J, 0.5 * Math.sin(this.mcpSpin[o] * 0.5), this.mcpSpin[o], 0.35 + 0.3 * Math.cos(this.mcpSpin[o])), l(p, S.x, S.y, S.z, G, 0.2 + z * 0.25 * v + R * 0.35, 5 + R * 3 + z * 2);
|
|
@@ -708,9 +708,9 @@ class Xe {
|
|
|
708
708
|
ut(this.glowGeo);
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
const
|
|
712
|
-
function
|
|
713
|
-
const g = Ut(), e = ue((i) => i.gl), c =
|
|
711
|
+
const Ye = { tint: "#a5b4fc", tintAmt: 0.2, gain: 0.6, halo: 0.25, lift: Gt }, lt = new w.Vector3(), Ke = ["planner", "researcher", "writer"], rt = { engine: null }, Ut = () => rt.engine ?? (rt.engine = new qe());
|
|
712
|
+
function Ze() {
|
|
713
|
+
const g = Ut(), e = ue((i) => i.gl), c = Ee();
|
|
714
714
|
return At(() => {
|
|
715
715
|
g.setGalaxy(c);
|
|
716
716
|
}, [g, c]), At(() => {
|
|
@@ -736,7 +736,7 @@ function Ke() {
|
|
|
736
736
|
/* @__PURE__ */ O("primitive", { object: g.selRing })
|
|
737
737
|
] });
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function He({ agent: g, selected: e, onSelect: c }) {
|
|
740
740
|
const i = st(null);
|
|
741
741
|
return At(() => {
|
|
742
742
|
const s = Ut();
|
|
@@ -764,19 +764,19 @@ function Ze({ agent: g, selected: e, onSelect: c }) {
|
|
|
764
764
|
}
|
|
765
765
|
);
|
|
766
766
|
}
|
|
767
|
-
function
|
|
768
|
-
|
|
767
|
+
function Ve({ run: g }) {
|
|
768
|
+
Be();
|
|
769
769
|
const e = g.run ?? q.runs.get(g.id), c = st(null), i = st([]);
|
|
770
770
|
if (gt(() => {
|
|
771
771
|
var l;
|
|
772
772
|
(l = c.current) == null || l.position.set(g.origin.x, 0.6, g.origin.z - Math.min(11, Math.hypot(g.hu, g.hv) * 0.92 + 0.6) - 1.3);
|
|
773
773
|
for (let r = 0; r < 3; r++) {
|
|
774
774
|
const t = i.current[r];
|
|
775
|
-
t && (ne(g, ie(
|
|
775
|
+
t && (ne(g, ie(Ke[r]), 0, lt), t.position.set(lt.x, 1.45 * Math.max(0.85, et.scale), lt.z + 0.9 * et.spread));
|
|
776
776
|
}
|
|
777
777
|
}), !e) return null;
|
|
778
778
|
const s = et.w < 900, n = (l) => l === "running" ? e.color : l === "done" ? "#cbd5e1" : l === "failed" ? "#fecaca" : "#64748b", f = () => {
|
|
779
|
-
const { shown: l, more: r } =
|
|
779
|
+
const { shown: l, more: r } = _e(e), t = l.map((o, p) => ({ text: `${p ? " " : ""}${o.toUpperCase()}`, color: n(e.steps[o]) }));
|
|
780
780
|
return r && t.push({ text: ` +${r}`, color: n("queued") }), e.status === "started" && Jt(e) && t.push({ text: ` ${Qt(e)}`, color: n("queued") }), t;
|
|
781
781
|
};
|
|
782
782
|
return /* @__PURE__ */ dt(fe, { children: [
|
|
@@ -793,10 +793,10 @@ function He({ run: g }) {
|
|
|
793
793
|
pxRange: [10, 14]
|
|
794
794
|
}
|
|
795
795
|
) }),
|
|
796
|
-
e.hasSteps && !s &&
|
|
796
|
+
e.hasSteps && !s && Oe.map((l) => /* @__PURE__ */ O("group", { ref: (r) => void (i.current[l] = r), children: /* @__PURE__ */ O(
|
|
797
797
|
vt,
|
|
798
798
|
{
|
|
799
|
-
text:
|
|
799
|
+
text: Te(e, l),
|
|
800
800
|
font: "mono",
|
|
801
801
|
plate: "none",
|
|
802
802
|
uppercase: !0,
|
|
@@ -810,7 +810,7 @@ function He({ run: g }) {
|
|
|
810
810
|
) }, l))
|
|
811
811
|
] });
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function $e(g) {
|
|
814
814
|
const e = Ut();
|
|
815
815
|
return gt(() => {
|
|
816
816
|
e.nebMaterial.uniforms.uScale.value = e.material.uniforms.uScale.value * Z.graph.scale;
|
|
@@ -818,10 +818,10 @@ function Ve(g) {
|
|
|
818
818
|
/* @__PURE__ */ O("points", { geometry: e.nebGeo, material: e.nebMaterial, frustumCulled: !1 }),
|
|
819
819
|
/* @__PURE__ */ O("points", { geometry: e.anchorGeo, material: e.nebMaterial, frustumCulled: !1 }),
|
|
820
820
|
/* @__PURE__ */ O("lineSegments", { geometry: e.edgeGeo, frustumCulled: !1, children: /* @__PURE__ */ O("lineBasicMaterial", { vertexColors: !0, transparent: !0, blending: w.AdditiveBlending, depthWrite: !1, toneMapped: !1 }) }),
|
|
821
|
-
/* @__PURE__ */ O(
|
|
821
|
+
/* @__PURE__ */ O(Fe, { position: [0, -0.6, Dt + 0.9], color: "#a5b4fc", size: 0.34, pxRange: [9.5, 13] })
|
|
822
822
|
] });
|
|
823
823
|
}
|
|
824
|
-
function
|
|
824
|
+
function Je() {
|
|
825
825
|
const g = st(null), e = st(null), c = st("");
|
|
826
826
|
return gt(() => {
|
|
827
827
|
var r;
|
|
@@ -830,11 +830,11 @@ function $e() {
|
|
|
830
830
|
const s = i.selectedId ?? q.focus, n = s ? i.slotOf(s) : null, f = !!n && !!n.inst && !n.inst.exitAt;
|
|
831
831
|
if ((r = e.current) == null || r.setOpacity(f ? 1 : 0), !n || !n.inst || !g.current || !e.current) return;
|
|
832
832
|
g.current.position.set(n.x, n.y + 1.25 * Math.max(0.85, et.scale), n.z);
|
|
833
|
-
const l = (n.inst.job ?
|
|
833
|
+
const l = (n.inst.job ? ke(n.inst) : n.inst.name) + " · " + n.inst.status;
|
|
834
834
|
l !== c.current && (c.current = l, e.current.setText(l), e.current.setColor(oe[n.inst.type]));
|
|
835
835
|
}), /* @__PURE__ */ O("group", { ref: g, children: /* @__PURE__ */ O(vt, { ref: e, text: "", size: 0.3, opacity: 0, fadeMs: 300, pxRange: [9, 13], renderOrder: 24 }) });
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function Qe() {
|
|
838
838
|
const g = st(null), e = st(null), c = st("");
|
|
839
839
|
return gt(() => {
|
|
840
840
|
const i = rt.engine, s = i == null ? void 0 : i.lastFlare;
|
|
@@ -843,10 +843,10 @@ function Je() {
|
|
|
843
843
|
e.current.setOpacity(n < 2.2 && Z.graphWanted ? 1 : 0), i.anchorWorld(s.idx, lt), g.current.position.set(lt.x, lt.y + 0.9, lt.z), c.current !== s.name + s.op && (c.current = s.name + s.op, e.current.setText((s.op === "write" ? "wrote · " : "read · ") + s.name), e.current.setColor(s.op === "write" ? "#ffffff" : "#a5b4fc"));
|
|
844
844
|
}), /* @__PURE__ */ O("group", { ref: g, children: /* @__PURE__ */ O(vt, { ref: e, text: "", size: 0.28, opacity: 0, fadeMs: 400, pxRange: [8.5, 12], renderOrder: 24 }) });
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function rs() {
|
|
847
847
|
const g = Me(() => ({ nRef: 4, min: 0.62, max: 1.45, minRadius: 7 }), []);
|
|
848
848
|
return /* @__PURE__ */ dt(
|
|
849
|
-
|
|
849
|
+
Pe,
|
|
850
850
|
{
|
|
851
851
|
title: "flow · murmuration",
|
|
852
852
|
subtitle: "agents are eddies condensing out of the current · hatchet runs are vortices · the knowledge graph is a nebula current on the side",
|
|
@@ -860,10 +860,10 @@ function os() {
|
|
|
860
860
|
agentRadius: 1.6,
|
|
861
861
|
graph: { natural: Dt, radius: 3.6 },
|
|
862
862
|
peripheryGap: 4.5,
|
|
863
|
-
Agent:
|
|
864
|
-
RunMarker:
|
|
865
|
-
mcpStyle:
|
|
866
|
-
GraphResource:
|
|
863
|
+
Agent: He,
|
|
864
|
+
RunMarker: Ve,
|
|
865
|
+
mcpStyle: Ye,
|
|
866
|
+
GraphResource: $e,
|
|
867
867
|
cluster: { radius: 1.7, variant: "swarm", pointSize: 1.1 },
|
|
868
868
|
clusterOffset: [0, 1.8, 0],
|
|
869
869
|
PostFX: /* @__PURE__ */ dt(de, { multisampling: 0, children: [
|
|
@@ -872,13 +872,13 @@ function os() {
|
|
|
872
872
|
/* @__PURE__ */ O(me, { opacity: 0.03 })
|
|
873
873
|
] }),
|
|
874
874
|
children: [
|
|
875
|
-
/* @__PURE__ */ O(
|
|
876
|
-
/* @__PURE__ */ O(
|
|
877
|
-
/* @__PURE__ */ O(
|
|
875
|
+
/* @__PURE__ */ O(Ze, {}),
|
|
876
|
+
/* @__PURE__ */ O(Je, {}),
|
|
877
|
+
/* @__PURE__ */ O(Qe, {})
|
|
878
878
|
]
|
|
879
879
|
}
|
|
880
880
|
);
|
|
881
881
|
}
|
|
882
882
|
export {
|
|
883
|
-
|
|
883
|
+
rs as default
|
|
884
884
|
};
|