HealthBar
Lightweight DOM health bar that animates width updates.
HealthBar
Lightweight DOM health bar that animates width updates.
Examples
const bar = new HealthBar({ maxValue: 200 });
document.body.appendChild(bar.element);
bar.setValue(150);Members
setValue
setValue(value: number): voidSets the current value and updates the DOM representation.
element
element: HTMLDivElementRoot DOM element you can insert anywhere in your HUD.