Editable k-state reference host

k-state CA builder

Author the exact lookup table the Wasm engine runs, inspect its physical invariants, and export a standalone npm-package example.

Built with the published npm package @hexlife/embed@1.7.1 /ca + /ca-element · Wasm + WebGL2
Hexagonal by construction. Neighborhood rules expose the canonical six equidistant slots SW · NW · N · NE · SE · S. Block rules rewrite a three-cell triangle top · down-right · below, cycling a seamless three-phase partition.
Open the full coffee labs →

Live Wasm preview

booting…
Generation
0
Grid
Active chunks
Rule table

Standalone package example

The generated page uses only the published npm entrypoints. Custom transition edits are appended as table overrides.

Why two backends?

neighborhood is a dense anisotropic k⁷ table: centre plus six hex neighbours. It is capped at four states. block is a triangle rewrite, scales to sixteen states, and can arbitrate transport without creating or deleting competing particles.

Why hexagons?

All six neighbours are equidistant, so direction-independent rules inherit six-fold lattice symmetry. Direction enters only when the model asks for it—gravity in the coffee examples—not because diagonal cells are farther away.

Where host physics lives

The rule owns local transport and reactions. Initial conditions, pour schedules and cup outlets belong to the host page and call setCells or setCell, which wakes the engine's exact chunk-activity tracker.