优化动画

This commit is contained in:
CN-JS-HuiBai
2026-04-06 19:47:33 +08:00
parent 864cbc3569
commit c47e483028

View File

@@ -982,6 +982,10 @@
const isSeattleJapan = ( (lowS === 'seattle' || lowS === 'us seattle') && lowD === 'japan' ) ||
( (lowD === 'seattle' || lowD === 'us seattle') && lowS === 'japan' );
// Canonical hash for deterministic randomization (period, etc)
const names = [lowS, lowD].sort();
const routeHash = names.join('').split('').reduce((acc, c) => acc + c.charCodeAt(0), 0);
let finalCurve = 0;
if (isSeattleJapan) {
// Special rule: Seattle ↔ Japan route curves upward (North)
@@ -1006,7 +1010,7 @@
latencyLine: true,
effect: {
show: true,
period: 4,
period: 3 + ((routeHash + i) % 5), // Deterministic random period: 3-7s to vary start/speed
trailLength: 0.1,
color: 'rgba(99, 102, 241, 0.8)',
symbol: 'arrow',