MCPcopy
hub / github.com/opentrace/opentrace / triggerPing

Method triggerPing

ui/src/components/pixi/PixiRenderer.ts:1089–1120  ·  view source on GitHub ↗

Trigger a ping/glow animation on the given node IDs (replays even if already highlighted).

(nodeIds: Iterable<string>)

Source from the content-addressed store, hash-verified

1087
1088 /** Trigger a ping/glow animation on the given node IDs (replays even if already highlighted). */
1089 triggerPing(nodeIds: Iterable<string>): void {
1090 if (!this.app) return;
1091 const now = performance.now();
1092 const triggered: string[] = [];
1093 const missed: string[] = [];
1094 for (const id of nodeIds) {
1095 // Remove existing ping so it replays
1096 const existing = this.pingNodes.get(id);
1097 if (existing) {
1098 existing.glow.destroy();
1099 this.pingNodes.delete(id);
1100 }
1101 const node = this.nodes.get(id);
1102 if (!node) {
1103 missed.push(id);
1104 continue;
1105 }
1106 triggered.push(id);
1107 const tex = getGlowTexture(this.app, node.color, this.textureCache);
1108 const glow = new Sprite(tex);
1109 glow.anchor.set(0.5);
1110 glow.position.copyFrom(node.sprite.position);
1111 glow.alpha = 0;
1112 this.rippleContainer?.addChild(glow);
1113 this.pingNodes.set(id, { startTime: now, glow });
1114 }
1115 console.log('[PixiRenderer] triggerPing', {
1116 triggered: triggered.length,
1117 missed: missed.length,
1118 missedIds: missed.slice(0, 3),
1119 });
1120 }
1121
1122 setNodeVisibility(visibleIds: Set<string>): void {
1123 // Detect whether the visible set actually changed (Fix #38). The

Callers 3

AppInnerFunction · 0.80
useGraphViewerFunction · 0.80

Calls 6

getGlowTextureFunction · 0.90
destroyMethod · 0.80
pushMethod · 0.80
logMethod · 0.80
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected