Skip to content

1681-engine / ui / DrainState

Interface: DrainState ​

Defined in: src/ui/layout/barDrain.ts:5

A bar's two lengths: what it holds now (value) and the trail behind it (trail) that drains down to it after a short hold, so a hit shows how much it took. Fractions 0–1. Mutated in place: a health bar is set every frame.

Properties ​

holdMs ​

ts
holdMs: number;

Defined in: src/ui/layout/barDrain.ts:9

What is left of the hold before the trail starts to drain (ms).


trail ​

ts
trail: number;

Defined in: src/ui/layout/barDrain.ts:7


value ​

ts
value: number;

Defined in: src/ui/layout/barDrain.ts:6

Released under the MIT License.