game/ui/hud.module — what the operator reads while they work.
The order card pinned top right: a piece of paper with the docket printed
on it, ticking up as cuts land. The RPM gauge bottom centre: a chipped
safety-orange arc with a red heat needle, lit up to the engine's revs and
flushing red while it is stalled. And the controls strip that prints the
first time the shift begins. Builds widget trees; GameHud registers them.
paintedRuns( ) → void
The painted arc, with lengths of chipped-off enamel taken out of it. The
chips are seam-split so the bright lit arc and the dim rest agree.
runsPath(runs: ?, lo: ?, hi: ?, radius: ?) → void
The `d` of one path carrying every painted run, clipped to [lo, hi].
One path with many subpaths renders far cheaper than a polyline each.
| arg | type | description |
|---|
| runs | ? | |
| lo | ? | |
| hi | ? | |
| radius | ? | |
arcPath(runs: ?, lo: ?, hi: ?, color: ?, width: ?, opacity: ?) → void
| arg | type | description |
|---|
| runs | ? | |
| lo | ? | |
| hi | ? | |
| color | ? | |
| width | ? | |
| opacity | ? | |
ticksPath(major: ?, radiusIn: ?, radiusOut: ?, color: ?, width: ?) → void
Every tick as one path, in the two weights it is struck in.
| arg | type | description |
|---|
| major | ? | |
| radiusIn | ? | |
| radiusOut | ? | |
| color | ? | |
| width | ? | |
numberAt(t: ?, value: ?, fill: ?, size: ?) → void
| arg | type | description |
|---|
| t | ? | |
| value | ? | |
| fill | ? | |
| size | ? | |
gaugeBase(s: ?) → void
The static half of the dial: the backing, the unlit arc, the ticks, the
figures and the thermometer's shell.
gaugeLive(state: ?, s: ?) → void
The live half: the arc lit up to the engine's revs, the needle sitting at
them, and how hot it has got.
| arg | type | description |
|---|
| state | ? | |
| s | ? | |
poly(width: ?, color: ?, opacity: ?, scaleTip: ?) → void
| arg | type | description |
|---|
| width | ? | |
| color | ? | |
| opacity | ? | |
| scaleTip | ? | |
gaugeFrame(children: ?, s: ?) → void
The whole gauge, as a screen tree. Rebuilt every frame from Shift.state.
The gauge is drawn in two layers: the dial (registered once, re-registered
only when the canvas changes) and the live overlay (needle, lit arc, heat),
so the HUD does not re-rasterise the whole instrument every frame.
| arg | type | description |
|---|
| children | ? | |
| s | ? | |
gaugeBaseScreen(s: ?) → void
stalledLabel(state: ?, s: ?) → void
| arg | type | description |
|---|
| state | ? | |
| s | ? | |
gaugeLiveScreen(state: ?, s: ?) → void
| arg | type | description |
|---|
| state | ? | |
| s | ? | |
gauge(state: ?, s: ?) → void
Both layers at once, for a still of the whole instrument.
| arg | type | description |
|---|
| state | ? | |
| s | ? | |
docketRow(label: ?, value: ?, s: ?, strong: ?) → void
| arg | type | description |
|---|
| label | ? | |
| value | ? | |
| s | ? | |
| strong | ? | |
tickRow(cuts: ?, target: ?, s: ?) → void
| arg | type | description |
|---|
| cuts | ? | |
| target | ? | |
| s | ? | |
paperWear(s: ?, w: ?, h: ?) → void
The paper's own wear: a fold, a few age spots, a soft shadow at the edges.
| arg | type | description |
|---|
| s | ? | |
| w | ? | |
| h | ? | |
order(state: ?, s: ?) → void
| arg | type | description |
|---|
| state | ? | |
| s | ? | |
stripItem(keys: ?, label: ?, s: ?) → void
| arg | type | description |
|---|
| keys | ? | |
| label | ? | |
| s | ? | |
controls(alpha: ?, s: ?) → void
The strip that prints the controls the first time the shift begins.
| arg | type | description |
|---|
| alpha | ? | |
| s | ? | |