Trigger a ping/glow animation on the given node IDs (replays even if already highlighted).
(nodeIds: Iterable<string>)
| 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 |