Skip to content

feat: three new styles — constellation, skyline, and metro - #22

Merged
hahwul merged 1 commit into
mainfrom
hahwul/add-two-artistic-mural
Aug 1, 2026
Merged

feat: three new styles — constellation, skyline, and metro#22
hahwul merged 1 commit into
mainfrom
hahwul/add-two-artistic-mural

Conversation

@hahwul

@hahwul hahwul commented Aug 1, 2026

Copy link
Copy Markdown
Member

What

Three new renderers join the seven existing styles:

  • constellation — a night sky. Rank sets each star's size and glow (spiral's power taper), stars sit on a hash-jittered lattice with shuffled cell assignment (provably ≥ gap apart for any config/scale), near neighbours join into constellations via a pruned Prim spanning tree, and two depths of deterministic dust fill the dark. Glow is a shared radial gradient — no SVG filters, so the PNG path is safe.
  • skyline — a city. Building height comes from a dense rank over distinct weights (outlier-proof), pinned to max_height at the top and hash-spread when everyone is equal. Each building draws one of six roof silhouettes, a wall inset, and a glazing (square/ribbon, hash-lit panes) from a position-seeded lottery — random to the eye, exact to the golden files. The section's tallest tower gets the antenna.
  • metro — a transit map. Stations on a route that snakes across the wall with rounded 180° turns; each section is a line in its own colour (8-colour cycle that holds contrast on light and dark), with heavier terminus rings at both ends. role_lines: true splits a section into one line per role, named after it — and weave: true interleaves those lines' rows so the routes genuinely cross, with every vertical rail landing midway between station columns so a crossing can never touch a ring (validated: gap ≥ 2.5 × line_width).

constellation and skyline honour per-user scale (skyline in height only — the lattice stays true); metro ignores it like the other fixed lattices.

Review fixes folded in

A 10-finding adversarial review ran against this diff; nine are fixed here:

  • a sparse sky (fewer people than lattice columns) no longer scatters stars past its own document
  • metro sizes its document for role-line titles and the weave legend
  • the turn margin funds the route's stroke width, so loops are no longer shaved at the canvas edge
  • the station pitch funds a terminus ring on both sides, keeping gap the ring clearance it is documented to be
  • woven rails clear station name labels (pitch widens under long names)
  • the weave stagger cedes one more column per round, so line i+3 can't land its rails on line i's exact x
  • the stale (mosaic, spiral, orbit) scale comment in the config schema
  • the four copies of the golden-critical hash mixers are hoisted into the base Renderer
  • skyline's wrap pitch derives from 2 * PAD instead of a bare 12

The tenth (O(n²) MST at ~5000+ stars) is deferred: the pipeline embeds every avatar as base64, so walls that size are bounded by fetch and file size long before this term shows up.

Docs / tests

  • Per-style README sections with option tables, scale table, full config reference, CHANGELOG; showcase heroes regenerated (examples/{constellation,skyline,metro}.svg)
  • 3 new spec files (goldens + property specs: no-overlap under extreme configs, height monotonicity, serpentine reversal, weave interleaving/crossing coordinates, validation refusals), and the cross-style hostile-name / list-order suites now cover all ten styles
  • just check clean, 297 examples pass under --order=random

constellation draws a night sky: rank sets each star's size and glow,
near neighbours join into constellations over a pruned spanning tree,
and two depths of hash-scattered dust fill the dark between them.
skyline draws a city: weight sets each building's height through a
dense rank over distinct weights, the avatar rides the roofline, and
each building draws its roof silhouette, wall width, and glazing from
a deterministic lottery. metro draws a transit map: stations on a
route that snakes across the wall, one line per section — or one per
role with `role_lines`, and `weave` interleaves those lines' rows so
the routes cross one another like a real network, with every rail
landing midway between station columns so no crossing touches a ring.

constellation and skyline honour per-user `scale` (skyline in height);
metro is a fixed lattice and ignores it. The shared hash-noise mixers
now live once in the base renderer instead of per style.

Review fixes folded in: a sparse constellation no longer scatters
stars past its own document, metro sizes its document for role titles
and the weave legend, the turn margin funds the stroke it draws, the
station pitch funds a terminus ring on both sides, woven rails clear
station labels, and the weave stagger no longer repeats verbatim
every third line.
@hahwul
hahwul merged commit 33c5e1f into main Aug 1, 2026
3 checks passed
@hahwul
hahwul deleted the hahwul/add-two-artistic-mural branch August 1, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant