Skip to main content

Module mark

Module mark 

Source
Expand description

What gets crystallised, and the snap of the simulation that does it.

A mark is a shape for the external field to pull the lattice towards — the “did.bot” wordmark for the logo, a “d” cut out of a disc for the icons, a plain disc for the tiles too small to hold a letter — plus the lattice size and RNG seed that together make one particular run of the anneal. Given those, the finished lattice is a pure function: the same mark always crystallises into the same spins.

Structs§

Lattice
A finished lattice: one bit a site, row major.
Mark
One mark: a shape, the lattice it is annealed on, and the seed.
Rect
A rectangle of lattice sites.

Enums§

Shape
What shape the field pulls the lattice towards.
Specks
Whether a mark carries the signature specks.

Constants§

ALL
Every mark, for the tests that hold all of them to the same bar.
BADGE
The icon: a “d” cut out of a disc, with the three specks in the ring around it — one mark for every tile from 64 pixels up, painted square or round from the same lattice, since the square version already fits inside the circle a round frame crops to (see SAFE_RADIUS).
BADGE_48
BADGE on the 48-site tile: the same proportions, for the one size that is not a whole multiple of 64.
BANNER
The wordmark again on a wider, shorter lattice, for the social card: 200x105 is what 1200x630 divides into at six pixels a site.
DOT
The bottom of the ladder: the dot, on a lattice of its own, painted at one and two pixels a site for the 16 and 32 pixel tiles.
SAFE_RADIUS
Everything an icon draws stays inside this radius, as a fraction of the tile’s width — the tile’s own inscribed circle, less a hair.
SPECK_DIRECTIONS 🔒
The three specks’ directions from the centre, taken from where the first anneal happened to leave them on the 16-site tile, as unit-ish vectors in screen coordinates (y down).
SPECK_ORBIT 🔒
How far out the specks sit, as a fraction of the tile’s width.
SPECK_RADIUS 🔒
A speck’s field island, as a fraction of the tile.
WORDMARK
The landing page’s own lattice: 220x160, seed 11 — the numbers in site/src/config/anim.ts, which is why this image and the page agree.

Functions§

paint_disc 🔒
Lights every site of mask within radius of centre.