class

ContributorMural::Renderers::Constellation

Inherits ContributorMural::Renderer < Reference < Object

A night sky: every contributor is a star whose size and glow follow their rank, near neighbours join up into constellations, and a scatter of tiny dust stars fills the dark between them. Placement is a hash-jittered lattice — the cells are disjoint, so however the jitter lands no star can touch another — with the occupied cells themselves picked by hash, which is what makes the sky read as scattered rather than ruled.

Constants

CLIP_ID = "star-clip"
DUST_CAP = 1500

Hard ceiling on dust per section, so a wall of hundreds cannot swell the file with thousands of circles.

DUST_CLEARANCE = 3.0

Dust never comes closer to an avatar's rim than this.

GLOW_ID = "star-glow"
HALO_MAX = 1.8
HALO_MIN = 1.3

Halo radius as a multiple of the star's own: the tail glows a little past its rim, the top of the ranking half again as far. The canvas padding is derived from HALO_MAX, so the brightest halo just fits.

LINE_INSET = 4.0

How far a line stops short of the rim it points at.

LINE_MIN = 8.0

A trimmed stub shorter than this reads as a speck, not a line.

LINE_REACH = 2.4

Longest constellation edge kept, in cell pitches. The spanning tree connects everything; pruning it back to its short edges is what breaks the sky into separate constellations instead of one long snake.

Instance methods

fetch_size(user : ResolvedUser) : Int32

Pixel size at which to fetch this user's avatar (2x render size for crisp display on high-DPI screens).

Source
prepare(users : Array(ResolvedUser)) : Nil

Rank drives size and glow exactly like the spiral's taper: a power curve below 1 drops quickly among the leaders and then runs nearly flat, so the long tail stays a uniform field of faint stars.

Source