agentglow 0.4.3 → 0.4.5
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-DNk9wirq.js} +3146 -2915
- package/dist/chunks/{index-DlvN9YSt.js → index-B7hfNEXI.js} +284 -284
- package/dist/chunks/{index-DATZHNA0.js → index-B8MtKKcW.js} +42 -42
- package/dist/chunks/{index-nw9i304P.js → index-BXBnv8GE.js} +1 -1
- package/dist/chunks/{index-B6EboYGn.js → index-CHIG9x__.js} +30 -30
- package/dist/chunks/{index-CW8fTJn1.js → index-CXhdtTJn.js} +7 -7
- package/dist/chunks/{index-s99mYaJ9.js → index-DOXpqUvk.js} +352 -345
- package/dist/chunks/{index-avfwD6eP.js → index-Mp_16YlZ.js} +1 -1
- package/dist/chunks/{index-CoeLwySn.js → index-n6GWpbis.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,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var k = (t, e, s) =>
|
|
1
|
+
var ke = Object.defineProperty;
|
|
2
|
+
var Le = (t, e, s) => e in t ? ke(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
|
+
var k = (t, e, s) => Le(t, typeof e != "symbol" ? e + "" : e, s);
|
|
4
4
|
import { jsxs as lt, Fragment as Kt, jsx as b } from "react/jsx-runtime";
|
|
5
|
-
import { EffectComposer as
|
|
5
|
+
import { EffectComposer as Oe, Bloom as Ee, Vignette as Fe } from "@react-three/postprocessing";
|
|
6
6
|
import * as r from "three";
|
|
7
|
-
import { useFrame as
|
|
7
|
+
import { useFrame as dt, useThree as je } from "@react-three/fiber";
|
|
8
8
|
import { useMemo as D, useRef as I, useEffect as ce } from "react";
|
|
9
|
-
import { T as le, h as
|
|
10
|
-
var
|
|
11
|
-
const
|
|
9
|
+
import { T as le, h as ot, f as Rt, K as qe, w as L, F as We, a as St, Q as Ke, L as Bt, C as Ue, u as Re, A as Q, d as ve, k as Xe, H as Ne, R as $e, E as He, X as Ze, e as Ye, s as Qe, j as Je, n as to, o as eo, x as oo } from "./KitScene-DNk9wirq.js";
|
|
10
|
+
var _e;
|
|
11
|
+
const st = typeof window < "u" && !!((_e = window.matchMedia) != null && _e.call(window, "(prefers-reduced-motion: reduce)").matches), rt = (t) => t < 0 ? 0 : t > 1 ? 1 : t, jt = (t) => 1 - Math.pow(1 - rt(t), 3), ne = (t) => (t = rt(t), t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2), mt = () => performance.now() / 1e3, N = new r.Color(1, 1, 1), $ = new r.Color("#bff3ff");
|
|
12
12
|
new r.Color("#2dd4bf");
|
|
13
|
-
const
|
|
13
|
+
const Nt = new r.Color("#fbbf24"), _t = new r.Color("#ff3048"), It = Object.fromEntries(Object.entries(le).map(([t, e]) => [t, new r.Color(e).lerp($, 0.38)])), no = Object.fromEntries(Object.entries(le).map(([t, e]) => [t, new r.Color(e)]));
|
|
14
14
|
let Dt = null;
|
|
15
|
-
function
|
|
15
|
+
function so() {
|
|
16
16
|
if (Dt) return Dt;
|
|
17
17
|
const t = document.createElement("canvas");
|
|
18
18
|
t.width = t.height = 128;
|
|
@@ -20,12 +20,12 @@ function no() {
|
|
|
20
20
|
return s.addColorStop(0, "rgba(255,255,255,1)"), s.addColorStop(0.1, "rgba(255,255,255,0.7)"), s.addColorStop(0.35, "rgba(255,255,255,0.14)"), s.addColorStop(1, "rgba(255,255,255,0)"), e.fillStyle = s, e.fillRect(0, 0, 128, 128), Dt = new r.CanvasTexture(t), Dt.colorSpace = r.SRGBColorSpace, Dt;
|
|
21
21
|
}
|
|
22
22
|
function se(t = "#fff") {
|
|
23
|
-
return new r.SpriteMaterial({ map:
|
|
23
|
+
return new r.SpriteMaterial({ map: so(), color: t, blending: r.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1 });
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function ro(t = "#fff") {
|
|
26
26
|
return new r.MeshBasicMaterial({ color: t, blending: r.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1, side: r.DoubleSide });
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function nt(t) {
|
|
29
29
|
return new r.LineBasicMaterial({ color: t ?? "#fff", vertexColors: t === void 0, transparent: !0, blending: r.AdditiveBlending, depthWrite: !1, toneMapped: !1 });
|
|
30
30
|
}
|
|
31
31
|
const be = (() => {
|
|
@@ -35,16 +35,16 @@ const be = (() => {
|
|
|
35
35
|
t.push(Math.cos(o), Math.sin(o), 0, Math.cos(d), Math.sin(d), 0);
|
|
36
36
|
}
|
|
37
37
|
return new r.BufferGeometry().setAttribute("position", new r.Float32BufferAttribute(t, 3));
|
|
38
|
-
})(),
|
|
38
|
+
})(), ao = new r.SphereGeometry(1, 12, 8);
|
|
39
39
|
function Ut(t, e, s, o, d) {
|
|
40
|
-
const
|
|
41
|
-
return d.set(
|
|
40
|
+
const f = 1 - o;
|
|
41
|
+
return d.set(f * f * t.x + 2 * f * o * e.x + o * o * s.x, f * f * t.y + 2 * f * o * e.y + o * o * s.y, f * f * t.z + 2 * f * o * e.z + o * o * s.z);
|
|
42
42
|
}
|
|
43
43
|
function qt(t, e, s, o) {
|
|
44
|
-
const d = e.x - t.x,
|
|
45
|
-
return o.copy(t).add(e).multiplyScalar(0.5), o.x += -
|
|
44
|
+
const d = e.x - t.x, f = e.y - t.y;
|
|
45
|
+
return o.copy(t).add(e).multiplyScalar(0.5), o.x += -f * s, o.y += d * s, o;
|
|
46
46
|
}
|
|
47
|
-
const
|
|
47
|
+
const io = (
|
|
48
48
|
/* glsl */
|
|
49
49
|
`
|
|
50
50
|
attribute vec4 aData; attribute vec3 aColor;
|
|
@@ -74,7 +74,7 @@ void main(){
|
|
|
74
74
|
gl_PointSize = clamp(px, 0.0, 256.0);
|
|
75
75
|
gl_Position = projectionMatrix * mv;
|
|
76
76
|
}`
|
|
77
|
-
),
|
|
77
|
+
), co = (
|
|
78
78
|
/* glsl */
|
|
79
79
|
`
|
|
80
80
|
varying vec3 vC; varying float vKind;
|
|
@@ -93,11 +93,11 @@ void main(){
|
|
|
93
93
|
}
|
|
94
94
|
gl_FragColor = vec4(vC * k, 1.0);
|
|
95
95
|
}`
|
|
96
|
-
),
|
|
97
|
-
class
|
|
98
|
-
constructor(e =
|
|
96
|
+
), lo = 32768;
|
|
97
|
+
class fo {
|
|
98
|
+
constructor(e = lo) {
|
|
99
99
|
k(this, "geo", new r.BufferGeometry());
|
|
100
|
-
k(this, "mat", new r.ShaderMaterial({ uniforms: { uTime: { value: 0 }, uScale: { value: 400 }, uMinPx: { value: 2.4 } }, vertexShader:
|
|
100
|
+
k(this, "mat", new r.ShaderMaterial({ uniforms: { uTime: { value: 0 }, uScale: { value: 400 }, uMinPx: { value: 2.4 } }, vertexShader: io, fragmentShader: co, transparent: !0, depthWrite: !1, blending: r.AdditiveBlending }));
|
|
101
101
|
k(this, "obj");
|
|
102
102
|
k(this, "P");
|
|
103
103
|
k(this, "D");
|
|
@@ -111,11 +111,11 @@ class lo {
|
|
|
111
111
|
this.D = new r.BufferAttribute(s, 4).setUsage(r.DynamicDrawUsage), this.C = new r.BufferAttribute(new Float32Array(e * 3), 3).setUsage(r.DynamicDrawUsage), this.geo.setAttribute("position", this.P), this.geo.setAttribute("aData", this.D), this.geo.setAttribute("aColor", this.C), this.geo.boundingSphere = new r.Sphere(new r.Vector3(), 1e5), this.obj = new r.Points(this.geo, this.mat), this.obj.frustumCulled = !1, this.obj.renderOrder = 2;
|
|
112
112
|
}
|
|
113
113
|
/** one bubble/flash; `birth` in nowS() seconds (future = drawn later), colour premultiplied by `k` */
|
|
114
|
-
emit(e, s, o, d,
|
|
114
|
+
emit(e, s, o, d, f, a, c, l, u = 0) {
|
|
115
115
|
const i = this.head;
|
|
116
116
|
this.head = (i + 1) % this.max, this.lo < 0 && (this.lo = i), this.n++;
|
|
117
117
|
const p = this.P.array, h = this.D.array, m = this.C.array;
|
|
118
|
-
p[i * 3] = e, p[i * 3 + 1] = s, p[i * 3 + 2] = o, h[i * 4] =
|
|
118
|
+
p[i * 3] = e, p[i * 3 + 1] = s, p[i * 3 + 2] = o, h[i * 4] = l, h[i * 4 + 1] = c, h[i * 4 + 2] = d, h[i * 4 + 3] = u, m[i * 3] = f.r * a, m[i * 3 + 1] = f.g * a, m[i * 3 + 2] = f.b * a;
|
|
119
119
|
}
|
|
120
120
|
/** upload the slots written since the last flush (one or two ranges) */
|
|
121
121
|
flush() {
|
|
@@ -132,20 +132,20 @@ class lo {
|
|
|
132
132
|
this.mat.uniforms.uScale.value = e * s / (2 * Math.tan(o * Math.PI / 360)), this.mat.uniforms.uMinPx.value = 2.4 * s;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
let
|
|
136
|
-
const Z = () =>
|
|
137
|
-
function re(t, e, s, o, d,
|
|
138
|
-
const
|
|
135
|
+
let uo = null;
|
|
136
|
+
const Z = () => uo ?? (uo = new fo());
|
|
137
|
+
function re(t, e, s, o, d, f, a, c) {
|
|
138
|
+
const l = Z();
|
|
139
139
|
for (let u = 0; u < e; u++) {
|
|
140
140
|
const i = Math.random() * 2 - 1, p = Math.random() * Math.PI * 2, h = Math.sqrt(1 - i * i), m = s * Math.cbrt(Math.random());
|
|
141
|
-
|
|
141
|
+
l.emit(t.x + Math.cos(p) * h * m, t.y + Math.sin(p) * h * m, t.z + i * m, o * (0.7 + Math.random() * 0.7), d, f * (0.7 + Math.random() * 0.5), a * (0.8 + Math.random() * 0.4), c + Math.random() * 0.08, 0);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function Ie(t, e, s, o, d, f, a, c, l, u, i, p = 0) {
|
|
145
145
|
const h = Z(), m = t.x + Math.cos(e + i * Math.PI * 0.5) * s, w = t.y + Math.sin(e + i * Math.PI * 0.5) * s, n = e - i * Math.PI * 0.5;
|
|
146
146
|
for (let y = 0; y < d; y++) {
|
|
147
147
|
const v = y / (d - 1), x = n + i * v * o * Math.PI * 2, B = s * (1 - 0.82 * v);
|
|
148
|
-
h.emit(m + Math.cos(x) * B, w + Math.sin(x) * B, t.z + p * Math.sqrt(v),
|
|
148
|
+
h.emit(m + Math.cos(x) * B, w + Math.sin(x) * B, t.z + p * Math.sqrt(v), f * (1 - 0.35 * v), a, c, l, u + v * 0.35, 0);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
class Yt {
|
|
@@ -156,25 +156,25 @@ class Yt {
|
|
|
156
156
|
k(this, "C");
|
|
157
157
|
k(this, "n", 0);
|
|
158
158
|
k(this, "p", new r.Vector3());
|
|
159
|
-
this.max = e, this.seg = s, this.P = new r.BufferAttribute(new Float32Array(e * s * 6), 3).setUsage(r.DynamicDrawUsage), this.C = new r.BufferAttribute(new Float32Array(e * s * 6), 3).setUsage(r.DynamicDrawUsage), this.geo.setAttribute("position", this.P), this.geo.setAttribute("color", this.C), this.geo.boundingSphere = new r.Sphere(new r.Vector3(), 1e5), this.obj = new r.LineSegments(this.geo,
|
|
159
|
+
this.max = e, this.seg = s, this.P = new r.BufferAttribute(new Float32Array(e * s * 6), 3).setUsage(r.DynamicDrawUsage), this.C = new r.BufferAttribute(new Float32Array(e * s * 6), 3).setUsage(r.DynamicDrawUsage), this.geo.setAttribute("position", this.P), this.geo.setAttribute("color", this.C), this.geo.boundingSphere = new r.Sphere(new r.Vector3(), 1e5), this.obj = new r.LineSegments(this.geo, nt()), this.obj.frustumCulled = !1;
|
|
160
160
|
}
|
|
161
161
|
begin() {
|
|
162
162
|
this.n = 0;
|
|
163
163
|
}
|
|
164
|
-
add(e, s, o, d,
|
|
165
|
-
if (this.n >= this.max ||
|
|
164
|
+
add(e, s, o, d, f, a, c, l, u, i, p) {
|
|
165
|
+
if (this.n >= this.max || c <= a || f < 3e-3 && p < 3e-3) return;
|
|
166
166
|
const h = this.seg, m = this.P, w = this.C;
|
|
167
167
|
for (let n = 0; n < h; n++) {
|
|
168
|
-
const y = a + (
|
|
168
|
+
const y = a + (c - a) * (n + 0.5) / h;
|
|
169
169
|
let v = 1;
|
|
170
|
-
|
|
170
|
+
l > 0 && (v = Math.sin((y * l - u) * Math.PI * 2) > -0.1 ? 1 : 0);
|
|
171
171
|
for (let x = 0; x < 2; x++) {
|
|
172
|
-
const B = a + (
|
|
172
|
+
const B = a + (c - a) * (n + x) / h;
|
|
173
173
|
Ut(e, s, o, B, this.p);
|
|
174
|
-
const
|
|
175
|
-
m.setXYZ(
|
|
176
|
-
let
|
|
177
|
-
i >= 0 && (
|
|
174
|
+
const P = (this.n * h + n) * 2 + x;
|
|
175
|
+
m.setXYZ(P, this.p.x, this.p.y, this.p.z);
|
|
176
|
+
let z = f * v;
|
|
177
|
+
i >= 0 && (z += p * Math.exp(-(((B - i) / 0.05) ** 2))), w.setXYZ(P, d.r * z, d.g * z, d.b * z);
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
this.n++;
|
|
@@ -194,7 +194,7 @@ class fe {
|
|
|
194
194
|
reset() {
|
|
195
195
|
this.started = !1, this.acc = 0;
|
|
196
196
|
}
|
|
197
|
-
step(e, s, o, d,
|
|
197
|
+
step(e, s, o, d, f, a, c, l = 8) {
|
|
198
198
|
if (!this.started) {
|
|
199
199
|
this.started = !0, this.x = e.x, this.y = e.y, this.z = e.z;
|
|
200
200
|
return;
|
|
@@ -207,61 +207,65 @@ class fe {
|
|
|
207
207
|
this.acc += h;
|
|
208
208
|
const m = Z();
|
|
209
209
|
let w = 0;
|
|
210
|
-
for (; this.acc >= s && w <
|
|
210
|
+
for (; this.acc >= s && w < l; ) {
|
|
211
211
|
this.acc -= s;
|
|
212
212
|
const n = h > 1e-6 ? 1 - this.acc / h : 1, y = (Math.random() - 0.5) * s * 0.35;
|
|
213
|
-
m.emit(this.x + u * n + y, this.y + i * n - y, this.z + p * n, o * (0.65 + Math.random() * 0.7), d,
|
|
213
|
+
m.emit(this.x + u * n + y, this.y + i * n - y, this.z + p * n, o * (0.65 + Math.random() * 0.7), d, f * (0.75 + Math.random() * 0.4), a, c, 0), w++;
|
|
214
214
|
}
|
|
215
215
|
this.acc > s && (this.acc = s), this.x = e.x, this.y = e.y, this.z = e.z;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
const Ht = /* @__PURE__ */ new Map();
|
|
219
219
|
function te(t, e, s, o, d = performance.now()) {
|
|
220
|
-
let
|
|
221
|
-
|
|
220
|
+
let f = Ht.get(t);
|
|
221
|
+
f || Ht.set(t, f = { x: 0, y: 0, z: 0, at: -1e9 }), f.x = e, f.y = s, f.z = o, f.at = d;
|
|
222
222
|
}
|
|
223
|
-
const
|
|
224
|
-
function
|
|
223
|
+
const ho = (t) => t < 0 ? 0 : t < 50 ? t / 50 : Math.exp(-(t - 50) / 260), xt = /* @__PURE__ */ new Map(), R = { rx: 9, ry: 6, hz: 5 }, $t = /* @__PURE__ */ new Map();
|
|
224
|
+
function po(t, e) {
|
|
225
225
|
if (e < 2) return 0;
|
|
226
226
|
const s = Math.min(2 * (R.hz - 2.6), (e - 1) * 5);
|
|
227
227
|
return ((t % 2 === 0 ? t / 2 : e - 1 - (t - 1) / 2) / (e - 1) - 0.5) * s;
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
var
|
|
231
|
-
const e = ((
|
|
232
|
-
return
|
|
229
|
+
function xe(t) {
|
|
230
|
+
var d;
|
|
231
|
+
const e = ((d = $t.get(t.run.id)) == null ? void 0 : d.z) ?? 0, s = ot(t.id, 77) - 0.5, o = Math.max(1.2, R.hz * 0.14);
|
|
232
|
+
return e + s * 2 * o * Math.max(0.85, Math.min(1.2, Rt.spread));
|
|
233
233
|
}
|
|
234
|
-
|
|
234
|
+
function Be(t) {
|
|
235
|
+
const e = t.depth > 0 && t.tr ? xe(t.tr) + t.ew : xe(t), s = Math.max(0.5, R.hz - 1.1);
|
|
236
|
+
return e < -s ? -s : e > s ? s : e;
|
|
237
|
+
}
|
|
238
|
+
const zt = 7, Wt = 8, ue = 5, ut = 6.2, ht = 3.5, he = 0.08, Te = 0.92, De = 0.52, mo = 0.09, Mo = 1.15, Et = Wt * ue, at = zt * Et, de = ut / Wt, pe = ht / ue, Ve = (zt - 1) / 2 * Te + ht / 2 * Math.sin(De), go = Math.hypot(ut / 2 + 0.6, Ve + 0.4), yo = 32, Xt = 3, Ge = new r.BoxGeometry(ut, he, ht), wo = new r.EdgesGeometry(Ge), vo = (() => {
|
|
235
239
|
const t = [], e = he / 2 + 4e-3;
|
|
236
240
|
for (let s = 1; s < Wt; s++) {
|
|
237
|
-
const o = -
|
|
238
|
-
t.push(o, e, -
|
|
241
|
+
const o = -ut / 2 + s * de;
|
|
242
|
+
t.push(o, e, -ht / 2, o, e, ht / 2);
|
|
239
243
|
}
|
|
240
244
|
for (let s = 1; s < ue; s++) {
|
|
241
|
-
const o = -
|
|
242
|
-
t.push(-
|
|
245
|
+
const o = -ht / 2 + s * pe;
|
|
246
|
+
t.push(-ut / 2, e, o, ut / 2, e, o);
|
|
243
247
|
}
|
|
244
|
-
return t.push(-
|
|
245
|
-
})(),
|
|
246
|
-
e.set(0, (t - (zt - 1) / 2) *
|
|
247
|
-
},
|
|
248
|
+
return t.push(-ut / 2 + 0.15, e, ht / 2 - 0.14, -ut / 2 + 1.4, e, ht / 2 - 0.14), new r.BufferGeometry().setAttribute("position", new r.Float32BufferAttribute(t, 3));
|
|
249
|
+
})(), bo = new r.PlaneGeometry(1, 1).rotateX(-Math.PI / 2), xo = (t, e, s) => {
|
|
250
|
+
e.set(0, (t - (zt - 1) / 2) * Te, 0), Se.set(De, (t - (zt - 1) / 2) * mo, 0, "YXZ"), s.setFromEuler(Se);
|
|
251
|
+
}, ze = (t, e) => {
|
|
248
252
|
const s = t % Et;
|
|
249
|
-
return e.set(-
|
|
250
|
-
},
|
|
251
|
-
function
|
|
253
|
+
return e.set(-ut / 2 + (s % Wt + 0.5) * de, he / 2 + 0.01, -ht / 2 + (Math.floor(s / Wt) + 0.5) * pe);
|
|
254
|
+
}, Se = new r.Euler();
|
|
255
|
+
function zo({ galaxy: t }) {
|
|
252
256
|
const e = t.nodes.length, s = D(() => {
|
|
253
257
|
const y = new Int32Array(e), v = new Float32Array(at), x = Array.from({ length: at }, () => new r.Color(0, 0, 0)), B = new r.Color();
|
|
254
|
-
t.nodes.forEach((
|
|
255
|
-
const
|
|
256
|
-
y[
|
|
258
|
+
t.nodes.forEach((P, z) => {
|
|
259
|
+
const C = Math.floor(ot(P.id, 9) * at) % at;
|
|
260
|
+
y[z] = C, v[C]++, x[C].add(B.set(qe[P.kind] ?? "#94a3b8"));
|
|
257
261
|
});
|
|
258
|
-
for (let
|
|
262
|
+
for (let P = 0; P < at; P++) v[P] && x[P].multiplyScalar(1 / v[P]).lerp($, 0.35);
|
|
259
263
|
return { cellOf: y, occ: v, base: x, dep: new Float32Array(at), white: new Float32Array(at), depC: Array.from({ length: at }, () => new r.Color()) };
|
|
260
264
|
}, [t, e]), o = D(
|
|
261
265
|
() => Array.from({ length: zt }, () => ({
|
|
262
|
-
fill:
|
|
263
|
-
edge:
|
|
264
|
-
grid:
|
|
266
|
+
fill: ro("#000"),
|
|
267
|
+
edge: nt("#000"),
|
|
268
|
+
grid: nt("#000"),
|
|
265
269
|
m: new r.Matrix4(),
|
|
266
270
|
pos: new r.Vector3(),
|
|
267
271
|
q: new r.Quaternion(),
|
|
@@ -272,96 +276,96 @@ function xo({ galaxy: t }) {
|
|
|
272
276
|
want: new r.Color()
|
|
273
277
|
})),
|
|
274
278
|
[]
|
|
275
|
-
), d = I([]),
|
|
276
|
-
const y = new r.InstancedMesh(
|
|
279
|
+
), d = I([]), f = D(() => new r.MeshBasicMaterial({ blending: r.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1, side: r.DoubleSide }), []), a = D(() => {
|
|
280
|
+
const y = new r.InstancedMesh(bo, f, at);
|
|
277
281
|
return y.instanceColor = new r.InstancedBufferAttribute(new Float32Array(at * 3), 3), y.frustumCulled = !1, y.renderOrder = 3, y;
|
|
278
|
-
}, [
|
|
282
|
+
}, [f]), c = D(() => new Yt(yo, 24), []), l = D(() => /* @__PURE__ */ new Map(), [t]), u = D(() => /* @__PURE__ */ new Set(), []), i = I([]), p = I([]), h = I(Array(Xt).fill("")), m = D(
|
|
279
283
|
() => ({ v: new r.Vector3(), w: new r.Vector3(), ctrl: new r.Vector3(), h: new r.Vector3(), c: new r.Color(), cm: new r.Matrix4(), sm: new r.Matrix4(), off: new r.Vector3(), one: new r.Vector3(1, 1, 1) }),
|
|
280
284
|
[]
|
|
281
285
|
), w = (y) => {
|
|
282
|
-
let v =
|
|
283
|
-
return v === void 0 &&
|
|
284
|
-
}, n = (y, v) =>
|
|
285
|
-
return
|
|
286
|
+
let v = l.get(y);
|
|
287
|
+
return v === void 0 && l.set(y, v = Ue(t, y)), s.cellOf[v] ?? 0;
|
|
288
|
+
}, n = (y, v) => ze(y, v).applyMatrix4(o[Math.floor(y / Et)].m);
|
|
289
|
+
return dt(({ clock: y }, v) => {
|
|
286
290
|
var H;
|
|
287
|
-
const x = performance.now(), B =
|
|
288
|
-
|
|
291
|
+
const x = performance.now(), B = mt(), P = Math.min(0.05, v), z = st ? 0 : y.elapsedTime, { occ: C, base: S, dep: E, white: W, depC: T } = s, { v: V, w: G, ctrl: K, h: Y, c: F, cm: ft, sm: Mt, off: gt, one: Ct } = m;
|
|
292
|
+
E.fill(0), W.fill(0);
|
|
289
293
|
for (const g of o)
|
|
290
294
|
g.act = 0, g.read = 0, g.want.setRGB(0, 0, 0);
|
|
291
295
|
for (const g of L.flares) {
|
|
292
|
-
const M = w(g.node),
|
|
293
|
-
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
+
const M = w(g.node), A = (x - g.start) / 1e3, U = L.instances.get(g.instance), O = U ? It[U.type] : $, j = g.op === "write", X = A < 0.25 ? A / 0.25 : Math.exp(-(A - 0.25) * 1.1);
|
|
297
|
+
X > E[M] && (E[M] = X, T[M].copy(j ? N : O), W[M] = j ? 1 : 0);
|
|
298
|
+
const tt = o[Math.floor(M / Et)];
|
|
299
|
+
X > tt.act && (tt.act = X, tt.want.copy(j ? N : O)), !j && A < 2.2 && (tt.read = Math.max(tt.read, A < 0.2 ? A / 0.2 : rt((2.2 - A) / 0.8)));
|
|
296
300
|
}
|
|
297
301
|
for (let g = 0; g < zt; g++) {
|
|
298
302
|
const M = o[g];
|
|
299
|
-
M.slide += (M.read - M.slide) * Math.min(1,
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
const
|
|
303
|
-
M.edge.color.copy(
|
|
303
|
+
M.slide += (M.read - M.slide) * Math.min(1, P * (M.read > M.slide ? 7 : 2.5)), xo(g, M.pos, M.q), gt.set(0, 0.06, Mo).applyQuaternion(M.q).multiplyScalar(So(M.slide)), M.pos.add(gt), M.m.compose(M.pos, M.q, Ct);
|
|
304
|
+
const A = d.current[g];
|
|
305
|
+
A && (A.position.copy(M.pos), A.quaternion.copy(M.q)), M.tint.lerp(M.act > 0.02 ? M.want : $, Math.min(1, P * 6));
|
|
306
|
+
const U = st ? 1 : 0.9 + 0.1 * Math.sin(z * 0.7 + g * 1.3), O = M.act;
|
|
307
|
+
M.edge.color.copy($).lerp(M.tint, O).multiplyScalar((0.2 + 0.06 * g / zt) * U + O * 0.75 + M.slide * 0.2), M.grid.color.copy($).lerp(M.tint, O).multiplyScalar(0.06 + O * 0.18), M.fill.color.copy(F.set("#4fd1c5")).lerp(M.tint, O * 0.8).multiplyScalar(0.03 + O * 0.06 + M.slide * 0.03);
|
|
304
308
|
}
|
|
305
|
-
|
|
309
|
+
c.begin();
|
|
306
310
|
for (const g of u) {
|
|
307
311
|
let M = !1;
|
|
308
|
-
for (const
|
|
312
|
+
for (const A of L.flares) A.id === g && (M = !0);
|
|
309
313
|
M || u.delete(g);
|
|
310
314
|
}
|
|
311
315
|
for (const g of L.flares) {
|
|
312
|
-
const M = w(g.node),
|
|
313
|
-
n(M, V),
|
|
314
|
-
const
|
|
315
|
-
if (
|
|
316
|
-
qt(
|
|
317
|
-
const
|
|
318
|
-
|
|
316
|
+
const M = w(g.node), A = (x - g.start) / 1e3, U = L.instances.get(g.instance), O = U ? It[U.type] : $, j = g.op === "write";
|
|
317
|
+
n(M, V), We(V, G), j && !u.has(g.id) && A > 0.55 && (u.add(g.id), re(G, 12, 0.45, 0.1, N, 1, 2.2, B), Z().emit(G.x, G.y, G.z, 1.2, N, 0.9, 0.5, B, 2));
|
|
318
|
+
const X = St(g.instance);
|
|
319
|
+
if (X && A < 1.9) {
|
|
320
|
+
qt(X, G, 0.1, K);
|
|
321
|
+
const tt = Math.min(1, A / 0.2) * Math.pow(1 - A / 1.9, 1.5), pt = j ? Math.min(1, A * 1.6) : 1 - Math.min(1, A * 1.6);
|
|
322
|
+
F.copy(j ? N : O).lerp(N, 0.2), c.add(X, K, G, F, (j ? 0.32 : 0.24) * tt, 0.03, 0.99, 0, 0, pt, 1.5 * tt), pt > 0.02 && pt < 0.98 && (Ut(X, K, G, pt, Y), Z().emit(Y.x, Y.y, Y.z, 0.45, F, 1.3 * tt, 0.12, B, 1));
|
|
319
323
|
}
|
|
320
324
|
}
|
|
321
|
-
|
|
325
|
+
c.end();
|
|
322
326
|
const yt = a.instanceColor;
|
|
323
327
|
for (let g = 0; g < at; g++) {
|
|
324
|
-
const M =
|
|
325
|
-
|
|
328
|
+
const M = E[g], A = C[g] > 0, U = st ? 1 : 0.85 + 0.15 * Math.sin(z * 0.8 + g * 1.7), O = A || M > 0.01 ? 0.36 + 0.12 * Math.min(1, C[g] / 3) + 0.4 * M : 1e-4;
|
|
329
|
+
ze(g, V), Mt.makeScale(O * de, 1, O * pe).setPosition(V), ft.multiplyMatrices(o[Math.floor(g / Et)].m, Mt), a.setMatrixAt(g, ft), F.copy(S[g]).multiplyScalar(A ? (0.3 + 0.15 * Math.min(1, C[g] / 3)) * U : 0), M > 0.01 && (F.r += T[g].r * M * 1.5 + M * 0.25 * (1 + W[g]), F.g += T[g].g * M * 1.5 + M * 0.25 * (1 + W[g]), F.b += T[g].b * M * 1.5 + M * 0.25 * (1 + W[g])), yt.setXYZ(g, F.r, F.g, F.b);
|
|
326
330
|
}
|
|
327
331
|
a.instanceMatrix.needsUpdate = !0, yt.needsUpdate = !0;
|
|
328
|
-
let
|
|
329
|
-
for (let g = L.flares.length - 1; g >= 0 &&
|
|
332
|
+
let J = 0;
|
|
333
|
+
for (let g = L.flares.length - 1; g >= 0 && J < Xt; g--) {
|
|
330
334
|
const M = L.flares[g];
|
|
331
335
|
if (x - M.start > 2200) break;
|
|
332
336
|
if (M.area) continue;
|
|
333
|
-
let
|
|
337
|
+
let A = !1;
|
|
334
338
|
n(w(M.node), V);
|
|
335
|
-
for (let j = 0; j <
|
|
336
|
-
const
|
|
337
|
-
(h.current[j] === M.node ||
|
|
339
|
+
for (let j = 0; j < J; j++) {
|
|
340
|
+
const X = p.current[j];
|
|
341
|
+
(h.current[j] === M.node || X && Math.abs(X.position.y - V.y) < 0.55 && Math.abs(X.position.x - V.x) < 3.2) && (A = !0);
|
|
338
342
|
}
|
|
339
|
-
if (
|
|
340
|
-
const
|
|
341
|
-
|
|
343
|
+
if (A) continue;
|
|
344
|
+
const U = i.current[J], O = p.current[J];
|
|
345
|
+
U && O && (O.position.copy(V), h.current[J] !== M.node && (U.setText(`${M.op === "write" ? "wrote" : "read"} · ${M.node}`), U.setColor(M.op === "write" ? "#ffffff" : "#8fe9f5")), U.setOpacity(rt(1.4 - (x - M.start) / 1600))), h.current[J] = M.node, J++;
|
|
342
346
|
}
|
|
343
|
-
for (let g =
|
|
347
|
+
for (let g = J; g < Xt; g++)
|
|
344
348
|
(H = i.current[g]) == null || H.setOpacity(0), h.current[g] = "";
|
|
345
349
|
}), /* @__PURE__ */ lt(Kt, { children: [
|
|
346
350
|
o.map((y, v) => /* @__PURE__ */ lt("group", { ref: (x) => void (d.current[v] = x), children: [
|
|
347
|
-
/* @__PURE__ */ b("mesh", { geometry:
|
|
348
|
-
/* @__PURE__ */ b("lineSegments", { geometry:
|
|
349
|
-
/* @__PURE__ */ b("lineSegments", { geometry:
|
|
351
|
+
/* @__PURE__ */ b("mesh", { geometry: Ge, material: y.fill }),
|
|
352
|
+
/* @__PURE__ */ b("lineSegments", { geometry: wo, material: y.edge }),
|
|
353
|
+
/* @__PURE__ */ b("lineSegments", { geometry: vo, material: y.grid })
|
|
350
354
|
] }, v)),
|
|
351
355
|
/* @__PURE__ */ b("primitive", { object: a }),
|
|
352
|
-
/* @__PURE__ */ b(
|
|
353
|
-
Array.from({ length:
|
|
354
|
-
/* @__PURE__ */ b(
|
|
356
|
+
/* @__PURE__ */ b(Ke, { children: /* @__PURE__ */ b("primitive", { object: c.obj }) }),
|
|
357
|
+
Array.from({ length: Xt }, (y, v) => /* @__PURE__ */ b("group", { ref: (x) => void (p.current[v] = x), children: /* @__PURE__ */ b(Bt, { ref: (x) => void (i.current[v] = x), text: "", offset: [0, 0.45], size: 0.24, opacity: 0, fadeMs: 250, pxRange: [8, 12] }) }, v)),
|
|
358
|
+
/* @__PURE__ */ b(Co, {})
|
|
355
359
|
] });
|
|
356
360
|
}
|
|
357
|
-
const
|
|
358
|
-
function
|
|
359
|
-
const t =
|
|
361
|
+
const So = (t) => 1 - Math.pow(1 - rt(t), 2);
|
|
362
|
+
function Co() {
|
|
363
|
+
const t = Re(), e = t.graphLabel === "knowledge graph" ? "FalkorDB" : t.graphLabel;
|
|
360
364
|
return /* @__PURE__ */ b(
|
|
361
365
|
Bt,
|
|
362
366
|
{
|
|
363
367
|
declutter: "resource",
|
|
364
|
-
position: [0,
|
|
368
|
+
position: [0, Ve + 0.75, 0],
|
|
365
369
|
text: `${e} · event archive`,
|
|
366
370
|
color: "#5eead4",
|
|
367
371
|
letterSpacing: 0.04,
|
|
@@ -371,10 +375,10 @@ function So() {
|
|
|
371
375
|
}
|
|
372
376
|
);
|
|
373
377
|
}
|
|
374
|
-
const
|
|
378
|
+
const Ao = (
|
|
375
379
|
/* glsl */
|
|
376
380
|
"varying vec2 vW; void main(){ vW = position.xy; gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }"
|
|
377
|
-
),
|
|
381
|
+
), Po = (
|
|
378
382
|
/* glsl */
|
|
379
383
|
`
|
|
380
384
|
uniform float uTime; varying vec2 vW;
|
|
@@ -393,7 +397,7 @@ void main(){
|
|
|
393
397
|
col += vec3(0.006, 0.011, 0.013) * g * 2.0;
|
|
394
398
|
gl_FragColor = vec4(col, 1.0);
|
|
395
399
|
}`
|
|
396
|
-
),
|
|
400
|
+
), _o = (
|
|
397
401
|
/* glsl */
|
|
398
402
|
`
|
|
399
403
|
varying vec3 vN; varying vec3 vV; varying float vZ;
|
|
@@ -402,7 +406,7 @@ void main(){
|
|
|
402
406
|
vN = normalize(normalMatrix * normal); vV = normalize(-mv.xyz); vZ = position.y;
|
|
403
407
|
gl_Position = projectionMatrix * mv;
|
|
404
408
|
}`
|
|
405
|
-
),
|
|
409
|
+
), Ro = (
|
|
406
410
|
/* glsl */
|
|
407
411
|
`
|
|
408
412
|
uniform vec3 uC; varying vec3 vN; varying vec3 vV; varying float vZ;
|
|
@@ -414,7 +418,7 @@ void main(){
|
|
|
414
418
|
gl_FragColor = vec4(uC * k, 1.0);
|
|
415
419
|
}`
|
|
416
420
|
), Ft = Math.PI * 2;
|
|
417
|
-
function
|
|
421
|
+
function Io() {
|
|
418
422
|
const t = (u, i, p, h = 128) => {
|
|
419
423
|
for (let m = 0; m < h; m++) {
|
|
420
424
|
const w = m / h * Ft, n = (m + 1) / h * Ft;
|
|
@@ -435,47 +439,47 @@ function Ro() {
|
|
|
435
439
|
for (const u of [-0.34, 0.34]) t(s, 1.045, u, 96);
|
|
436
440
|
const d = [];
|
|
437
441
|
for (const u of [-0.72, 0.72]) for (let i = 0; i < 4; i++) t(d, 1.1 + i % 2 * 0.025, u + (i - 1.5) * 0.035, 128);
|
|
438
|
-
const
|
|
442
|
+
const f = [];
|
|
439
443
|
let a = 9001;
|
|
440
|
-
const
|
|
444
|
+
const c = () => (a = a * 16807 % 2147483647) / 2147483647;
|
|
441
445
|
for (let u = 0; u < 14; u++) {
|
|
442
|
-
const i = -0.85 +
|
|
446
|
+
const i = -0.85 + c() * 1.7, p = -0.92 + c() * 1.84, h = (6 + c() * 14) * (c() < 0.5 ? 1 : -1), m = 0.012;
|
|
443
447
|
for (let w = -1.1; w < 1.1; w += m) {
|
|
444
|
-
if (
|
|
448
|
+
if (c() < 0.42) continue;
|
|
445
449
|
const n = w + m * 0.45, y = i + w * w / (2 * h), v = i + n * n / (2 * h);
|
|
446
|
-
w * w + y * y > 0.97 || n * n + v * v > 0.97 ||
|
|
450
|
+
w * w + y * y > 0.97 || n * n + v * v > 0.97 || f.push(w, y, p, n, v, p);
|
|
447
451
|
}
|
|
448
452
|
}
|
|
449
|
-
const
|
|
450
|
-
return { steel:
|
|
453
|
+
const l = (u) => new r.BufferGeometry().setAttribute("position", new r.Float32BufferAttribute(u, 3));
|
|
454
|
+
return { steel: l(e), staves: l(s), coils: l(d), beams: l(f) };
|
|
451
455
|
}
|
|
452
|
-
function
|
|
456
|
+
function Bo(t, e) {
|
|
453
457
|
const s = [];
|
|
454
|
-
for (let
|
|
458
|
+
for (let f = -Math.floor(t / 3) * 3; f <= t; f += 3)
|
|
455
459
|
for (let a = -Math.floor(e / 3) * 3; a <= e; a += 3)
|
|
456
|
-
if (!((
|
|
457
|
-
for (const
|
|
460
|
+
if (!((f / t) ** 2 + (a / e) ** 2 > 0.86))
|
|
461
|
+
for (const c of [-1, 1]) s.push(f - 0.26, a, c, f + 0.26, a, c, f, a - 0.26, c, f, a + 0.26, c);
|
|
458
462
|
return new r.BufferGeometry().setAttribute("position", new r.Float32BufferAttribute(s, 3));
|
|
459
463
|
}
|
|
460
|
-
const
|
|
464
|
+
const To = (() => {
|
|
461
465
|
const t = [];
|
|
462
466
|
for (let e = 0; e < 24; e++) e % 2 === 0 && t.push(0, 0, -1 + e / 24 * 2, 0, 0, -1 + (e + 1) / 24 * 2);
|
|
463
467
|
return t.push(0, 0, 1, 0.09, 0, 0.84, 0, 0, 1, -0.09, 0, 0.84, 0, 0, 1, 0, 0.09, 0.84, 0, 0, 1, 0, -0.09, 0.84), new r.BufferGeometry().setAttribute("position", new r.Float32BufferAttribute(t, 3));
|
|
464
468
|
})();
|
|
465
|
-
function
|
|
466
|
-
const t = D(
|
|
469
|
+
function Do() {
|
|
470
|
+
const t = D(Io, []), e = D(
|
|
467
471
|
() => ({
|
|
468
|
-
back: new r.ShaderMaterial({ uniforms: { uTime: { value: 0 } }, vertexShader:
|
|
469
|
-
steel:
|
|
470
|
-
staves:
|
|
471
|
-
coils:
|
|
472
|
-
beams:
|
|
473
|
-
fid:
|
|
474
|
-
arrow:
|
|
472
|
+
back: new r.ShaderMaterial({ uniforms: { uTime: { value: 0 } }, vertexShader: Ao, fragmentShader: Po, depthWrite: !1 }),
|
|
473
|
+
steel: nt(new r.Color("#9fd8e0").multiplyScalar(0.15)),
|
|
474
|
+
staves: nt(new r.Color("#7cc6d0").multiplyScalar(0.07)),
|
|
475
|
+
coils: nt(new r.Color("#d79a52").multiplyScalar(0.12)),
|
|
476
|
+
beams: nt(new r.Color("#8fdcea").multiplyScalar(0.07)),
|
|
477
|
+
fid: nt(new r.Color("#4fd1c5").multiplyScalar(0.22)),
|
|
478
|
+
arrow: nt(new r.Color("#d79a52").multiplyScalar(0.45)),
|
|
475
479
|
glass: new r.ShaderMaterial({
|
|
476
480
|
uniforms: { uC: { value: new r.Color("#6fd3e0").multiplyScalar(0.075) } },
|
|
477
|
-
vertexShader:
|
|
478
|
-
fragmentShader:
|
|
481
|
+
vertexShader: _o,
|
|
482
|
+
fragmentShader: Ro,
|
|
479
483
|
transparent: !0,
|
|
480
484
|
depthWrite: !1,
|
|
481
485
|
blending: r.AdditiveBlending,
|
|
@@ -483,29 +487,32 @@ function To() {
|
|
|
483
487
|
})
|
|
484
488
|
}),
|
|
485
489
|
[]
|
|
486
|
-
), s = D(() => new r.CylinderGeometry(1.045, 1.045, 2, 96, 1, !0).rotateX(Math.PI / 2), []), o = I(null), d = I(null),
|
|
490
|
+
), s = D(() => new r.CylinderGeometry(1.045, 1.045, 2, 96, 1, !0).rotateX(Math.PI / 2), []), o = I(null), d = I(null), f = I("");
|
|
487
491
|
ce(() => () => {
|
|
488
492
|
var m;
|
|
489
493
|
return (m = o.current) == null ? void 0 : m.dispose();
|
|
490
494
|
}, []);
|
|
491
|
-
const a = I(0),
|
|
492
|
-
return
|
|
493
|
-
var
|
|
494
|
-
e.back.uniforms.uTime.value =
|
|
495
|
-
const y =
|
|
496
|
-
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
495
|
+
const a = I(0), c = I(null), l = I(null), u = I(null), i = I(null), p = I(null), h = I(!1);
|
|
496
|
+
return dt(({ clock: m, camera: w }, n) => {
|
|
497
|
+
var G, K, Y, F;
|
|
498
|
+
e.back.uniforms.uTime.value = st ? 0 : m.elapsedTime, c.current && (w.getWorldDirection(Ae), c.current.position.copy(Ae).multiplyScalar(14), c.current.quaternion.copy(w.quaternion));
|
|
499
|
+
const y = Q.core, v = y.hw + 0.9, x = y.hh + 0.9;
|
|
500
|
+
let B = 0;
|
|
501
|
+
for (const ft of Q.agents.values()) B = Math.max(B, Math.abs(ft.w));
|
|
502
|
+
const P = Math.max(r.MathUtils.clamp(0.72 * Math.min(v, x), 5, 13), B + 2), z = h.current ? Math.min(1, n * 2.5) : 1;
|
|
503
|
+
h.current = !0, R.rx += (v - R.rx) * z, R.ry += (x - R.ry) * z, R.hz += (P - R.hz) * z, (G = l.current) == null || G.scale.set(R.rx, R.ry, R.hz), (K = u.current) == null || K.scale.set(1, 1, R.hz);
|
|
504
|
+
const C = `${Math.round(R.rx * 2)}:${Math.round(R.ry * 2)}`;
|
|
505
|
+
C !== f.current && d.current && (f.current = C, (Y = o.current) == null || Y.dispose(), o.current = Bo(R.rx, R.ry), d.current.geometry = o.current), i.current && (i.current.position.set(0, R.ry * 1.13 + 0.25, 0), i.current.scale.set(1, 1, R.hz * 0.55)), (F = p.current) == null || F.position.set(0, R.ry * 1.13 + 0.62, R.hz * 0.55);
|
|
506
|
+
const S = mt();
|
|
507
|
+
if (st || S < a.current) return;
|
|
508
|
+
a.current = S + 1.4 + Math.random() * 2.2;
|
|
509
|
+
const E = Math.random() * Ft, W = Math.sqrt(Math.random()) * 0.85;
|
|
510
|
+
Ce.set(Math.cos(E) * W * R.rx, Math.sin(E) * W * R.ry, (Math.random() - 0.5) * 1.7 * R.hz);
|
|
511
|
+
const T = Math.random() < 0.3, V = Math.random() < 0.5 ? 1 : -1;
|
|
512
|
+
Ie(Ce, Math.random() * Ft, T ? 0.9 + Math.random() * 0.8 : 0.3 + Math.random() * 0.4, T ? 2.4 : 1.6, T ? 70 : 30, 0.075, $, 0.3, 6, S, V, V * (T ? 1.4 : 0.6));
|
|
506
513
|
}), /* @__PURE__ */ lt(Kt, { children: [
|
|
507
|
-
/* @__PURE__ */ b("mesh", { ref:
|
|
508
|
-
/* @__PURE__ */ lt("group", { ref:
|
|
514
|
+
/* @__PURE__ */ b("mesh", { ref: c, material: e.back, position: [0, 0, -14], renderOrder: -10, frustumCulled: !1, children: /* @__PURE__ */ b("planeGeometry", { args: [700, 500] }) }),
|
|
515
|
+
/* @__PURE__ */ lt("group", { ref: l, children: [
|
|
509
516
|
/* @__PURE__ */ b("mesh", { geometry: s, material: e.glass, renderOrder: -5, frustumCulled: !1 }),
|
|
510
517
|
/* @__PURE__ */ b("lineSegments", { geometry: t.steel, material: e.steel, frustumCulled: !1 }),
|
|
511
518
|
/* @__PURE__ */ b("lineSegments", { geometry: t.staves, material: e.staves, frustumCulled: !1 }),
|
|
@@ -513,32 +520,32 @@ function To() {
|
|
|
513
520
|
/* @__PURE__ */ b("lineSegments", { geometry: t.beams, material: e.beams, frustumCulled: !1 })
|
|
514
521
|
] }),
|
|
515
522
|
/* @__PURE__ */ b("group", { ref: u, children: /* @__PURE__ */ b("lineSegments", { ref: d, material: e.fid, frustumCulled: !1 }) }),
|
|
516
|
-
/* @__PURE__ */ b("group", { ref: i, children: /* @__PURE__ */ b("lineSegments", { geometry:
|
|
523
|
+
/* @__PURE__ */ b("group", { ref: i, children: /* @__PURE__ */ b("lineSegments", { geometry: To, material: e.arrow, frustumCulled: !1 }) }),
|
|
517
524
|
/* @__PURE__ */ b("group", { ref: p, children: /* @__PURE__ */ b(Bt, { text: "B field", color: "#e0a868", size: 0.26, plate: "none", opacity: 0.75, pxRange: [9, 12] }) })
|
|
518
525
|
] });
|
|
519
526
|
}
|
|
520
|
-
const
|
|
521
|
-
function
|
|
522
|
-
const { size: t, gl: e, camera: s } =
|
|
523
|
-
return
|
|
524
|
-
o.flush(), o.mat.uniforms.uTime.value =
|
|
527
|
+
const Ce = new r.Vector3(), Ae = new r.Vector3();
|
|
528
|
+
function Vo() {
|
|
529
|
+
const { size: t, gl: e, camera: s } = je(), o = D(() => Z(), []);
|
|
530
|
+
return dt(() => {
|
|
531
|
+
o.flush(), o.mat.uniforms.uTime.value = mt(), o.setScale(t.height, e.getPixelRatio(), s.fov);
|
|
525
532
|
}, -1), /* @__PURE__ */ b("primitive", { object: o.obj });
|
|
526
533
|
}
|
|
527
|
-
const Zt = 0.34,
|
|
534
|
+
const Zt = 0.34, et = 2.1, ae = 12;
|
|
528
535
|
(() => {
|
|
529
|
-
const t = [], e = (s, o, d,
|
|
536
|
+
const t = [], e = (s, o, d, f) => t.push(s, o, 0, d, f, 0);
|
|
530
537
|
for (const s of [-0.28, 0.28]) {
|
|
531
538
|
const o = s - Zt / 2, d = s + Zt / 2;
|
|
532
|
-
e(o, -
|
|
533
|
-
for (let
|
|
534
|
-
const a = -
|
|
539
|
+
e(o, -et / 2, d, -et / 2), e(d, -et / 2, d, et / 2), e(d, et / 2, o, et / 2), e(o, et / 2, o, -et / 2);
|
|
540
|
+
for (let f = 1; f < ae; f++) {
|
|
541
|
+
const a = -et / 2 + f / ae * et;
|
|
535
542
|
e(o, a, d, a);
|
|
536
543
|
}
|
|
537
544
|
}
|
|
538
545
|
return new r.BufferGeometry().setAttribute("position", new r.Float32BufferAttribute(t, 3));
|
|
539
546
|
})();
|
|
540
|
-
new r.PlaneGeometry(Zt,
|
|
541
|
-
new r.PlaneGeometry(Zt * 0.92,
|
|
547
|
+
new r.PlaneGeometry(Zt, et);
|
|
548
|
+
new r.PlaneGeometry(Zt * 0.92, et / ae * 0.8);
|
|
542
549
|
(() => {
|
|
543
550
|
const t = [];
|
|
544
551
|
for (let e = 0; e < 6; e++) {
|
|
@@ -548,99 +555,99 @@ new r.PlaneGeometry(Zt * 0.92, tt / ae * 0.8);
|
|
|
548
555
|
return new r.BufferGeometry().setAttribute("position", new r.Float32BufferAttribute(t, 3));
|
|
549
556
|
})();
|
|
550
557
|
new r.CircleGeometry(1, 6, Math.PI / 6);
|
|
551
|
-
const
|
|
552
|
-
function
|
|
553
|
-
const t = D(() => new Yt(
|
|
554
|
-
return
|
|
555
|
-
const o = performance.now(), d =
|
|
558
|
+
const Go = 48, Vt = new r.Vector3(), Gt = new r.Vector3(), wt = new r.Color();
|
|
559
|
+
function ko() {
|
|
560
|
+
const t = D(() => new Yt(Go, 36), []), e = D(() => /* @__PURE__ */ new Map(), []);
|
|
561
|
+
return dt(({ clock: s }) => {
|
|
562
|
+
const o = performance.now(), d = mt(), f = st ? 0 : s.elapsedTime;
|
|
556
563
|
t.begin();
|
|
557
564
|
for (const a of L.mcpPending.values()) {
|
|
558
|
-
const
|
|
559
|
-
if (!
|
|
560
|
-
qt(
|
|
561
|
-
const i =
|
|
562
|
-
wt.set(u.color).lerp(
|
|
563
|
-
const p =
|
|
564
|
-
t.add(
|
|
565
|
+
const c = St(a.instance), l = ve(a.server), u = L.mcpServers.get(a.server);
|
|
566
|
+
if (!c || !l || !u) continue;
|
|
567
|
+
qt(c, l, 0.12, Vt);
|
|
568
|
+
const i = Xe(a, o);
|
|
569
|
+
wt.set(u.color).lerp(Nt, rt(i / 1.2)), i > 1.2 && wt.lerp(_t, rt((i - 1.2) / 1));
|
|
570
|
+
const p = c.distanceTo(l), h = 0.04 + 0.92 * jt(i / 0.45);
|
|
571
|
+
t.add(c, Vt, l, wt, (0.3 + Math.min(0.3, i * 0.12)) * jt(i / 0.3), 0.04, h, Math.max(4, Math.round(p / 0.5)), f * 1.4, i < 0.45 ? h : -1, 1);
|
|
565
572
|
}
|
|
566
573
|
for (const a of e.keys()) {
|
|
567
|
-
let
|
|
568
|
-
for (const
|
|
569
|
-
|
|
574
|
+
let c = !1;
|
|
575
|
+
for (const l of L.mcpCalls) l.id === a && (c = !0);
|
|
576
|
+
c || e.delete(a);
|
|
570
577
|
}
|
|
571
578
|
for (const a of L.mcpCalls) {
|
|
572
579
|
if (a.phase !== "result") continue;
|
|
573
|
-
const
|
|
574
|
-
if (
|
|
575
|
-
const
|
|
576
|
-
if (!
|
|
580
|
+
const c = rt((o - a.start) / a.dur);
|
|
581
|
+
if (c >= 1) continue;
|
|
582
|
+
const l = St(a.instance), u = ve(a.server), i = L.mcpServers.get(a.server);
|
|
583
|
+
if (!l || !u || !i) continue;
|
|
577
584
|
let p = e.get(a.id);
|
|
578
|
-
p || e.set(a.id, p = new fe()), qt(
|
|
579
|
-
const h = ne(
|
|
580
|
-
Ut(
|
|
585
|
+
p || e.set(a.id, p = new fe()), qt(l, u, 0.12, Vt);
|
|
586
|
+
const h = ne(c);
|
|
587
|
+
Ut(l, Vt, u, 1 - h, Gt), wt.set(i.color).lerp(N, 0.45);
|
|
581
588
|
const m = 1 - Math.max(0, (h - 0.85) / 0.15);
|
|
582
|
-
t.add(
|
|
589
|
+
t.add(l, Vt, u, wt, 0.1 * m, 0.04, 0.96, 0, 0, 1 - h, 1.3 * m), p.step(Gt, 0.065, 0.08, wt, 0.95 * m, 2.6, d, 6), Z().emit(Gt.x, Gt.y, Gt.z, 0.5, wt, 1.3 * m, 0.12, d, 1);
|
|
583
590
|
}
|
|
584
591
|
t.end();
|
|
585
592
|
}), /* @__PURE__ */ b("primitive", { object: t.obj });
|
|
586
593
|
}
|
|
587
|
-
const
|
|
594
|
+
const Lo = (() => {
|
|
588
595
|
const t = [];
|
|
589
596
|
for (let e = 0; e < 4; e++) {
|
|
590
597
|
const s = Math.PI / 4 + e * Math.PI / 2;
|
|
591
598
|
t.push(Math.cos(s) * 0.22, Math.sin(s) * 0.22, 0, Math.cos(s) * 0.55, Math.sin(s) * 0.55, 0);
|
|
592
599
|
}
|
|
593
600
|
return new r.BufferGeometry().setAttribute("position", new r.Float32BufferAttribute(t, 3));
|
|
594
|
-
})(),
|
|
595
|
-
function
|
|
596
|
-
const d = Z(),
|
|
597
|
-
d.emit(t.x, t.y, t.z, 1.6 * o, N, 1.4, 0.6,
|
|
598
|
-
const a = 5 + Math.floor(
|
|
599
|
-
for (let
|
|
600
|
-
const
|
|
601
|
+
})(), Oo = new r.Vector3(1, 0.07, 0).normalize(), ee = new r.Vector3(), Eo = new r.Vector3();
|
|
602
|
+
function Fo(t, e, s, o) {
|
|
603
|
+
const d = Z(), f = mt();
|
|
604
|
+
d.emit(t.x, t.y, t.z, 1.6 * o, N, 1.4, 0.6, f, 1), d.emit(t.x, t.y, t.z, 3.2 * o, s, 1, 0.9, f, 2);
|
|
605
|
+
const a = 5 + Math.floor(ot(e, 41) * 3);
|
|
606
|
+
for (let c = 0; c < a; c++) {
|
|
607
|
+
const l = c / a * Math.PI * 2 + ot(e, 50 + c) * 0.9, u = (1.2 + ot(e, 60 + c) * 4) * o, i = (1.1 + ot(e, 70 + c) * 1.8) * o, p = ot(e, 80 + c) < 0.5 ? 1 : -1, h = (ot(e, 90 + c) - 0.5) * 1.6, m = Math.max(6, Math.round(i / (0.075 * o))), w = t.x + Math.cos(l + p * Math.PI * 0.5) * u, n = t.y + Math.sin(l + p * Math.PI * 0.5) * u, y = l - p * Math.PI * 0.5;
|
|
601
608
|
for (let v = 1; v <= m; v++) {
|
|
602
609
|
const x = v / m * i, B = y + p * x / u;
|
|
603
|
-
d.emit(w + Math.cos(B) * u, n + Math.sin(B) * u, t.z + x * h, 0.085 * o * (0.7 + Math.random() * 0.6), s, 0.85, 5,
|
|
610
|
+
d.emit(w + Math.cos(B) * u, n + Math.sin(B) * u, t.z + x * h, 0.085 * o * (0.7 + Math.random() * 0.6), s, 0.85, 5, f + x / (7 * o), 0);
|
|
604
611
|
}
|
|
605
612
|
}
|
|
606
613
|
}
|
|
607
|
-
function
|
|
608
|
-
const e = D(() => new r.Color(t.color).lerp(
|
|
609
|
-
return ce(() => (xt.set(t.id,
|
|
610
|
-
xt.get(t.id) ===
|
|
611
|
-
}), [t.id,
|
|
614
|
+
function jo({ run: t }) {
|
|
615
|
+
const e = D(() => new r.Color(t.color).lerp($, 0.35), [t.color]), s = D(() => se("#000"), []), o = D(() => nt("#000"), []), d = I(null), f = D(() => new Yt(1, 64), []), a = I(null), c = I(null), l = D(() => ({ p: new r.Vector3(), fired: !1, init: !1, dep: { z: 0, tz: 0 } }), []);
|
|
616
|
+
return ce(() => (xt.set(t.id, l.p), $t.set(t.id, l.dep), () => {
|
|
617
|
+
xt.get(t.id) === l.p && xt.delete(t.id), $t.get(t.id) === l.dep && $t.delete(t.id);
|
|
618
|
+
}), [t.id, l]), dt(({ clock: u, camera: i }, p) => {
|
|
612
619
|
var G;
|
|
613
620
|
const h = performance.now(), m = t.run ?? L.runs.get(t.id);
|
|
614
621
|
let w = 0, n = 0, y = 1e9;
|
|
615
|
-
for (const
|
|
616
|
-
|
|
622
|
+
for (const K of Q.agents.values())
|
|
623
|
+
K.run !== t || K.inst.parent || (w += K.eu, n++, K.ev < y && (y = K.ev));
|
|
617
624
|
const v = n ? w / n : t.cu, x = (n ? y : t.cv - t.hv) - 1.55 * Rt.spread;
|
|
618
|
-
Ne(t, v, x,
|
|
625
|
+
Ne(t, v, x, l.p), l.dep.tz = po(t.index, t.count), l.dep.z = l.init ? l.dep.z + (l.dep.tz - l.dep.z) * Math.min(1, Math.min(0.05, p) * 1.2) : l.dep.tz, l.p.z = l.dep.z, l.init = !0;
|
|
619
626
|
const B = m ? (h - m.startedAt) / 1e3 : 99;
|
|
620
|
-
|
|
621
|
-
const
|
|
622
|
-
a.current && (a.current.position.copy(
|
|
623
|
-
const
|
|
624
|
-
ee.copy(
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
const T = Math.abs(t.side.y) * t.hu + Math.abs(t.axis.y) * t.hv, V = Math.max(t.origin.y + T,
|
|
628
|
-
(G =
|
|
627
|
+
l.fired || (l.fired = !0, B < 1.2 && Fo(l.p, t.id, e, Math.max(0.6, Rt.scale)));
|
|
628
|
+
const P = jt(B / 0.8), z = m ? m.status !== "started" : !1, C = m != null && m.endedAt ? rt(1 - (h - m.endedAt - ($e - 2500)) / 2500) : 1, S = st || z ? 1 : 0.85 + 0.15 * Math.sin(u.elapsedTime * 2.2 + t.index);
|
|
629
|
+
a.current && (a.current.position.copy(l.p), a.current.scale.setScalar((0.9 + (z ? 0 : 0.25)) * Math.max(0.7, Rt.scale))), d.current && (d.current.position.copy(l.p), d.current.quaternion.copy(i.quaternion), d.current.scale.setScalar(Math.max(0.7, Rt.scale))), o.color.copy(e).lerp(N, 0.3).multiplyScalar((z ? 0.3 : 0.75) * P * C), s.color.copy(e).lerp(N, 0.4).multiplyScalar((z ? 0.35 : 0.8) * S * P * C), f.begin();
|
|
630
|
+
const E = 7 + Q.core.hw * 0.6;
|
|
631
|
+
ee.copy(l.p).addScaledVector(Oo, -E);
|
|
632
|
+
const W = Eo.copy(ee).add(l.p).multiplyScalar(0.5);
|
|
633
|
+
f.add(ee, W, l.p, e, 0.16 * P * C * (z ? 0.6 : 1), 0, 0.985 * P, Math.round(E / 0.16), 0, 1, 0.35 * C), f.end();
|
|
634
|
+
const T = Math.abs(t.side.y) * t.hu + Math.abs(t.axis.y) * t.hv, V = Math.max(t.origin.y + T, l.p.y + 0.4);
|
|
635
|
+
(G = c.current) == null || G.position.set(t.origin.x, V + 0.75, l.p.z);
|
|
629
636
|
}), /* @__PURE__ */ lt(Kt, { children: [
|
|
630
|
-
/* @__PURE__ */ b("primitive", { object:
|
|
637
|
+
/* @__PURE__ */ b("primitive", { object: f.obj }),
|
|
631
638
|
/* @__PURE__ */ b("sprite", { ref: a, material: s }),
|
|
632
|
-
/* @__PURE__ */ b("lineSegments", { ref: d, geometry:
|
|
633
|
-
/* @__PURE__ */ b("group", { ref:
|
|
639
|
+
/* @__PURE__ */ b("lineSegments", { ref: d, geometry: Lo, material: o }),
|
|
640
|
+
/* @__PURE__ */ b("group", { ref: c, children: t.run && /* @__PURE__ */ b(qo, { run: t.run }) })
|
|
634
641
|
] });
|
|
635
642
|
}
|
|
636
|
-
function
|
|
637
|
-
|
|
643
|
+
function qo({ run: t }) {
|
|
644
|
+
Re();
|
|
638
645
|
const e = t.status !== "started";
|
|
639
646
|
return /* @__PURE__ */ b(
|
|
640
647
|
Bt,
|
|
641
648
|
{
|
|
642
649
|
text: t.topic,
|
|
643
|
-
secondary:
|
|
650
|
+
secondary: He(t, { base: "#8fb3bd", current: "#fde68a", done: "#cfe9ee" }, ["running…", "run complete"]),
|
|
644
651
|
color: t.color,
|
|
645
652
|
textColor: "#e3fbff",
|
|
646
653
|
plate: "none",
|
|
@@ -657,46 +664,46 @@ function jo({ run: t }) {
|
|
|
657
664
|
);
|
|
658
665
|
}
|
|
659
666
|
const oe = 4;
|
|
660
|
-
function
|
|
667
|
+
function Wo() {
|
|
661
668
|
const t = I(/* @__PURE__ */ new Set()), e = I([]), s = I([]), o = I([]), d = I([]);
|
|
662
|
-
return
|
|
663
|
-
const
|
|
669
|
+
return dt(() => {
|
|
670
|
+
const f = performance.now();
|
|
664
671
|
for (const a of L.runs.values()) {
|
|
665
672
|
if (!a.final || t.current.has(a.id)) continue;
|
|
666
673
|
t.current.add(a.id);
|
|
667
|
-
const
|
|
668
|
-
if (!
|
|
669
|
-
let
|
|
670
|
-
for (const
|
|
671
|
-
const u = (
|
|
672
|
-
for (let
|
|
673
|
-
const
|
|
674
|
-
y.emit(
|
|
674
|
+
const c = Q.runs.get(a.id);
|
|
675
|
+
if (!c) continue;
|
|
676
|
+
let l;
|
|
677
|
+
for (const C of L.instances.values()) C.run === a.id && !C.parent && (l = St(C.id) ?? l);
|
|
678
|
+
const u = (l ?? xt.get(a.id) ?? c.origin).clone(), i = Math.abs(u.x) > 0.5 ? u.x < 0 ? -1 : 1 : ot(a.id, 23) < 0.5 ? 1 : -1, p = Math.atan2(-0.35 - ot(a.id, 22) * 0.4, i), h = 40 * (ot(a.id, 24) < 0.5 ? 1 : -1), m = (ot(a.id, 25) - 0.5) * 0.35, w = Q.core.r + 9, n = new r.Color(a.color).lerp(N, 0.6), y = Z(), v = mt(), x = u.x + Math.cos(p + Math.PI * 0.5) * h, B = u.y + Math.sin(p + Math.PI * 0.5) * h, P = p - Math.PI * 0.5, z = Math.round(w / 0.085);
|
|
679
|
+
for (let C = 1; C <= z; C++) {
|
|
680
|
+
const S = C / z * w, E = P + S / h, W = x + Math.cos(E) * h, T = B + Math.sin(E) * h, V = v + S / 11, G = u.z + S * m;
|
|
681
|
+
y.emit(W, T, G, 0.09 * (0.75 + Math.random() * 0.5), n, 0.7, 5.5, V, 0), C % 3 === 0 && y.emit(W, T, G, 0.6, N, 0.9, 0.16, V, 1);
|
|
675
682
|
}
|
|
676
|
-
y.emit(u.x, u.y, u.z, 1.6, N, 1.3, 0.6, v, 1), e.current.push({ run: a.id, at:
|
|
683
|
+
y.emit(u.x, u.y, u.z, 1.6, N, 1.3, 0.6, v, 1), e.current.push({ run: a.id, at: f, from: u, text: a.final }), e.current.length > oe && e.current.shift();
|
|
677
684
|
}
|
|
678
685
|
if (t.current.size > 200)
|
|
679
686
|
for (const a of t.current) L.runs.has(a) || t.current.delete(a);
|
|
680
687
|
for (let a = 0; a < oe; a++) {
|
|
681
|
-
const
|
|
682
|
-
if (!
|
|
683
|
-
const i =
|
|
684
|
-
if (!
|
|
685
|
-
|
|
688
|
+
const c = e.current[a], l = s.current[a], u = o.current[a];
|
|
689
|
+
if (!l || !u) continue;
|
|
690
|
+
const i = c ? (f - c.at) / 1e3 : 99;
|
|
691
|
+
if (!c || i > 5.5) {
|
|
692
|
+
l.setOpacity(0);
|
|
686
693
|
continue;
|
|
687
694
|
}
|
|
688
|
-
u.position.set(
|
|
695
|
+
u.position.set(c.from.x, c.from.y - 2.2, c.from.z), d.current[a] !== c.run + c.at && (d.current[a] = c.run + c.at, l.setText(`final answer - ${c.text.length > 64 ? c.text.slice(0, 62) + "…" : c.text}`)), l.setOpacity(rt(i / 0.3) * rt((5.5 - i) / 1.2));
|
|
689
696
|
}
|
|
690
|
-
}), /* @__PURE__ */ b(Kt, { children: Array.from({ length: oe }, (
|
|
697
|
+
}), /* @__PURE__ */ b(Kt, { children: Array.from({ length: oe }, (f, a) => /* @__PURE__ */ b("group", { ref: (c) => void (o.current[a] = c), children: /* @__PURE__ */ b(Bt, { ref: (c) => void (s.current[a] = c), text: "", color: "#cff8ff", size: 0.26, maxWidth: 11, opacity: 0, pxRange: [8, 12], renderOrder: 24 }) }, a)) });
|
|
691
698
|
}
|
|
692
|
-
const kt = Math.PI * 2, ie = 0.85,
|
|
693
|
-
function
|
|
694
|
-
const o = t.inst, d = I(null),
|
|
699
|
+
const kt = Math.PI * 2, ie = 0.85, Pe = 6.5, Ko = new r.MeshBasicMaterial({ colorWrite: !1, depthWrite: !1, transparent: !0, opacity: 0 }), it = new r.Vector3(), bt = new r.Vector3(), Lt = new r.Vector3();
|
|
700
|
+
function Uo({ agent: t, selected: e, onSelect: s }) {
|
|
701
|
+
const o = t.inst, d = I(null), f = I(null), a = I(null), c = I(null), l = I(null), u = I(null), i = I(null), p = I(null), h = D(() => [...o.id].reduce((x, B) => (x * 31 + B.charCodeAt(0)) % 9973, 7) / 9973, [o.id]), m = no[o.type], w = D(
|
|
695
702
|
() => ({
|
|
696
703
|
halo: se(m),
|
|
697
704
|
core: se("#fff"),
|
|
698
|
-
sel:
|
|
699
|
-
wait:
|
|
705
|
+
sel: nt("#e6fbff"),
|
|
706
|
+
wait: nt(Nt)
|
|
700
707
|
}),
|
|
701
708
|
[m]
|
|
702
709
|
), n = D(
|
|
@@ -731,25 +738,25 @@ function Ko({ agent: t, selected: e, onSelect: s }) {
|
|
|
731
738
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
732
739
|
[]
|
|
733
740
|
);
|
|
734
|
-
ce(() => () => void Ht.delete(o.id), [o.id]),
|
|
741
|
+
ce(() => () => void Ht.delete(o.id), [o.id]), dt(({ camera: x }, B) => {
|
|
735
742
|
var ge, ye;
|
|
736
|
-
const
|
|
743
|
+
const P = performance.now(), z = mt(), C = Math.min(0.05, B), S = t.scale, E = st ? 0.3 : 1, W = !o.exitAt, T = !W || o.doneAt > 0, V = !T && (o.status === "thinking" || o.status === "spawning");
|
|
737
744
|
let G = !1;
|
|
738
745
|
if (!T)
|
|
739
746
|
for (const _ of L.mcpPending.values()) _.instance === o.id && (G = !0);
|
|
740
|
-
const
|
|
741
|
-
if (n.first && (n.first = !1,
|
|
747
|
+
const K = (P - o.bornAt) / 1e3;
|
|
748
|
+
if (n.first && (n.first = !1, K < ie * 0.8 && !t.fresh)) {
|
|
742
749
|
const _ = o.parent ? St(o.parent) : void 0, q = xt.get(o.run), At = _ ?? q;
|
|
743
750
|
if (At) {
|
|
744
751
|
n.fly = !0, n.from.copy(At), it.subVectors(n.from, t.pos);
|
|
745
752
|
const ct = 4.2 * Math.max(0.6, Rt.spread);
|
|
746
753
|
it.length() > ct && n.from.copy(t.pos).addScaledVector(it.normalize(), ct);
|
|
747
754
|
const Tt = Z(), Pt = n.from;
|
|
748
|
-
if (Tt.emit(Pt.x, Pt.y, Pt.z, 0.9 *
|
|
749
|
-
const we =
|
|
755
|
+
if (Tt.emit(Pt.x, Pt.y, Pt.z, 0.9 * S, $, 1.3, 0.45, z, 1), Tt.emit(Pt.x, Pt.y, Pt.z, 1.5 * S, It[o.type], 0.9, 0.6, z, 2), _ && o.parent) {
|
|
756
|
+
const we = Q.agents.get(o.parent);
|
|
750
757
|
it.copy(t.pos).sub(n.from);
|
|
751
|
-
const Qt = it.length() || 1, Jt = we ? we.scale :
|
|
752
|
-
te(o.parent, -it.x / Qt * 0.32 * Jt, -it.y / Qt * 0.32 * Jt, -it.z / Qt * 0.32 * Jt,
|
|
758
|
+
const Qt = it.length() || 1, Jt = we ? we.scale : S;
|
|
759
|
+
te(o.parent, -it.x / Qt * 0.32 * Jt, -it.y / Qt * 0.32 * Jt, -it.z / Qt * 0.32 * Jt, P);
|
|
753
760
|
}
|
|
754
761
|
}
|
|
755
762
|
}
|
|
@@ -758,78 +765,78 @@ function Ko({ agent: t, selected: e, onSelect: s }) {
|
|
|
758
765
|
const _ = Math.min(2.5, Math.max(0.6, o.pulse));
|
|
759
766
|
n.boost = Math.min(1.1, n.boost + 0.25 + _ * 0.22);
|
|
760
767
|
const q = t.live;
|
|
761
|
-
re(q, Math.round(6 + _ * 7), (0.14 + _ * 0.12) *
|
|
768
|
+
re(q, Math.round(6 + _ * 7), (0.14 + _ * 0.12) * S, 0.12 * S, $, 1, 2.8, z), Z().emit(q.x, q.y, q.z, (0.7 + _ * 0.45) * S, $, 0.9, 0.45, z, 1), st || Ie(q, Y + n.q * 0.9, (0.14 + _ * 0.07) * S, 1.7, 22, 0.07 * S, $, 0.85, 3.4, z, -n.q, -n.q * (0.25 + _ * 0.1) * S);
|
|
762
769
|
}
|
|
763
770
|
if (o.toolCalls !== n.tools && (n.tools = o.toolCalls, !T)) {
|
|
764
771
|
const _ = Math.random() < 0.5 ? 1 : -1;
|
|
765
|
-
te(o.id, Math.cos(Y + _ * 1.4) * 0.2 *
|
|
772
|
+
te(o.id, Math.cos(Y + _ * 1.4) * 0.2 * S, Math.sin(Y + _ * 1.4) * 0.2 * S, _ * 0.16 * S, P);
|
|
766
773
|
const q = t.live;
|
|
767
|
-
Z().emit(q.x, q.y, q.z, 0.55 *
|
|
774
|
+
Z().emit(q.x, q.y, q.z, 0.55 * S, N, 1.1, 0.3, z + 0.05, 1);
|
|
768
775
|
}
|
|
769
|
-
const
|
|
770
|
-
for (let _ = 0; _ <
|
|
771
|
-
const q =
|
|
772
|
-
if (q.at <= n.decAt || q.at >
|
|
776
|
+
const F = o.decisions;
|
|
777
|
+
for (let _ = 0; _ < F.length; _++) {
|
|
778
|
+
const q = F[_];
|
|
779
|
+
if (q.at <= n.decAt || q.at > P || (n.decAt = q.at, q.hidden || !Ze(q) || T)) continue;
|
|
773
780
|
const At = Math.random() < 0.5 ? 1 : -1;
|
|
774
|
-
te(o.id, Math.cos(Y + At * 1.9) * 0.42 *
|
|
781
|
+
te(o.id, Math.cos(Y + At * 1.9) * 0.42 * S, Math.sin(Y + At * 1.9) * 0.42 * S, -At * 0.36 * S, P), n.red = 1;
|
|
775
782
|
const ct = t.live, Tt = Z();
|
|
776
|
-
Tt.emit(ct.x, ct.y, ct.z, 1 *
|
|
783
|
+
Tt.emit(ct.x, ct.y, ct.z, 1 * S, _t, 1.4, 0.55, z + 0.05, 1), Tt.emit(ct.x, ct.y, ct.z, 1.9 * S, _t, 1, 0.75, z + 0.05, 2), re(ct, 5, 0.18 * S, 0.11 * S, _t, 1, 2, z + 0.05);
|
|
777
784
|
}
|
|
778
|
-
n.boost *= Math.exp(-
|
|
779
|
-
let
|
|
780
|
-
T ? (
|
|
781
|
-
const
|
|
782
|
-
n.rc += (
|
|
785
|
+
n.boost *= Math.exp(-C / 2.4), n.red *= Math.exp(-C / 0.6);
|
|
786
|
+
let ft, Mt, gt, Ct, yt;
|
|
787
|
+
T ? (ft = 0, Mt = 0, gt = kt * 0.95, Ct = 0, yt = 0.5) : V && !G ? (ft = 0.34, Mt = 0.28, gt = kt * 0.6, Ct = 1.5, yt = 0.5) : (ft = 0.15, Mt = 0.06, gt = kt * 0.22, Ct = 0.32, yt = 0.2);
|
|
788
|
+
const J = Math.min(1, C * (T ? 1.3 : 2.6));
|
|
789
|
+
n.rc += (ft + (T ? 0 : n.boost * 0.4) - n.rc) * J, n.rg += (Mt - n.rg) * J, n.w += (gt - n.w) * Math.min(1, C * 2), n.lz += (Ct + (T ? 0 : n.boost * 0.5) - n.lz) * J, n.th += n.q * n.w * C * E, n.ph += n.q * 0.42 * C * E, n.ps += yt * C * E;
|
|
783
790
|
const H = t.live;
|
|
784
791
|
H.copy(t.pos);
|
|
785
|
-
const g = Math.max(
|
|
792
|
+
const g = Math.max(S, 0.72);
|
|
786
793
|
H.x += (Math.cos(n.ph) * n.rg + Math.cos(n.th) * n.rc) * g, H.y += (Math.sin(n.ph) * n.rg * 0.7 + Math.sin(n.th) * n.rc) * g, H.z += Math.sin(n.ps) * n.lz * g;
|
|
787
794
|
const M = Ht.get(o.id);
|
|
788
795
|
if (M) {
|
|
789
|
-
const _ =
|
|
796
|
+
const _ = ho(P - M.at);
|
|
790
797
|
H.x += M.x * _, H.y += M.y * _, H.z += M.z * _;
|
|
791
798
|
}
|
|
792
|
-
let
|
|
799
|
+
let A = !1;
|
|
793
800
|
if (n.fly) {
|
|
794
|
-
const _ =
|
|
795
|
-
_ >= 1 ? n.fly = !1 : (
|
|
801
|
+
const _ = K / ie;
|
|
802
|
+
_ >= 1 ? n.fly = !1 : (A = !0, it.copy(H), qt(n.from, it, n.q * 0.24, bt), Ut(n.from, bt, it, jt(_ * 0.85 + 0.15 * _ * _), H));
|
|
796
803
|
}
|
|
797
|
-
const
|
|
798
|
-
n.hx = t.pos.x, n.hy = t.pos.y, n.move += (Math.min(1, Math.max(0,
|
|
799
|
-
const O = n.rc + n.rg + (
|
|
804
|
+
const U = Math.hypot(t.pos.x - n.hx, t.pos.y - n.hy) / Math.max(1e-3, C) / Math.max(0.3, S);
|
|
805
|
+
n.hx = t.pos.x, n.hy = t.pos.y, n.move += (Math.min(1, Math.max(0, U - 0.4) * 0.5) - n.move) * Math.min(1, C * 8), n.waitK += ((G ? 1 : 0) - n.waitK) * Math.min(1, C * 4), n.col.copy(It[o.type]).lerp(Nt, n.waitK * 0.75).lerp(_t, n.red * 0.85), o.status === "failed" && n.col.lerp(_t, 0.5);
|
|
806
|
+
const O = n.rc + n.rg + (A ? 1 : 0);
|
|
800
807
|
if (!n.stopped) {
|
|
801
|
-
const _ = (
|
|
802
|
-
n.trail.step(H, 0.065 * g, 0.13 * g, n.col, _,
|
|
808
|
+
const _ = (A ? 1.5 : T ? 0.7 : V ? 1.55 : 0.95) * (A ? 1 : 1 - 0.85 * n.move);
|
|
809
|
+
n.trail.step(H, 0.065 * g, 0.13 * g, n.col, _, A ? Pe + 1 : Pe, z, 10), T && O < 0.015 && (n.stopped = !0);
|
|
803
810
|
}
|
|
804
811
|
!T && n.stopped && (n.stopped = !1, n.trail.reset());
|
|
805
|
-
const j = o.exitAt ? (
|
|
806
|
-
if (d.current && (d.current.position.copy(H), d.current.scale.setScalar(Math.max(1e-4,
|
|
807
|
-
const _ = Math.min(1, Math.sqrt(1.3 / Math.max(0.1,
|
|
808
|
-
a.current.scale.setScalar(((V ? 2 : 1.5) +
|
|
812
|
+
const j = o.exitAt ? (P - o.exitAt) / 1e3 : -1, X = j >= 0 ? rt(j / 1.6) : 0, tt = jt(K / 0.35), pt = Ye(o, P), me = ((T ? 0.45 : V ? 1 : 0.6) + pt * 0.25 + n.boost * 0.4 + (A ? 0.5 : 0)) * (1 - X);
|
|
813
|
+
if (d.current && (d.current.position.copy(H), d.current.scale.setScalar(Math.max(1e-4, S * tt))), c.current && (c.current.scale.setScalar(0.5 + pt * 0.1 + n.boost * 0.12), w.core.color.copy(N).lerp(n.col, 0.2).multiplyScalar(Math.min(2, 1.5 * me))), a.current) {
|
|
814
|
+
const _ = Math.min(1, Math.sqrt(1.3 / Math.max(0.1, S)));
|
|
815
|
+
a.current.scale.setScalar(((V ? 2 : 1.5) + pt * 0.4 + n.boost * 0.6) * _), w.halo.color.copy(m).lerp(n.col, 0.4).multiplyScalar(0.62 * me);
|
|
809
816
|
}
|
|
810
|
-
|
|
817
|
+
f.current && (f.current.position.copy(t.pos), f.current.quaternion.copy(x.quaternion), f.current.scale.setScalar(Math.max(1e-4, g)));
|
|
811
818
|
const Me = 0.34 + 0.28 + 0.3;
|
|
812
|
-
n.selK += ((e ? 1 : 0) - n.selK) * 0.14,
|
|
819
|
+
n.selK += ((e ? 1 : 0) - n.selK) * 0.14, l.current && (l.current.visible = n.selK > 0.02, l.current.scale.setScalar(Me + 0.18 + (1 - n.selK) * 0.3), l.current.rotation.z = st ? 0 : z * 0.15, w.sel.color.setScalar(0.85 * n.selK)), u.current && (u.current.visible = n.waitK > 0.02, u.current.scale.setScalar(0.5 + 0.03 * Math.sin(z * 3)), u.current.rotation.z = st ? 0 : -z * 0.8, w.wait.color.copy(Nt).multiplyScalar(0.9 * n.waitK)), (ge = i.current) == null || ge.position.set(t.pos.x, t.pos.y - (Me + 0.12) * g - 0.3, t.pos.z), (ye = p.current) == null || ye.setOpacity(Qe(o.id) ? tt * (W ? 0.95 : 0.6 * (1 - X)) : 0);
|
|
813
820
|
});
|
|
814
821
|
const y = (x) => {
|
|
815
822
|
x.stopPropagation(), s(o.id);
|
|
816
823
|
}, v = o.id.split(":")[2];
|
|
817
824
|
return /* @__PURE__ */ lt(Kt, { children: [
|
|
818
|
-
/* @__PURE__ */ lt("group", { ref:
|
|
819
|
-
/* @__PURE__ */ b("mesh", { geometry:
|
|
820
|
-
/* @__PURE__ */ b("lineSegments", { ref:
|
|
825
|
+
/* @__PURE__ */ lt("group", { ref: f, scale: 1e-4, children: [
|
|
826
|
+
/* @__PURE__ */ b("mesh", { geometry: ao, material: Ko, scale: 0.85, onClick: y, onPointerOver: () => document.body.style.cursor = "pointer", onPointerOut: () => document.body.style.cursor = "" }),
|
|
827
|
+
/* @__PURE__ */ b("lineSegments", { ref: l, geometry: be, material: w.sel, visible: !1 }),
|
|
821
828
|
/* @__PURE__ */ b("lineSegments", { ref: u, geometry: be, material: w.wait, visible: !1 })
|
|
822
829
|
] }),
|
|
823
830
|
/* @__PURE__ */ lt("group", { ref: d, scale: 1e-4, children: [
|
|
824
831
|
/* @__PURE__ */ b("sprite", { ref: a, material: w.halo }),
|
|
825
|
-
/* @__PURE__ */ b("sprite", { ref:
|
|
832
|
+
/* @__PURE__ */ b("sprite", { ref: c, material: w.core })
|
|
826
833
|
] }),
|
|
827
834
|
/* @__PURE__ */ b("group", { ref: i, children: /* @__PURE__ */ b(
|
|
828
835
|
Bt,
|
|
829
836
|
{
|
|
830
837
|
ref: p,
|
|
831
838
|
text: `${o.name}${v !== void 0 ? ` ${Number(v) + 1}` : ""}`,
|
|
832
|
-
live: o.job ? () =>
|
|
839
|
+
live: o.job ? () => Je(o) : null,
|
|
833
840
|
color: le[o.type],
|
|
834
841
|
size: o.subagent ? 0.22 : 0.28,
|
|
835
842
|
letterSpacing: 0.02,
|
|
@@ -841,31 +848,31 @@ function Ko({ agent: t, selected: e, onSelect: s }) {
|
|
|
841
848
|
] });
|
|
842
849
|
}
|
|
843
850
|
const Ot = /* @__PURE__ */ new Map();
|
|
844
|
-
function
|
|
845
|
-
return
|
|
851
|
+
function Xo() {
|
|
852
|
+
return dt((t, e) => {
|
|
846
853
|
const s = Math.min(1, Math.min(0.05, e) * 1.6);
|
|
847
|
-
for (const o of
|
|
848
|
-
const d =
|
|
854
|
+
for (const o of Q.agents.values()) {
|
|
855
|
+
const d = Be(o), f = Ot.get(o.id), a = f === void 0 ? d : f + (d - f) * s;
|
|
849
856
|
Ot.set(o.id, a), o.pos.z = a, o.live.z = a;
|
|
850
857
|
}
|
|
851
|
-
if (Ot.size >
|
|
852
|
-
for (const o of Ot.keys())
|
|
858
|
+
if (Ot.size > Q.agents.size + 64)
|
|
859
|
+
for (const o of Ot.keys()) Q.agents.has(o) || Ot.delete(o);
|
|
853
860
|
}, -1), null;
|
|
854
861
|
}
|
|
855
|
-
const No = 160,
|
|
856
|
-
function
|
|
857
|
-
const t = D(() => new Yt(No +
|
|
858
|
-
return
|
|
859
|
-
const d = performance.now(),
|
|
862
|
+
const No = 160, $o = 32;
|
|
863
|
+
function Ho() {
|
|
864
|
+
const t = D(() => new Yt(No + $o, 24), []), e = D(() => /* @__PURE__ */ new Map(), []), s = D(() => ({ a: new r.Vector3(), b: new r.Vector3(), col: new r.Color() }), []);
|
|
865
|
+
return dt(({ clock: o }) => {
|
|
866
|
+
const d = performance.now(), f = mt(), a = st ? 0 : o.elapsedTime;
|
|
860
867
|
t.begin();
|
|
861
|
-
const { a:
|
|
862
|
-
for (const i of
|
|
863
|
-
const p = i.inst, h = p.parent ?
|
|
868
|
+
const { a: c, b: l, col: u } = s;
|
|
869
|
+
for (const i of Q.agents.values()) {
|
|
870
|
+
const p = i.inst, h = p.parent ? Q.agents.get(p.parent) : void 0, m = h ? h.pos : p.parent ? void 0 : xt.get(p.run);
|
|
864
871
|
if (!m) continue;
|
|
865
872
|
const w = i.pos.distanceTo(m);
|
|
866
873
|
if (w < 0.5) continue;
|
|
867
874
|
const n = Math.min(0.4, ((h ? 0.85 * h.scale : 0.25) + 0.05) / w), y = Math.max(n + 0.05, 1 - (0.85 * i.scale + 0.05) / w), v = (d - p.bornAt) / 1e3, x = ne(v / ie), B = (h ? 0.3 : 0.2) * (1 - 0.65 * i.dim) * x;
|
|
868
|
-
u.copy(It[p.type]).lerp(
|
|
875
|
+
u.copy(It[p.type]).lerp($, 0.4), c.copy(m), l.copy(i.pos), bt.copy(c).add(l).multiplyScalar(0.5), t.add(c, bt, l, u, B, n, n + (y - n) * x, Math.max(3, Math.round(w / 0.42)), a * 0.35, -1, 0);
|
|
869
876
|
}
|
|
870
877
|
for (const i of e.keys()) {
|
|
871
878
|
let p = !1;
|
|
@@ -875,67 +882,67 @@ function $o() {
|
|
|
875
882
|
for (const i of L.comets) {
|
|
876
883
|
const p = St(i.from), h = St(i.to);
|
|
877
884
|
if (!p || !h) continue;
|
|
878
|
-
const m =
|
|
879
|
-
if (!
|
|
885
|
+
const m = to(i, d);
|
|
886
|
+
if (!eo(i, d)) continue;
|
|
880
887
|
let w = e.get(i.id);
|
|
881
888
|
w || e.set(i.id, w = new fe()), qt(p, h, i.id % 2 ? 0.22 : -0.22, bt);
|
|
882
889
|
const n = ne(m);
|
|
883
890
|
Ut(p, bt, h, n, Lt);
|
|
884
891
|
const y = L.instances.get(i.from);
|
|
885
|
-
u.copy(y ? It[y.type] :
|
|
892
|
+
u.copy(y ? It[y.type] : $).lerp(N, 0.35);
|
|
886
893
|
const v = Math.min(1, m / 0.08) * Math.min(1, (1 - m) / 0.12);
|
|
887
|
-
t.add(p, bt, h, u, 0, 0, 1, 0, 0, n, 1.1 * v), w.step(Lt, 0.06, 0.07, u, 0.9 * v, 2.4,
|
|
894
|
+
t.add(p, bt, h, u, 0, 0, 1, 0, 0, n, 1.1 * v), w.step(Lt, 0.06, 0.07, u, 0.9 * v, 2.4, f, 6), Z().emit(Lt.x, Lt.y, Lt.z, 0.42, u, 1.2 * v, 0.12, f, 1);
|
|
888
895
|
}
|
|
889
896
|
t.end();
|
|
890
897
|
}), /* @__PURE__ */ b("primitive", { object: t.obj });
|
|
891
898
|
}
|
|
892
|
-
const
|
|
899
|
+
const Zo = { tint: "#7dd3fc", tintAmt: 0.3, gain: 0.6, halo: 0.4 }, Yo = {
|
|
893
900
|
minPolarAngle: Math.PI * 0.25,
|
|
894
901
|
maxPolarAngle: Math.PI * 0.75
|
|
895
902
|
};
|
|
896
|
-
function
|
|
903
|
+
function Qo(t) {
|
|
897
904
|
for (const e of xt.values()) t(e, 0.9);
|
|
898
|
-
for (const e of
|
|
905
|
+
for (const e of Q.agents.values()) t(vt.set(e.target.x, e.target.y, Be(e)), 1.1 * e.scale);
|
|
899
906
|
t(vt.set(R.rx, 0, 0), 0), t(vt.set(-R.rx, 0, 0), 0), t(vt.set(0, R.ry, 0), 0), t(vt.set(0, -R.ry, 0), 0), t(vt.set(0, 0, R.hz), 0), t(vt.set(0, 0, -R.hz), 0);
|
|
900
907
|
}
|
|
901
908
|
const vt = new r.Vector3();
|
|
902
|
-
function
|
|
909
|
+
function rn() {
|
|
903
910
|
return /* @__PURE__ */ lt(
|
|
904
|
-
|
|
911
|
+
oo,
|
|
905
912
|
{
|
|
906
913
|
title: "bubble chamber · particle tracks",
|
|
907
914
|
subtitle: "Agents are charged particles on helices along the field (tight = thinking, slow orbit = waiting, spiral in = done) · a spawn is a decay into a V · LLM calls burst bubbles, tools kink the track, a deny flashes red · each run is an event at its vertex · ▭ MCP detector plates, ⬡ backend cells · graph = event archive (a read pulls its plate out)",
|
|
908
915
|
preset: "radial",
|
|
909
916
|
plane: "xy",
|
|
910
917
|
camera: { position: [0, 0, 34], fov: 46, far: 1200 },
|
|
911
|
-
controls:
|
|
918
|
+
controls: Yo,
|
|
912
919
|
bg: "#010406",
|
|
913
920
|
gl: { antialias: !0 },
|
|
914
921
|
fit: { nRef: 4, min: 0.62, max: 1.6, minRadius: 5.5 },
|
|
915
922
|
agentRadius: 1.1,
|
|
916
|
-
graph: { natural:
|
|
923
|
+
graph: { natural: go * 1.05, radius: 4.4 },
|
|
917
924
|
peripheryGap: 3.8,
|
|
918
|
-
extents:
|
|
919
|
-
Background: /* @__PURE__ */ b(
|
|
920
|
-
Agent:
|
|
921
|
-
RunMarker:
|
|
922
|
-
mcpStyle:
|
|
923
|
-
GraphResource:
|
|
925
|
+
extents: Qo,
|
|
926
|
+
Background: /* @__PURE__ */ b(Do, {}),
|
|
927
|
+
Agent: Uo,
|
|
928
|
+
RunMarker: jo,
|
|
929
|
+
mcpStyle: Zo,
|
|
930
|
+
GraphResource: zo,
|
|
924
931
|
cluster: { radius: 1.4, variant: "swarm", glowGain: 0.9 },
|
|
925
|
-
PostFX: /* @__PURE__ */ lt(
|
|
926
|
-
/* @__PURE__ */ b(
|
|
927
|
-
/* @__PURE__ */ b(
|
|
932
|
+
PostFX: /* @__PURE__ */ lt(Oe, { multisampling: 0, children: [
|
|
933
|
+
/* @__PURE__ */ b(Ee, { mipmapBlur: !0, intensity: 0.9, luminanceThreshold: 0.2, luminanceSmoothing: 0.3, radius: 0.6 }),
|
|
934
|
+
/* @__PURE__ */ b(Fe, { eskil: !1, offset: 0.22, darkness: 0.85 })
|
|
928
935
|
] }),
|
|
929
936
|
children: [
|
|
930
|
-
/* @__PURE__ */ b(
|
|
931
|
-
/* @__PURE__ */ b(
|
|
932
|
-
/* @__PURE__ */ b(
|
|
933
|
-
/* @__PURE__ */ b(
|
|
934
|
-
/* @__PURE__ */ b(
|
|
937
|
+
/* @__PURE__ */ b(Xo, {}),
|
|
938
|
+
/* @__PURE__ */ b(Ho, {}),
|
|
939
|
+
/* @__PURE__ */ b(ko, {}),
|
|
940
|
+
/* @__PURE__ */ b(Wo, {}),
|
|
941
|
+
/* @__PURE__ */ b(Vo, {})
|
|
935
942
|
]
|
|
936
943
|
}
|
|
937
944
|
);
|
|
938
945
|
}
|
|
939
946
|
export {
|
|
940
|
-
|
|
947
|
+
rn as default
|
|
941
948
|
};
|