Skip to main content

Crate didbot_brand

Crate didbot_brand 

Source
Expand description

The did.bot brand images, rebuilt from the simulation that draws the landing page.

Every file this crate writes — the wordmark, the social card, the whole icon set, the favicon — is a snap of the same 2-D Ising anneal crates/didbot-site-anim runs in the browser, stopped at the end of its schedule. Nothing is traced, redrawn, or exported from a design tool, so there is no second copy of the mark to keep in step with the page: change the schedule and rebuild, and the images change with it.

§Rebuilding

scripts/build-brand.sh          # rewrite site/public
scripts/build-brand.sh --check  # fail if anything is stale

Both run this crate’s render example, which is what the generator is: a program run from a checkout to refresh committed files, never one anybody installs. The --check form is what CI runs, and it is the reason the images are committed at all: the tree is allowed to hold generated files as long as something proves they are the ones the generator produces.

§Icons, and what “the same noise” means

An icon is not the wordmark shrunk. It is a size ladder of marks — a “d” cut out of a disc from 48 sites up, the dot below that — set in the same six-glyph font, annealed on its own square lattice by the same schedule, and painted with the same two colours at the same one-block-a-site magnification. So the grain reads as the same material as the landing page at every size, without ever resampling a picture of it. mark is where the ladder is written down, and each tier’s doc comment says what fails on the tile below it. “did.bot” itself appears only on the wordmark and the social card.

Every icon also carries three mark::Specks — pinned sites the field does not decide, single pixels at 16 and irregular clumps above it.

§Determinism

An image is a pure function of its mark::Mark — no clock, no entropy, no filesystem — so building twice on one host gives identical bytes, which --check relies on. Bit-exactness across platforms is not promised, for the reason didbot-avatar gives: the Metropolis acceptance test goes through exp, and a libm is entitled to its own last bit. That is why --check is a CI gate on one platform rather than a claim about every machine.

§Pages

page draws the page a browser lands on at each step of a sign-in, around WORDMARK_SVG and FAVICON_SVG. A server needs only that, so everything else here is behind the default render feature, and the simulation with it.

Modules§

ico
The one container format a favicon still needs.
mark
What gets crystallised, and the snap of the simulation that does it.
page
The page a browser lands on at each step of a sign-in: the server’s authorize and browser pages, the operator dashboard’s sign-in, and the loopback listener a command line waits on.
paint
Turning a finished lattice into files: PNG for the raster sizes, SVG for the ones that scale.
render 🔒
Building the brand images: what each asset is, and painting it.

Structs§

Asset
One file, and everything needed to make it.
Built
A built file: where it goes, and what goes in it.

Enums§

Crop
What an asset is cropped to before it is painted.
Format
How an asset is encoded.

Constants§

ASSETS
Every brand image the site ships.
CROP_MARGIN
Sites of margin left around the wordmark in the cropped logo.
FAVICON_SVG
The tab icon, the same way.
WORDMARK_SVG
The cropped wordmark as scripts/build-brand.sh last wrote it, for a page that carries the logo inline rather than linking to the site.

Functions§

build_all
Builds every asset in ASSETS.
build_one
Builds one asset, annealing whatever marks it needs that lattices does not already hold.

Type Aliases§

Lattices
Annealed lattices, kept by mark name so a mark that feeds several assets is annealed once. That is most of the runtime: the wordmark’s lattice alone is 35,200 sites through 1,200 sweeps.