wyattowalsh docs

World State

Shared environmental semantics that keep the six living-art generators in sync.

Module

WorldState lives in scripts/art/shared.py and is computed by compute_world_state(metrics).

Purpose

The living-art suite uses one shared environmental model so the six generators feel like different lenses on the same portfolio state instead of unrelated visualizations. A profile with late-night commit bursts, rising stars, and active merged PRs should read as the same moment whether you look at the garden, the map, the automata colony, or the ferrofluid pool.

Fields

FieldValuesDerived fromWhat it affects
time_of_daydawn, day, golden, nightPeak commit hour from commit_hour_distributionLighting, sky tone, hillshade, glow timing
weatherclear, cloudy, rainy, stormyOpen-to-closed issue ratioFog, rain, storm overlays, environmental tension
seasonspring, summer, autumn, winterDominant language family weightingPalette family and biome or flora bias
energy0.0–1.0star_velocity.recent_rateAccent strength, field intensity, motion pressure
vitality0.0–1.0contribution_streaksGrowth, persistence, and liveliness cues
aurora_intensity0.0–1.0recent_merged_prs countAurora bands, special-event glow, celebratory accents
palettedict[str, str]Derived from all of the aboveShared sky, ground, accent, and glow colors

Derivation rules

compute_world_state(metrics) is intentionally conservative when data is sparse:

  • Missing commit-hour data falls back to a calm daytime scene.
  • Missing issue signals default to clear weather.
  • Unknown languages collapse toward a summer palette rather than failing.
  • Sparse streak or star-velocity data yields medium energy instead of a broken scene.

That keeps the renderers stable even when the GitHub API returns partial data.

Generator usage

GeneratorWorld-state use
Ink GardenLighting, weather overlays, ecosystem intensity, and palette family
TopographyHillshade direction, fog, weather indicators, and biome tint
Genetic LandscapeTerrain elevation scale, mutation rate, and adaptive-peak palette
PhysarumNutrient diffusion rate, trail decay, and network-glow intensity
LeniaGrowth kernel amplitude, color-channel mapping, and time-step scale
FerrofluidMagnetic field strength, spike density, and metallic-sheen palette

Contrast guardrails

scripts/art/shared.py also exposes wcag_contrast_ratio() and ensure_contrast(). Those helpers exist because richer low-light scenes are only useful if labels and highlights remain readable against dark backgrounds.

World state is shared, not identical rendering

The same WorldState drives every living-art generator, but each renderer expresses it differently. A stormy night may become foggy ridges in Topography, denser canopies in Ink Garden, accelerated mutation in Genetic Landscape, thicker Physarum trails, faster Lenia growth kernels, or taller Ferrofluid spikes.