ink
The paint every screen in ANVIL CROWN is made of: the palette resolved to CSS strings, the three type faces, the responsive metrics that keep the HUD hugging the playfield instead of the window, the box primitives, the surface treatments and the motion presets. It reads no gamepl…
ink — the interface's materials
The paint every screen in ANVIL CROWN is made of: the palette resolved to CSS strings, the three type faces, the responsive metrics that keep the HUD hugging the playfield instead of the window, the box primitives, the surface treatments and the motion presets. It reads no gameplay state.
local Ink = require("game.interface.ink")
Colour
Ink.C is A.K.PALETTE pre-resolved to #rrggbb. Ink.a(name, alpha) is
the same entry as rgba(). Ink.mix(a, b, t) blends two palette entries.
Ink.heatColour(t)— the cannon's bar at fractiont, cold blue → warning yellow → hot orange. It goes by way of yellow because a direct blend of cyan and orange passes through grey, and the bar has to keep climbing in colour exactly where the player is watching it.Ink.hullColour(t)— the hull at fractiontremaining.
Type
Ink.F carries the four faces named in A.K.TYPE: display (Anton),
stamp (Archivo Black), mono (Berkeley Mono), read (Arimo). A style asks
for the family name, so these are the last segment of the asset ref.
Metrics
Ink.metrics() measures the tall frame in screen points:
| Field | What it is |
|---|---|
W, H | the UI canvas |
pxu | points per world unit — H / 32, because the camera always shows 32 units of shaft |
playHalf | half the playfield in points: the shaft wall at world x = ±9 |
centerX, margin | the shaft's centre, and the storm to spare either side of it |
flank, colW, pad | the HUD column, its widest plate, the breathing room |
outside | whether the columns fit beside the playfield or must sit inside it |
leftX, rightX, leftAlign, rightAlign | where each column stands and which way its plates grow |
u | the type scale; Ink.pt(m, n) puts a design point into it |
cardW | how wide a centred card may be |
On a portrait window the columns sit just inside the shaft walls. On a wider one there is storm to spare beside the playfield and they step out into it, so nothing ever covers the fight.
Primitives and surfaces
Ink.label / Ink.para / Ink.svg / Ink.col / Ink.row / Ink.gap build
nodes; Ink.at places one absolutely; Ink.merge folds two style tables.
Ink.plate is the instrument surface, Ink.card the frosted one, Ink.scrim
the veil a card sits on, and Ink.bracket / Ink.rule / Ink.stencil the
furniture. Ink.button is the one button shape the whole game uses.
Motion
Ink.rise and Ink.fade are entrances (stagger the delay and siblings
cascade); Ink.strike lands a display word; Ink.breathe, Ink.glowLoop and
Ink.strobe are idles; Ink.toast is in-hold-out.
Scoped to this part · feeds back into the world's score.