screens.art — the drawings the screens are made of.
Every screen in this game carries art rather than words alone, and all of it
is inline SVG rasterised at the element's own resolution, so a heron in the
title plate is as crisp at 520px as the same heron at 44px in a HUD pip.
Three families live here:
* creatures — the hernsew and the yowe, the two things the game is about
* ornament — the fen's furniture: stage-posts, reeds, the tide rule
* glyphs — the Hernsew script. A glyph's mark comes from the tongue
slice when it publishes one; otherwise it is DERIVED from
the glyph's id, by rule, so the same id always draws the
same mark and a written language exists on screen either way.
hernsew(opts: { [string]: any }?) → string
A young heron, side on, facing left: the folded S-neck, the dagger bill, the
long legs, the crest plume off the back of the skull. Pale plumage against a
dark fen is the whole reason the bird reads at a glance, so the fill is the
palette's `hernsew` and everything dark on it is the crest colour.
The bird. `opts.plume` / `opts.dark` override the two tones; `opts.wing`
opens the wing (the stand-aside posture) when true.
| arg | type | description |
|---|
| opts | { [string]: any }? | |
yowe(opts: { [string]: any }?) → string
A ewe, side on, facing left: dirty fleece, black face, black legs. The HUD
counts them, so it has to read at 40px as well as at 160.
One yowe. `opts.lost` draws her as an empty outline — taken by the water.
| arg | type | description |
|---|
| opts | { [string]: any }? | |
post(opts: { [string]: any }?) → string
A stage-post standing out of the water, with its lashings. Used for the
station pips up the right edge and for the title plate.
| arg | type | description |
|---|
| opts | { [string]: any }? | |
mark(kind: string, opts: { [string]: any }?) → string
A margin mark for the field notes: a small drawing of the thing a rule is
about. These are ILLUSTRATIONS, not glyphs — a rule about hearing a bird
gets a picture of the call, never a mark from a language the reader has not
been taught yet.
| arg | type | description |
|---|
| kind | string | |
| opts | { [string]: any }? | |
reeds(width: number, opts: { [string]: any }?) → string
A band of reeds — the strip that separates a header from its body.
| arg | type | description |
|---|
| width | number | |
| opts | { [string]: any }? | |
tideRule(deckFrac: number) → string
The tide rule: the ticked scale that runs beside the vertical gauge, with
the deck line called out, because the deck is the number that matters.
| arg | type | description |
|---|
| deckFrac | number | |
lantern( ) → string
The lantern — the Lingster's one bright thing, and the game's mark.
causeway(opts: { [string]: any }?) → string
The title plate's scene: the causeway receding into fog, posts to either
side, a bird on the nearest one. It sits behind the title type.
The fen at dusk. `opts.viewBox` crops it — "0 176 540 152" is the horizon
band, the strip a page wants when it has no room for the whole picture.
| arg | type | description |
|---|
| opts | { [string]: any }? | |
hashOf(s: string) → number
A glyph is a spine with marks hung off it. Which marks depends on the
glyph's id and nothing else, so the mark for "water" is the same mark every
time it appears, in the HUD, in the phrasebook and in the encounter panel.
| arg | type | description |
|---|
| s | string | |
glyph(spec: any, opts: { [string]: any }?) → string
One glyph mark, drawn to a 120 x 150 viewBox. `spec` may carry an `svg`
field (the tongue slice's own drawing, used verbatim) or just an `id`.
| arg | type | description |
|---|
| spec | any | |
| opts | { [string]: any }? | |
bit(n: number, m: number) → number
| arg | type | description |
|---|
| n | number | |
| m | number | |
argKey(v: any) → string
Each drawing above is a pure function of its arguments, and the HUD asks for
the same handful of them on every frame the tide moves. Wrapping them here
means the string handed to a widget is the SAME string frame after frame, so
its raster is reused rather than rebuilt, and the wrapper is applied once at
the bottom rather than threaded through nine function bodies.
glyphRow(specs: { any }, size: number, opts: { [string]: any }?) → void
A row of glyph nodes at `size`, from a list of glyph specs.
| arg | type | description |
|---|
| specs | { any } | |
| size | number | |
| opts | { [string]: any }? | |