SkillBarHUD cooldown radial is binary (never shrinks with remaining seconds) #1081

Closed
opened 2026-08-13 13:53:34 +00:00 by spikerj · 1 comment
Owner

Where: projects/spikersoft/src/app/_components/_games/dungeon-crawler/hud/skill-bar-hud.ts — updateCooldowns().

What: Remaining cooldown is written as a seconds label (${cd}s), but the radial overlay uniform is binary:

this.cooldownMats[i].uniforms["uValue"].value = cd > 0 ? 1.0 : 0.0;

createCooldownMaterial() uses step(normalized, uValue) as a pie wipe. uValue is therefore either a full overlay or none — it never tracks remaining/max, so a 3s-remaining spell looks identical to a 1s-remaining spell. SpellSlot also has no max-duration field, so the HUD cannot compute a ratio today.

Expected: uValue should be remaining/max (or 1 - remaining/max) so the pie shrinks as the cooldown ticks, matching the seconds label.

Found by Wave 8 a2 coverage tests.

**Where:** `projects/spikersoft/src/app/_components/_games/dungeon-crawler/hud/skill-bar-hud.ts` — `updateCooldowns()`. **What:** Remaining cooldown is written as a seconds label (`${cd}s`), but the radial overlay uniform is binary: ```ts this.cooldownMats[i].uniforms["uValue"].value = cd > 0 ? 1.0 : 0.0; ``` `createCooldownMaterial()` uses `step(normalized, uValue)` as a pie wipe. `uValue` is therefore either a full overlay or none — it never tracks remaining/max, so a 3s-remaining spell looks identical to a 1s-remaining spell. `SpellSlot` also has no max-duration field, so the HUD cannot compute a ratio today. **Expected:** `uValue` should be remaining/max (or 1 - remaining/max) so the pie shrinks as the cooldown ticks, matching the seconds label. Found by Wave 8 a2 coverage tests.
Author
Owner

Resolved in spikersoft-angular PR #819 (merged to master). SkillBarHUD cooldown radial shrinks with remaining seconds. Closing.

Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). SkillBarHUD cooldown radial shrinks with remaining seconds. Closing.
Sign in to join this conversation.