display
:EXPERIMENT: tool.display
A grid of w by h cells, each showing one of 16 palette entries. The
page is a sink: it draws the frames it receives and renders nothing
until a source holds its lease, so what you see above is the empty
geometry of the selected preset. Query parameters select a preset and
override its fields one at a time; a value outside its domain is
rejected with an error naming the parameter, not clamped. An explicit
w or h fixes the grid; otherwise a relay's caps may resize it.
Frames are pal16 (one byte per cell) or hex (one text line per
row); the sink never quantizes. A source on this page needs no socket:
window.display.send(frame) with a Uint8Array of w*h indices, or
postMessage({frame}) from another window, folds through the same
reduction. The full
contract, including the wire protocol and the numeric limits, is in
the spec (v0.2.3). The core is
wal-sh.tools.display.core; build with gmake tools-cljs and debug in
isolation with gmake dev-tool TOOL=display.
Examples:
?d=green-building: 9 by 17, the Building 54 facade?d=hub75: 64 by 32 at 60 fps, the HUB75 panel?w=16&h=16&gap=0.3: an explicit, fixed geometry on the cga40 palette and aspect?d=tetris&px=14: the Tetris field at 14 CSS px per cell instead of fit-to-width?d=blinkenlights: 18 by 8, the Haus des Lehrers facade, lamps on or off?d=arcade: 20 by 26, the Bibliotheque nationale facade in 8 grey levels?d=blinkenlights&demo=life: a built-in source on the facade, no driver needed; the picker under the grid switches demos without a reload?d=cga: a rejected preset name, so the error element instead of a grid
See experiments: this tool ships behind tool.display.