heraldic
v0.3.0
Published
Générateur procédural de blasons ASCII/braille en CLI — même texte, même famille visuelle, variante différente à chaque tirage.
Readme
heraldic
One word, one blazon. Not carved in stone — carved into the text: the signature (symmetry, palette, density) is fixed by what you type, but every invocation redistributes the particles differently. Same seal, never the same imprint twice.
Braille-glyph rendering, cold colors #6B7EC4 / #8A9AD4, black
background. No frame, no outline — the blazon floats in the terminal like
an artifact decoded live.
How it works
The text is hashed (hashString) to seed a first deterministic
pseudo-random stream (mulberry32) that derives the blazon's family:
symmetry type (axial, or radial k=3/4/6/8), palette bias, density band.
This stream depends only on the text — fixed for a given word.
Each generation also draws a fresh random entropy
(crypto.randomBytes), XORed with the text hash to form the final seed.
That seed drives a second mulberry32 stream that places the particle
clusters and their scatter — this is the stream that varies on every draw,
not the first one. Result: same text → same visual family, different
entropy → different variant within that family.
(text, entropy) fixed → strictly reproducible grid (guaranteed by
node --test). /reroll just draws a new entropy for the current text,
without retyping it.
Full pipeline: hash → family parameters → particles → dot field → braille raster → structural overlay → colorize.
Installation
npm install -g heraldicUsage
heraldic:~$ chateau
[colored braille grid]
SEED 0x4F2A91C3 REV 2.6 UNIT/D-01
heraldic:~$ /reroll
[new variant, same family, new SEED]
heraldic:~$ /export png
écrit: chateau.png
heraldic:~$ /help
commandes disponibles :
<texte> génère un blason à partir du texte
/reroll nouveau tirage du même texte
/export <fmt> exporte le dernier blason (fmt: png, png-story, mp4, mp4-story, txt, ans, svg)
/clear vide l’écran
/quit quitte le programme
/help affiche cette liste(the CLI's own output stays in French — that's what you'll actually see)
Video export
The mp4 and mp4-story formats render the decode animation to MP4 video.
This requires the ffmpeg system binary — install with brew install ffmpeg
(macOS) or apt install ffmpeg (Linux/Debian).
Supported export formats:
png: single frame PNG (1080×1377)png-story: tall story-format PNG (1080×1920) — same 1080×1377 render aspng, letterboxed (centered, black margins top/bottom) rather than stretchedpng-clean: motif only, no decorative frame, no SEED metadata line (1080×1350)png-clean-story:png-cleanrender (1080×1350), letterboxed in a 1080×1920 canvasmp4: video with decode animation (1080×1376, 30fps, ~2.2s) — height rounds down for H.264/yuv420p even-dimension requirementmp4-story: tall video with decode animation (1080×1920, 30fps, ~2.2s) — same letterbox treatment aspng-storymp4-clean: motif-only video, no frame, no SEED line (1080×1350, already even — no H.264 rounding)mp4-clean-story:mp4-cleanrender, letterboxed in a 1080×1920 canvastxt: plain textans: ANSI colored textsvg: scalable vector
Local development
cd cli
npm install
npm linkTests
npm test