feat: 所有股票小球统一光晕强度,涨红光晕/跌绿光晕更明显
光晕透明度不再乘覆盖数 alpha(覆盖1的股票 alpha=0.45 导致光晕过淡), 改为所有股票统一 0.5 强度,高亮淡出时降为 0.06。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -394,11 +394,11 @@ function drawStockNodes(
|
||||
const r = isActive ? n.radius + 3 : n.radius;
|
||||
const pr = r * (1 + heartbeat * PULSE_AMPLITUDE);
|
||||
|
||||
// 涨跌光晕:随心跳脉动的径向渐变,正=红 / 负=绿
|
||||
// 涨跌光晕:所有股票统一强度(不随覆盖数 alpha 衰减),随心跳脉动,正=红 / 负=绿
|
||||
const glowColor = isPos ? "rgba(239,68,68," : "rgba(34,197,94,"; // 红/绿
|
||||
const glowR = pr * 1.9;
|
||||
const glow = ctx.createRadialGradient(x, y, pr * 0.2, x, y, glowR);
|
||||
glow.addColorStop(0, `${glowColor}${0.28 * alpha})`);
|
||||
glow.addColorStop(0, `${glowColor}${dim ? 0.06 : 0.5})`);
|
||||
glow.addColorStop(1, `${glowColor}0)`);
|
||||
ctx.beginPath();
|
||||
ctx.arc(x, y, glowR, 0, TAU);
|
||||
|
||||
Reference in New Issue
Block a user