ContributorMural::Renderer
Inherits Reference < Object
Turns embedded users into an SVG document. Styles implement defs (shared
clip paths, emitted once), block_size, and draw_block (one section of
users at a vertical offset); the base class stacks sections with optional
group titles and handles theming. In auto mode text and background get
CSS classes plus a prefers-color-scheme media query so the SVG follows the
viewer's theme (GitHub included); static modes inline the fills, which
keeps rasterizers happy. PNG output builds on the static path.
Constants
Constructors
Class methods
Styles that can honour a per-user scale: the ones that already derive
a size per user, where an override is exact. The fixed lattices (grid,
honeycomb, stencil, metro) have nowhere to put an avatar larger than its
cell without overlapping a neighbour or leaving a hole, and voronoi sizes
cells by cutting the block up rather than by placing a shape — those
ignore scale rather than approximate it. Skyline honours it in the one
dimension it is free in: the emphasised tower grows taller, not wider.
Pebble sizes its disc before anything is placed and the pack pushes the
neighbours aside, so the multiplier lands exactly.
Instance methods
Pixel size at which to fetch this user's avatar (2x render size for crisp display on high-DPI screens).
Document size of the most recent render, so a caller can report the
dimensions it just wrote without parsing the SVG back.
Called with the full user list before avatars are fetched, so renderers with relative sizing (mosaic tiers) can precompute per-user sizes.
Single-section convenience (specs, simple callers).