# XWUIGameSpeedometer

Speed gauge with two display styles. In `conf_comp.style: 'analog'` it draws an SVG arc gauge with a needle; in `'digital'` it shows an LCD-style numeric readout. The current `speed` drives the display and `redline` marks the danger threshold; `maxSpeed` sets the gauge ceiling and `unit` switches between `mph` and `kph`. Push updates with `setSpeed(speed)` or the broader `updateData({ speed, redline })`.

Both update paths patch in place. The SVG is parsed once at mount and an update writes only the arc geometry, the needle endpoint and the readout text, so a HUD can drive this per frame without re-parsing markup. The root is a `meter` and carries `aria-valuemin`, `aria-valuemax`, `aria-valuenow` and `aria-valuetext`, and the readout sits in a polite live region. A `speed` above `maxSpeed` pins the needle and the arc at full scale and adds `xwui-speedometer--over`, so an overspeed reads as an overspeed instead of wrapping past the dial; a non-finite `speed` rests the needle at zero, blanks the readout to `---` and drops `aria-valuenow`. Dial colours and stroke widths live in the stylesheet.

## Basic Usage

Mounts the speedometer in its default analog arc-gauge style.

```example
file: examples/BasicUsage.ts
html: examples/BasicUsage.html
title: Basic Usage
description: Mounts the speedometer as an analog SVG arc gauge with a needle reading current speed.
```

## Digital KPH

Switches to the LCD-style digital readout and displays kph instead of an arc gauge.

```example
file: examples/DigitalKph.ts
html: examples/DigitalKph.html
title: Digital KPH
description: The speedometer in digital style showing a numeric LCD panel and fill bar in kph.
```

## Redline Warning

Drives the speed past the redline so the needle and arc flip to the danger color, then climbs higher via setSpeed.

```example
file: examples/RedlineWarning.ts
html: examples/RedlineWarning.html
title: Redline Warning
description: An analog gauge with speed above redline, rendering red, then nudged higher with setSpeed().
```

```api
```
