优化动画
This commit is contained in:
@@ -982,6 +982,10 @@
|
|||||||
const isSeattleJapan = ( (lowS === 'seattle' || lowS === 'us seattle') && lowD === 'japan' ) ||
|
const isSeattleJapan = ( (lowS === 'seattle' || lowS === 'us seattle') && lowD === 'japan' ) ||
|
||||||
( (lowD === 'seattle' || lowD === 'us seattle') && lowS === '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;
|
let finalCurve = 0;
|
||||||
if (isSeattleJapan) {
|
if (isSeattleJapan) {
|
||||||
// Special rule: Seattle ↔ Japan route curves upward (North)
|
// Special rule: Seattle ↔ Japan route curves upward (North)
|
||||||
@@ -1006,7 +1010,7 @@
|
|||||||
latencyLine: true,
|
latencyLine: true,
|
||||||
effect: {
|
effect: {
|
||||||
show: true,
|
show: true,
|
||||||
period: 4,
|
period: 3 + ((routeHash + i) % 5), // Deterministic random period: 3-7s to vary start/speed
|
||||||
trailLength: 0.1,
|
trailLength: 0.1,
|
||||||
color: 'rgba(99, 102, 241, 0.8)',
|
color: 'rgba(99, 102, 241, 0.8)',
|
||||||
symbol: 'arrow',
|
symbol: 'arrow',
|
||||||
|
|||||||
Reference in New Issue
Block a user