From bca69298381fc09860a4bf4ef633fa7466a493cd Mon Sep 17 00:00:00 2001 From: TianXuan Developer Date: Sat, 25 Jul 2026 14:44:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20w=E9=98=88=E5=80=BC0.03=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E8=BF=87=E6=BB=A4+=E5=89=8D=E5=90=8E=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E5=B9=B3=E6=BB=91=E5=85=A5=E5=8F=A3/=E5=87=BA?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - w<=0永不触发→改为w<0.03实际过滤 - 添加wins[i+2]平滑进入(t-0.85阈值) - 添加wins[i-1]平滑退出(0.15-t阈值) Co-Authored-By: Claude --- .../templates/simple_analysis/simple_analysis.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/simple_analysis/templates/simple_analysis/simple_analysis.html b/simple_analysis/templates/simple_analysis/simple_analysis.html index 71e898d..40bc9a8 100644 --- a/simple_analysis/templates/simple_analysis/simple_analysis.html +++ b/simple_analysis/templates/simple_analysis/simple_analysis.html @@ -2784,17 +2784,24 @@ function renderTrafficCrossfade() { // Each frame: add w0 edges with fade-out, w1 edges with fade-in const edgeMap = {}; function add(edges, w) { - if (!edges || w <= 0) return; + if (!edges || w < 0.03) return; edges.forEach(e => { const k = e.source + '|' + e.target; if (!edgeMap[k]) edgeMap[k] = {source:e.source, target:e.target, weight:0, count:0}; - // Use the FRESHEST weight (not max accumulation), so old edges fade out if (w > edgeMap[k].weight) edgeMap[k].weight = w; if ((e.count||0) > edgeMap[k].count) edgeMap[k].count = e.count||0; }); } add(w0?w0.edges:[], 1-t); add(w1?w1.edges:[], t); + // Also blend in edges that are about to appear (smooth entry) + if (mix.i + 2 < wins.length) { + add(wins[mix.i + 2].edges, Math.max(0, t - 0.85)); + } + // Blend out edges from previous window (smooth exit) + if (mix.i > 0) { + add(wins[mix.i - 1].edges, Math.max(0, 0.15 - t)); + } const edges = Object.values(edgeMap); if (!edges.length) return;