agentglow 0.2.10 → 0.2.11
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/dist/chunks/{KitScene-Bm1I35Zc.js → KitScene-DG_pcnWW.js} +1273 -1195
- package/dist/chunks/{index-COLbf8XM.js → index-Agh7jdYu.js} +182 -182
- package/dist/chunks/{index-CGTp73GN.js → index-B2EHxcBQ.js} +400 -400
- package/dist/chunks/{index-D-r9aJ4u.js → index-B4Cqo621.js} +33 -33
- package/dist/chunks/index-BfQsJ0TH.js +751 -0
- package/dist/chunks/index-BmBGYhJS.js +891 -0
- package/dist/chunks/index-Bnn-x-aE.js +767 -0
- package/dist/chunks/{index-BWsSd_Wm.js → index-CTQTtm9q.js} +212 -212
- package/dist/chunks/{index-_IwfbZy7.js → index-CTZbUTDY.js} +62 -62
- package/dist/chunks/{index-cRPj-lzn.js → index-CdKvybsL.js} +284 -284
- package/dist/chunks/index-CeiIEWek.js +818 -0
- package/dist/chunks/{index-D4Wlmsay.js → index-Ci8tSMhc.js} +15 -15
- package/dist/chunks/{index-C2vLpNCb.js → index-Cls_VZdb.js} +100 -100
- package/dist/chunks/index-DFFRhihO.js +892 -0
- package/dist/chunks/index-DMCETM4H.js +605 -0
- package/dist/chunks/{index-AugvjZJN.js → index-URn4zDHp.js} +223 -223
- package/dist/chunks/index-u4rYZ1UO.js +495 -0
- package/dist/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/world.d.ts +30 -5
- package/package.json +1 -1
- package/dist/chunks/index-BAQDf-0T.js +0 -492
- package/dist/chunks/index-BRnLrSfZ.js +0 -605
- package/dist/chunks/index-CKyn9lcT.js +0 -753
- package/dist/chunks/index-CnoB0ZDk.js +0 -889
- package/dist/chunks/index-KmczAvvY.js +0 -818
- package/dist/chunks/index-Z4vdWCok.js +0 -763
- package/dist/chunks/index-uZGu9jzU.js +0 -887
|
@@ -7,7 +7,7 @@ import { EffectComposer as at, Bloom as st, Vignette as it } from "@react-three/
|
|
|
7
7
|
import { useFrame as re, useThree as ct } from "@react-three/fiber";
|
|
8
8
|
import { useRef as z, useMemo as P, useEffect as lt, useState as $e } from "react";
|
|
9
9
|
import * as o from "three";
|
|
10
|
-
import { T as Xe, w as L, a as ge, f as Ee, p as ut, e as pt, s as ft, r as fe, L as be, l as dt, g as mt, b as
|
|
10
|
+
import { T as Xe, w as L, a as ge, f as Ee, p as ut, e as pt, s as ft, r as fe, L as be, l as dt, g as mt, b as We, K as ht, n as gt, o as vt, G as yt, q as wt, R as bt, u as Mt, t as St, c as De, d as Ct, m as At } from "./KitScene-DG_pcnWW.js";
|
|
11
11
|
const ee = (e) => e < 0 ? 0 : e > 1 ? 1 : e, Ie = (e) => 1 - Math.pow(1 - ee(e), 3), Me = (e) => (e = ee(e), e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2), xt = (e) => {
|
|
12
12
|
e = ee(e);
|
|
13
13
|
const r = 2.2;
|
|
@@ -47,7 +47,7 @@ function Tt(e = 64, r = 7) {
|
|
|
47
47
|
const Ye = Tt(), Ge = new o.SphereGeometry(1, 32, 24);
|
|
48
48
|
new o.SphereGeometry(1, 40, 28);
|
|
49
49
|
new o.IcosahedronGeometry(1, 1);
|
|
50
|
-
const
|
|
50
|
+
const Ke = new o.ConeGeometry(1, 1, 14).translate(0, 0.5, 0), Vt = new o.ConeGeometry(1, 1, 6, 1, !0).translate(0, 0.5, 0), Pt = (
|
|
51
51
|
/* glsl */
|
|
52
52
|
`
|
|
53
53
|
uniform vec3 uP0; uniform vec3 uP1; uniform vec3 uP2; uniform float uRadius; uniform float uTaper;
|
|
@@ -122,7 +122,7 @@ function Oe(e, r, t, n) {
|
|
|
122
122
|
const s = Math.hypot(n.x, n.y) || 1;
|
|
123
123
|
return n.x += n.x / s * t, n.y += n.y / s * t, n.z += t * 0.9, n;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function je(e, r, t) {
|
|
126
126
|
return e.r += r.r * t, e.g += r.g * t, e.b += r.b * t, e;
|
|
127
127
|
}
|
|
128
128
|
const Be = class Be {
|
|
@@ -135,7 +135,7 @@ const Be = class Be {
|
|
|
135
135
|
te(this, "a", new o.Vector3());
|
|
136
136
|
te(this, "b", new o.Vector3());
|
|
137
137
|
te(this, "d", new o.Vector3());
|
|
138
|
-
this.max = r, this.colors = new Float32Array(r * 3), this.mesh = new o.InstancedMesh(
|
|
138
|
+
this.max = r, this.colors = new Float32Array(r * 3), this.mesh = new o.InstancedMesh(Ke, new o.MeshBasicMaterial({ blending: o.AdditiveBlending, depthWrite: !1, transparent: !0, toneMapped: !1 }), r), this.mesh.instanceColor = new o.InstancedBufferAttribute(this.colors, 3), this.mesh.frustumCulled = !1, this.mesh.count = 0;
|
|
139
139
|
}
|
|
140
140
|
begin() {
|
|
141
141
|
this.n = 0;
|
|
@@ -185,15 +185,15 @@ function Ft({ agent: e, onSelect: r }) {
|
|
|
185
185
|
e.live.set(e.pos.x + Math.sin(_ * 0.35 + S * 20) * k, e.pos.y + Math.cos(_ * 0.3 + S * 13) * k, e.pos.z);
|
|
186
186
|
const G = e.live, f = t.parent ? L.instances.get(t.parent) : void 0, T = t.parent ? ge(t.parent) : void 0;
|
|
187
187
|
T ? (c.p0.copy(T), c.p0set = !0) : c.p0set || (c.p0.copy(G), c.p0set = !0), Fe(t.type) || t.subagent ? c.p1.copy(c.p0).addScaledVector(e.run.axis, 1.7 * Ee.spread) : Oe(c.p0, G, 0.6, c.p1);
|
|
188
|
-
const
|
|
188
|
+
const W = (x - t.bornAt) / 1e3, I = t.parent ? Ie(W / 0.9) : 1, V = xt((W - (t.parent ? 0.85 : 0.1)) / 0.7), j = t.exitAt ? (x - t.exitAt) / 1e3 : -1, N = dt(t) / 1e3, y = j >= 0 ? ee(j / (N * 0.92)) : 0, $ = ut(t, x);
|
|
189
189
|
let X = !1;
|
|
190
190
|
for (const H of L.mcpPending.values()) H.instance === t.id && (X = !0);
|
|
191
|
-
const d =
|
|
192
|
-
c.spik += ((d ? 1 : 0) - c.spik) * 0.06, c.ringK += ((X &&
|
|
193
|
-
const
|
|
194
|
-
(D = s.current) == null || D.scale.setScalar(Math.max(1e-4, l * (0.55 + b * 0.06 + (d ?
|
|
195
|
-
const v = d ? 0.75 +
|
|
196
|
-
if (c.c.copy(C).multiplyScalar(v + b * 0.35),
|
|
191
|
+
const d = j < 0 && (t.status === "thinking" || t.status === "spawning"), b = pt(t, x), O = fe ? 0 : 1, K = 0.5 + 0.5 * Math.sin(_ * 2 + S * 9) * O, Z = 0.5 + 0.5 * Math.sin(_ * 1 + S * 5) * O;
|
|
192
|
+
c.spik += ((d ? 1 : 0) - c.spik) * 0.06, c.ringK += ((X && j < 0 ? 1 : 0) - c.ringK) * 0.08, n.current && (I < 1 ? n.current.position.copy(ne(c.p0, c.p1, G, I, c.seedP)) : n.current.position.copy(G));
|
|
193
|
+
const U = I < 1 ? 0.18 : 0, l = Math.max(U, 0.18 + 0.82 * V) * (1 - y * y * 0.95) * e.scale;
|
|
194
|
+
(D = s.current) == null || D.scale.setScalar(Math.max(1e-4, l * (0.55 + b * 0.06 + (d ? K * 0.05 : Z * 0.04)))), (ie = a.current) == null || ie.scale.setScalar(Math.max(1e-4, c.spik * (0.85 + K * 0.15)));
|
|
195
|
+
const v = d ? 0.75 + K * 0.35 : 0.3 + Z * 0.15;
|
|
196
|
+
if (c.c.copy(C).multiplyScalar(v + b * 0.35), j >= 0 && c.c.lerp(Bt, y).multiplyScalar(1 - y * 0.75), g.core.color.copy(c.c), g.spike.color.copy(c.c).multiplyScalar(0.9), g.hot.color.setScalar((d ? 0.35 + K * 0.25 : 0.08) * (1 - y) + b * 0.2), i.current && (i.current.visible = c.ringK > 0.02, i.current.rotation.z = _ * 0.9, i.current.rotation.x = 1.1 + Math.sin(_ * 0.5) * 0.2, i.current.scale.setScalar(Math.max(1e-4, l * 0.55 * c.ringK)), g.ring.color.copy(Le).multiplyScalar(0.9 * c.ringK * (0.75 + Z * 0.25))), h.current && (h.current.scale.setScalar(Math.max(1e-4, l * (d ? 2.3 + K * 0.3 : 1.6) + b * 0.35)), g.halo.color.copy(C).multiplyScalar((d ? 0.22 : 0.09) * (1 - y) + b * 0.06)), (Q = M.current) == null || Q.position.set(0, -0.78 * e.scale - 0.25, 0), m.current) {
|
|
197
197
|
const H = ft(t.id);
|
|
198
198
|
c.labelK += ((H ? 1 : 0) - c.labelK) * 0.12, m.current.setOpacity(ee(V) * (1 - y) * 0.95 * c.labelK);
|
|
199
199
|
}
|
|
@@ -201,7 +201,7 @@ function Ft({ agent: e, onSelect: r }) {
|
|
|
201
201
|
c.parentK += ((t.parent && !t.exitAt && E ? 1 : 0) - c.parentK) * (E ? 0.05 : 0.035);
|
|
202
202
|
const R = g.syn.uniforms;
|
|
203
203
|
R.uP0.value.copy(c.p0), R.uP1.value.copy(c.p1), R.uP2.value.copy(G);
|
|
204
|
-
const q =
|
|
204
|
+
const q = j >= 0 ? Me(j / (N * 0.64)) : 0;
|
|
205
205
|
if (R.uGrow.value = t.parent ? I * (1 - q) : 0, R.uSpark.value = 0, R.uHead.value = I < 1 ? I : -1, R.uTail.value = 0.1, R.uHeadColor.value.copy(C).multiplyScalar(1.5), R.uOpacity.value = (d ? 1.1 : 0.75) * Math.max(0, Math.min(c.parentK, $ > 0 ? 1 : 0)) + (I < 1 ? 0.4 : 0), R.uTime.value = fe ? 0 : _, R.uFlow.value = I >= 1 ? c.parentK : 0, p.current) {
|
|
206
206
|
const H = t.parent && I >= 1 && c.parentK > 0.05 && R.uGrow.value > 0.9;
|
|
207
207
|
if (p.current.visible = !!H, H) {
|
|
@@ -216,7 +216,7 @@ function Ft({ agent: e, onSelect: r }) {
|
|
|
216
216
|
}, w = t.id.split(":")[2];
|
|
217
217
|
return /* @__PURE__ */ Y(de, { children: [
|
|
218
218
|
/* @__PURE__ */ u("mesh", { geometry: Ye, material: g.syn, frustumCulled: !1 }),
|
|
219
|
-
/* @__PURE__ */ u("mesh", { ref: p, geometry:
|
|
219
|
+
/* @__PURE__ */ u("mesh", { ref: p, geometry: Ke, material: g.arrow, visible: !1 }),
|
|
220
220
|
/* @__PURE__ */ Y("group", { ref: n, children: [
|
|
221
221
|
/* @__PURE__ */ Y("group", { ref: s, scale: 1e-4, children: [
|
|
222
222
|
/* @__PURE__ */ u("mesh", { geometry: Ge, material: g.core, onClick: A, onPointerOver: () => document.body.style.cursor = "pointer", onPointerOut: () => document.body.style.cursor = "" }),
|
|
@@ -259,15 +259,15 @@ function It() {
|
|
|
259
259
|
const [e, r] = $e([]), t = z({ n: -1, last: -1, first: -1 });
|
|
260
260
|
return re(() => {
|
|
261
261
|
const n = L.comets, s = t.current, a = n.length ? n[0].id : -1, i = n.length ? n[n.length - 1].id : -1;
|
|
262
|
-
(n.length !== s.n || a !== s.first || i !== s.last) && (s.n = n.length, s.first = a, s.last = i, r(mt.grouped ? n.filter((p) =>
|
|
262
|
+
(n.length !== s.n || a !== s.first || i !== s.last) && (s.n = n.length, s.first = a, s.last = i, r(mt.grouped ? n.filter((p) => We(p.from) && We(p.to)) : n.slice()));
|
|
263
263
|
}), /* @__PURE__ */ u(de, { children: e.map((n) => /* @__PURE__ */ u(kt, { comet: n }, n.id)) });
|
|
264
264
|
}
|
|
265
|
-
const oe = 3.3,
|
|
266
|
-
function
|
|
265
|
+
const oe = 3.3, Kt = 200, ce = 14, Re = 48, me = 16, pe = 8, Te = 4, ve = new o.Color(1, 1, 1), Ut = new o.Color("#a78bfa");
|
|
266
|
+
function Wt(e, r = Kt) {
|
|
267
267
|
const t = e.nodes.slice(0, r), n = new Set(t.map((s) => s.id));
|
|
268
268
|
return { nodes: t, links: e.links.filter((s) => n.has(s.source) && n.has(s.target)) };
|
|
269
269
|
}
|
|
270
|
-
const
|
|
270
|
+
const jt = (
|
|
271
271
|
/* glsl */
|
|
272
272
|
`
|
|
273
273
|
attribute float aSize; attribute vec3 aColor; varying vec3 vC; varying float vFacing; uniform float uScale;
|
|
@@ -314,13 +314,13 @@ void main(){
|
|
|
314
314
|
}`
|
|
315
315
|
);
|
|
316
316
|
function Nt({ galaxy: e }) {
|
|
317
|
-
const r = P(() =>
|
|
317
|
+
const r = P(() => Wt(e), [e]), t = r.nodes.length, { size: n, gl: s, camera: a } = ct(), i = z([]), p = z([]), h = z(Array(Te).fill("")), m = P(() => {
|
|
318
318
|
const c = new Float32Array(t * 3), A = [], w = Math.PI * (3 - Math.sqrt(5));
|
|
319
319
|
for (let d = 0; d < t; d++) {
|
|
320
|
-
const b = 1 - 2 * (d + 0.5) / t, O = Math.sqrt(1 - b * b),
|
|
321
|
-
A.push(
|
|
320
|
+
const b = 1 - 2 * (d + 0.5) / t, O = Math.sqrt(1 - b * b), K = new o.Vector3(Math.cos(d * w) * O, b, Math.sin(d * w) * O);
|
|
321
|
+
A.push(K), c.set([K.x * oe, K.y * oe, K.z * oe], d * 3);
|
|
322
322
|
}
|
|
323
|
-
const B = r.nodes.map((d) => new o.Color(ht[d.kind] ?? "#94a3b8").lerp(
|
|
323
|
+
const B = r.nodes.map((d) => new o.Color(ht[d.kind] ?? "#94a3b8").lerp(Ut, 0.2).multiplyScalar(0.62)), x = new Float32Array(t), _ = new Float32Array(t * 3), k = new o.BufferGeometry();
|
|
324
324
|
k.setAttribute("position", new o.BufferAttribute(c, 3)), k.setAttribute("aSize", new o.BufferAttribute(x, 1)), k.setAttribute("aColor", new o.BufferAttribute(_, 3));
|
|
325
325
|
const G = new Map(r.nodes.map((d, b) => [d.id, b])), f = [], T = [];
|
|
326
326
|
for (const d of r.links) {
|
|
@@ -328,33 +328,33 @@ function Nt({ galaxy: e }) {
|
|
|
328
328
|
b !== void 0 && O !== void 0 && b !== O && A[b].angleTo(A[O]) < 1.25 && (f.push([b, O]), T.push(1));
|
|
329
329
|
}
|
|
330
330
|
for (let d = 0; d < t; d++) {
|
|
331
|
-
let b = -1, O = -1,
|
|
332
|
-
for (let
|
|
333
|
-
if (
|
|
334
|
-
const l = A[d].distanceToSquared(A[
|
|
335
|
-
l <
|
|
331
|
+
let b = -1, O = -1, K = 9, Z = 9;
|
|
332
|
+
for (let U = 0; U < t; U++) {
|
|
333
|
+
if (U === d) continue;
|
|
334
|
+
const l = A[d].distanceToSquared(A[U]);
|
|
335
|
+
l < K ? (O = b, Z = K, b = U, K = l) : l < Z && (O = U, Z = l);
|
|
336
336
|
}
|
|
337
337
|
b > d && (f.push([d, b]), T.push(0)), O > d && (f.push([d, O]), T.push(0));
|
|
338
338
|
}
|
|
339
|
-
const
|
|
339
|
+
const W = new Float32Array(f.length * ce * 2 * 3), I = new Float32Array(f.length * ce * 2 * 3), V = new Int32Array(f.length * ce * 2 * 2), j = new Uint8Array(f.length * ce * 2), N = new o.Quaternion(), y = new o.Vector3();
|
|
340
340
|
f.forEach(([d, b], O) => {
|
|
341
|
-
const
|
|
341
|
+
const K = A[d], Z = A[b], U = K.angleTo(Z), l = new o.Vector3().crossVectors(K, Z);
|
|
342
342
|
l.lengthSq() < 1e-6 && l.set(0, 1, 0), l.normalize();
|
|
343
343
|
for (let v = 0; v < ce; v++)
|
|
344
344
|
for (let E = 0; E < 2; E++) {
|
|
345
345
|
const R = (v + E) / ce;
|
|
346
|
-
N.setFromAxisAngle(l,
|
|
346
|
+
N.setFromAxisAngle(l, U * R), y.copy(K).applyQuaternion(N).multiplyScalar(oe * (1 + 0.06 * Math.sin(Math.PI * R) * Math.min(1, U)));
|
|
347
347
|
const q = (O * ce + v) * 2 + E;
|
|
348
|
-
|
|
348
|
+
W.set([y.x, y.y, y.z], q * 3), V[q * 2] = d, V[q * 2 + 1] = b, j[q] = T[O];
|
|
349
349
|
}
|
|
350
350
|
});
|
|
351
351
|
const $ = new o.BufferGeometry();
|
|
352
|
-
$.setAttribute("position", new o.BufferAttribute(
|
|
352
|
+
$.setAttribute("position", new o.BufferAttribute(W, 3)), $.setAttribute("color", new o.BufferAttribute(I, 3));
|
|
353
353
|
const X = new o.BufferGeometry();
|
|
354
|
-
return X.setAttribute("position", new o.BufferAttribute(new Float32Array(Re * me * 2 * 3), 3)), X.setAttribute("color", new o.BufferAttribute(new Float32Array(Re * me * 2 * 3), 3)), X.boundingSphere = new o.Sphere(new o.Vector3(), 1e4), { pos: c, unit: A, base: B, ngeo: k, ageo: $, owner: V, kindOf:
|
|
354
|
+
return X.setAttribute("position", new o.BufferAttribute(new Float32Array(Re * me * 2 * 3), 3)), X.setAttribute("color", new o.BufferAttribute(new Float32Array(Re * me * 2 * 3), 3)), X.boundingSphere = new o.Sphere(new o.Vector3(), 1e4), { pos: c, unit: A, base: B, ngeo: k, ageo: $, owner: V, kindOf: j, nArcV: f.length * ce * 2, bgeo: X, fire: new Float32Array(t), white: new Float32Array(t), fireC: Array.from({ length: t }, () => new o.Color()) };
|
|
355
355
|
}, [r, t]), M = P(
|
|
356
356
|
() => ({
|
|
357
|
-
nodes: new o.ShaderMaterial({ uniforms: { uScale: { value: 400 } }, vertexShader:
|
|
357
|
+
nodes: new o.ShaderMaterial({ uniforms: { uScale: { value: 400 } }, vertexShader: jt, fragmentShader: Ht, transparent: !0, depthWrite: !1, blending: o.AdditiveBlending }),
|
|
358
358
|
arcs: new o.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: o.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
|
|
359
359
|
beam: new o.LineBasicMaterial({ vertexColors: !0, transparent: !0, blending: o.AdditiveBlending, depthWrite: !1, toneMapped: !1 }),
|
|
360
360
|
orb: new o.ShaderMaterial({
|
|
@@ -382,7 +382,7 @@ function Nt({ galaxy: e }) {
|
|
|
382
382
|
return re(({ clock: c }) => {
|
|
383
383
|
const A = performance.now(), { pos: w, base: B, fire: x, white: _, fireC: k, unit: G } = m;
|
|
384
384
|
M.nodes.uniforms.uScale.value = n.height * s.getPixelRatio() / (2 * Math.tan(a.fov * Math.PI / 360)) * gt.graph.scale, M.orb.uniforms.uTime.value = fe ? 0 : c.elapsedTime, x.fill(0), _.fill(0);
|
|
385
|
-
const { v: f, v2: T, mid:
|
|
385
|
+
const { v: f, v2: T, mid: W, c: I, c2: V } = C, j = m.bgeo.getAttribute("position"), N = m.bgeo.getAttribute("color"), y = M.orb.uniforms.uRipC.value, $ = M.orb.uniforms.uRipA.value;
|
|
386
386
|
let X = 0;
|
|
387
387
|
F.begin();
|
|
388
388
|
let d = 0;
|
|
@@ -391,52 +391,52 @@ function Nt({ galaxy: e }) {
|
|
|
391
391
|
ie > x[v] && (x[v] = ie, k[v].copy(D ? ve : q), _[v] = D ? 1 : 0), D && E < 1.8 && d < pe && (y[d].copy(G[v]), $[d] = E / 1.8, d++);
|
|
392
392
|
const Q = ge(l.instance), H = Q ? vt(Q, C.sp) : void 0;
|
|
393
393
|
if (H && E < 2.2 && X < Re) {
|
|
394
|
-
f.set(w[v * 3], w[v * 3 + 1], w[v * 3 + 2]),
|
|
394
|
+
f.set(w[v * 3], w[v * 3 + 1], w[v * 3 + 2]), W.copy(H).add(f).multiplyScalar(0.5), W.z += 1;
|
|
395
395
|
const ue = Math.min(1, E / 0.3) * (1 - E / 2.2) ** 1.5, et = D ? Math.min(1, E * 0.85) : 1 - Math.min(1, E * 0.85);
|
|
396
396
|
for (let Se = 0; Se < me; Se++)
|
|
397
397
|
for (let Ce = 0; Ce < 2; Ce++) {
|
|
398
398
|
const J = (Se + Ce) / me, ae = 1 - J;
|
|
399
|
-
T.set(ae * ae * H.x + 2 * ae * J *
|
|
400
|
-
const
|
|
401
|
-
|
|
399
|
+
T.set(ae * ae * H.x + 2 * ae * J * W.x + J * J * f.x, ae * ae * H.y + 2 * ae * J * W.y + J * J * f.y, ae * ae * H.z + 2 * ae * J * W.z + J * J * f.z);
|
|
400
|
+
const Ue = (X * me + Se) * 2 + Ce;
|
|
401
|
+
j.setXYZ(Ue, T.x, T.y, T.z);
|
|
402
402
|
const tt = Math.exp(-(((J - et) / 0.1) ** 2)) * 1.3;
|
|
403
|
-
V.copy(D ? ve : q).multiplyScalar(ue * ((D ? 0.5 : 0.2) + tt) * 0.75), N.setXYZ(
|
|
403
|
+
V.copy(D ? ve : q).multiplyScalar(ue * ((D ? 0.5 : 0.2) + tt) * 0.75), N.setXYZ(Ue, V.r, V.g, V.b);
|
|
404
404
|
}
|
|
405
|
-
D ? F.add(H,
|
|
405
|
+
D ? F.add(H, W, f, 0.9, 1, 0.42, ve, ue * 1.1) : F.add(H, W, f, 0.1, -1, 0.42, q, ue * 1.3), X++;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
for (let l = d; l < pe; l++) $[l] = -1;
|
|
409
|
-
m.bgeo.setDrawRange(0, X * me * 2), F.end(),
|
|
409
|
+
m.bgeo.setDrawRange(0, X * me * 2), F.end(), j.needsUpdate = !0, N.needsUpdate = !0;
|
|
410
410
|
const b = m.ngeo.getAttribute("aSize"), O = m.ngeo.getAttribute("aColor");
|
|
411
411
|
for (let l = 0; l < t; l++) {
|
|
412
412
|
const v = x[l];
|
|
413
|
-
b.setX(l, 0.21 + v * (0.55 + _[l] * 0.25)), I.copy(B[l]), v > 0.01 &&
|
|
413
|
+
b.setX(l, 0.21 + v * (0.55 + _[l] * 0.25)), I.copy(B[l]), v > 0.01 && je(je(I, k[l], v * 1.6), ve, v * (0.3 + _[l] * 1.2)), O.setXYZ(l, I.r, I.g, I.b);
|
|
414
414
|
}
|
|
415
415
|
b.needsUpdate = !0, O.needsUpdate = !0;
|
|
416
|
-
const
|
|
416
|
+
const K = m.ageo.getAttribute("color"), Z = m.owner;
|
|
417
417
|
for (let l = 0; l < m.nArcV; l++) {
|
|
418
418
|
const v = Z[l * 2], E = Z[l * 2 + 1], R = Math.max(x[v], x[E]), q = m.kindOf[l] ? 0.16 : 0.07;
|
|
419
|
-
|
|
419
|
+
K.setXYZ(l, 0.42 * q + R * 0.3, 0.36 * q + R * 0.3, 0.85 * q + R * 0.4);
|
|
420
420
|
}
|
|
421
|
-
|
|
422
|
-
let
|
|
423
|
-
for (let l = L.flares.length - 1; l >= 0 &&
|
|
421
|
+
K.needsUpdate = !0;
|
|
422
|
+
let U = 0;
|
|
423
|
+
for (let l = L.flares.length - 1; l >= 0 && U < Te; l--) {
|
|
424
424
|
const v = L.flares[l];
|
|
425
425
|
if (A - v.start > 2200) break;
|
|
426
426
|
let E = !1;
|
|
427
|
-
for (let Q = 0; Q <
|
|
427
|
+
for (let Q = 0; Q < U; Q++) h.current[Q] === v.node && (E = !0);
|
|
428
428
|
if (E) continue;
|
|
429
429
|
const R = g(v.node);
|
|
430
430
|
let q = !1;
|
|
431
|
-
for (let Q = 0; Q <
|
|
431
|
+
for (let Q = 0; Q < U; Q++) {
|
|
432
432
|
const H = p.current[Q];
|
|
433
433
|
H && Math.abs(H.position.y - w[R * 3 + 1]) < 0.55 && Math.abs(H.position.x - w[R * 3]) < 3.2 && (q = !0);
|
|
434
434
|
}
|
|
435
435
|
if (q) continue;
|
|
436
|
-
const D = i.current[
|
|
437
|
-
D && ie && (ie.position.set(w[R * 3], w[R * 3 + 1], w[R * 3 + 2]), h.current[
|
|
436
|
+
const D = i.current[U], ie = p.current[U];
|
|
437
|
+
D && ie && (ie.position.set(w[R * 3], w[R * 3 + 1], w[R * 3 + 2]), h.current[U] !== v.node && (D.setText(`${v.op === "write" ? "wrote" : "read"} · ${v.node}`), D.setColor(v.op === "write" ? "#ffffff" : "#22d3ee")), D.setOpacity(1)), h.current[U] = v.node, U++;
|
|
438
438
|
}
|
|
439
|
-
for (let l =
|
|
439
|
+
for (let l = U; l < Te; l++) {
|
|
440
440
|
const v = i.current[l];
|
|
441
441
|
v == null || v.setOpacity(0), h.current[l] = "";
|
|
442
442
|
}
|
|
@@ -515,9 +515,9 @@ function Jt({ mcp: e, backend: r }) {
|
|
|
515
515
|
[t.color, a]
|
|
516
516
|
), p = z(null), h = z(null), m = z(null), M = z(null), S = P(() => new o.Color(t.color), [t.color]), F = z(null), C = z("");
|
|
517
517
|
return re(({ clock: g }) => {
|
|
518
|
-
var
|
|
518
|
+
var j, N;
|
|
519
519
|
const c = i.edge.uniforms;
|
|
520
|
-
c.uP0.value.copy(e.pos), c.uP2.value.copy(r.pos), c.uP1.value.copy(e.pos).add(r.pos).multiplyScalar(0.5), (
|
|
520
|
+
c.uP0.value.copy(e.pos), c.uP2.value.copy(r.pos), c.uP1.value.copy(e.pos).add(r.pos).multiplyScalar(0.5), (j = p.current) == null || j.position.copy(r.pos);
|
|
521
521
|
const A = performance.now(), w = n.inflight > 0, B = Math.exp(-((A - n.activeAt) / 1e3) * 1.5), x = w ? 0.5 + 0.5 * Math.sin(g.elapsedTime * 5) : 0, _ = w ? 1.6 + x * 0.9 : 0.12 + B * 0.9;
|
|
522
522
|
i.fill.color.copy(a).multiplyScalar(_ * 0.55), i.line.color.copy(a).multiplyScalar(_ * 1.6), i.halo.color.copy(a).multiplyScalar(w ? 0.45 + x * 0.25 : 0.02 + B * 0.25), (N = m.current) == null || N.scale.setScalar(w ? 4.2 + x * 0.8 : 2.4 + B * 1.2), h.current && h.current.scale.setScalar(w ? 1.2 + x * 0.08 : 1 + B * 0.1);
|
|
523
523
|
let k = n.name, G = null;
|
|
@@ -532,14 +532,14 @@ function Jt({ mcp: e, backend: r }) {
|
|
|
532
532
|
f.uTime.value = fe ? 0 : g.elapsedTime;
|
|
533
533
|
let T = null;
|
|
534
534
|
for (const y of L.mcpCalls) y.server === t.name && y.resource === n.name && (!T || y.start > T.start) && (T = y);
|
|
535
|
-
const
|
|
535
|
+
const W = T && T.phase === "result" ? (A - T.start) / T.dur : 9, I = W < 1, V = M.current;
|
|
536
536
|
if (I) {
|
|
537
|
-
const y = Me(
|
|
538
|
-
f.uRadius.value = 0.06, f.uOpacity.value = 0.9 * (1 -
|
|
537
|
+
const y = Me(W);
|
|
538
|
+
f.uRadius.value = 0.06, f.uOpacity.value = 0.9 * (1 - W * 0.6), f.uFlow.value = 0, f.uHead.value = 1 - y, f.uTail.value = 0.2, f.uHeadColor.value.copy(a).multiplyScalar(3), V && (V.visible = !0, He(V, f.uP0.value, f.uP1.value, f.uP2.value, 0.12, -1, 0.55), i.arrow.color.copy(a).multiplyScalar(2 * (1 - W * 0.7)));
|
|
539
539
|
} else w ? (f.uRadius.value = 0.03, f.uOpacity.value = 0.45, f.uFlow.value = 1, f.uHead.value = -1, V && (V.visible = !0, He(V, f.uP0.value, f.uP1.value, f.uP2.value, 0.84, 1, 0.42), i.arrow.color.copy(S).multiplyScalar(1.1))) : (f.uRadius.value = 0.03, f.uOpacity.value = 0.15 + B * 0.4, f.uFlow.value = 0, f.uHead.value = -1, V && (V.visible = !1));
|
|
540
540
|
}), /* @__PURE__ */ Y(de, { children: [
|
|
541
541
|
/* @__PURE__ */ u("mesh", { geometry: Ye, material: i.edge, frustumCulled: !1 }),
|
|
542
|
-
/* @__PURE__ */ u("mesh", { ref: M, geometry:
|
|
542
|
+
/* @__PURE__ */ u("mesh", { ref: M, geometry: Ke, material: i.arrow, visible: !1 }),
|
|
543
543
|
/* @__PURE__ */ Y("group", { ref: p, children: [
|
|
544
544
|
/* @__PURE__ */ u("sprite", { ref: m, material: i.halo }),
|
|
545
545
|
/* @__PURE__ */ u("group", { ref: h, children: s.map((g, c) => /* @__PURE__ */ Y("group", { position: g.pos, rotation: g.rot, children: [
|
|
@@ -602,21 +602,21 @@ function oo() {
|
|
|
602
602
|
B.copy(c), x.copy(w), Oe(B, x, 1, _), G.set(A.color);
|
|
603
603
|
let T;
|
|
604
604
|
C === 0 ? (G.lerp(Dt, ee(g / 1.2)), g > 1.2 && G.lerp(Yt, ee((g - 1.2) / 1)), T = (0.22 + Math.min(0.6, g * 0.25)) * Ie(g / 0.3)) : (f.copy(G).lerp(Qe, 0.35), T = 1.3 * (g < 0.75 ? 1 : 1 - (g - 0.75) / 0.25));
|
|
605
|
-
const
|
|
605
|
+
const W = 1 - Me(g / 0.75), I = C === 0 ? 0.025 : 0.07;
|
|
606
606
|
for (let V = 0; V < ye; V++) {
|
|
607
|
-
const
|
|
607
|
+
const j = (V - 1) * I;
|
|
608
608
|
for (let N = 0; N < he; N++)
|
|
609
609
|
for (let y = 0; y < 2; y++) {
|
|
610
610
|
const $ = (N + y) / he;
|
|
611
611
|
ne(B, _, x, $, k);
|
|
612
612
|
const X = ((m * ye + V) * he + N) * 2 + y;
|
|
613
|
-
p.setXYZ(X, k.x +
|
|
613
|
+
p.setXYZ(X, k.x + j, k.y - j, k.z + j * 0.5);
|
|
614
614
|
let d;
|
|
615
615
|
if (C === 0) {
|
|
616
616
|
const O = Math.pow(Math.max(0, Math.sin($ * 20 - i * 2.2)), 8);
|
|
617
617
|
d = T * (0.3 + O * 1.5) * (V === 1 ? 1 : 0.25);
|
|
618
618
|
} else
|
|
619
|
-
d = T * (0.3 + Math.exp(-((($ -
|
|
619
|
+
d = T * (0.3 + Math.exp(-((($ - W) / 0.07) ** 2)) * 3.2 * (g < 0.8 ? 1 : 0)) * (V === 1 ? 1 : 0.65);
|
|
620
620
|
const b = C === 0 ? G : f;
|
|
621
621
|
h.setXYZ(X, b.r * d, b.g * d, b.b * d);
|
|
622
622
|
}
|