Pulse spawn ring white→team color for self in team games

In team games the local player's spawn breathing ring now pulses
white→own team color (matching teammates' rings) instead of
white→gold. Gold pulse is unchanged for teamless games (singleplayer/FFA).
Self ring stays larger than teammates' via existing self/mate radii.
This commit is contained in:
evanpelle
2026-06-12 16:05:04 -07:00
parent 81c5fcfb16
commit 4149b3e4cb
2 changed files with 13 additions and 10 deletions
@@ -151,11 +151,12 @@ export class SpawnOverlayPass {
dataA[i * 4 + 0] = c.x;
dataA[i * 4 + 1] = c.y;
if (c.isSelf) {
// Self ring pulses white (1,1,1) → gold (1,0.84,0) in phase with the
// breath so one end of the pulse always contrasts with the terrain.
dataA[i * 4 + 2] = 1;
dataA[i * 4 + 3] = 1 - 0.16 * breathRadius;
dataB[i * 4 + 0] = 1 - breathRadius;
// Self ring pulses white (1,1,1) → its center color (gold when
// teamless, team color in team games) in phase with the breath so
// one end of the pulse always contrasts with the terrain.
dataA[i * 4 + 2] = 1 - (1 - c.r) * breathRadius;
dataA[i * 4 + 3] = 1 - (1 - c.g) * breathRadius;
dataB[i * 4 + 0] = 1 - (1 - c.b) * breathRadius;
} else {
dataA[i * 4 + 2] = c.r;
dataA[i * 4 + 3] = c.g;