ScoreDisplay
Animated score counter that interpolates toward the desired value.
ScoreDisplay
Animated score counter that interpolates toward the desired value.
Examples
const display = new ScoreDisplay({ prefix: "Coins " });
hud.append(display.element);
display.setScore(1200);Members
setScore
setScore(value: number): voidAnimates the UI toward the provided score.
element
element: HTMLDivElementDOM node for the label. Append this to your HUD.