Restyle spawn-phase self highlight: gold instead of white

The local player's spawn ring was plain white, which was hard to see
against white mountain terrain. Recolor it to a bright gold so it stays
visible regardless of the terrain underneath, and make it stand out more
overall during the spawn phase:
- Recolor the self ring from white to a bright gold tint
- Keep the ring center transparent so your territory shows through,
  ramping up to solid at the inner edge
- Raise the breathing opacity floor (35% -> 65%) so the ring stays more
  solid through the dim part of the pulse
- Speed up the breathing animation and enlarge the self ring radii
This commit is contained in:
evanpelle
2026-06-08 16:04:28 -07:00
parent 99a20ac032
commit 611560a0b2
3 changed files with 11 additions and 9 deletions
+4 -3
View File
@@ -134,10 +134,11 @@ export class WebGLFrameBuilder {
const spawnTile = p.state.spawnTile;
if (spawnTile === undefined) continue;
const isSelf = me !== null && p.smallID() === me.smallID();
// myPlayer reads as plain white so the local-player ring is visually
// distinct from any team color; everyone else uses their territory tint.
// myPlayer reads as a near-white with a faint gold/silver tint so the
// local-player ring is visually distinct from any team color; everyone
// else uses their territory tint.
const c = isSelf
? { r: 255, g: 255, b: 255 }
? { r: 248, g: 218, b: 140 }
: p.territoryColor().toRgb();
centers.push({
// spawnTile tracks the player's currently-selected spawn directly —
+3 -3
View File
@@ -286,11 +286,11 @@
"spawnOverlay": {
"highlightRadius": 9,
"highlightAlpha": 1.0,
"selfMinRad": 8,
"selfMaxRad": 24,
"selfMinRad": 10,
"selfMaxRad": 30,
"mateMinRad": 5,
"mateMaxRad": 14,
"animSpeed": 0.0035,
"animSpeed": 0.005,
"gradientInnerEdge": 0.01,
"gradientSolidEnd": 0.1
},
@@ -80,7 +80,8 @@ void main() {
float solidEnd = uGradientStops.y;
float alpha = 0.0;
if (dist < bMinR) {
// Inner glow: linear ramp from 0 at center to 1 at the ring's inner edge.
// Inner glow: transparent at the center (so your territory shows through)
// ramping up to fully solid at the ring's inner edge.
alpha = dist / max(bMinR, 0.001);
} else if (t < solidEnd) {
alpha = 1.0;
@@ -88,8 +89,8 @@ void main() {
alpha = 1.0 - (t - solidEnd) / (1.0 - solidEnd);
}
if (alpha > 0.0) {
// Opacity pulses 35% → 100% in phase with the radius.
alpha *= 0.35 + 0.65 * uBreathRadius;
// Opacity pulses 65% → 100% in phase with the radius.
alpha *= 0.65 + 0.35 * uBreathRadius;
result.rgb = mix(result.rgb, color, alpha * (1.0 - result.a));
result.a = result.a + alpha * (1.0 - result.a);
}