Clear the dataviz.tsx comment grandfathering: 45 blocks, and the renderer's reasoning becomes three docs #83

Closed
opened 2026-08-14 03:04:07 +00:00 by coilyco-ops · 0 comments
Member

Second tranche of #78, and the first of the two "real project" files it names.

What moved where

45 over-long comment blocks in src/js/lib/dataviz.tsx, longest 14 lines. Compressed to the two-line cap with the reasoning relocated rather than deleted - the rule's own remedy. Three new docs, because docs/rendering.md was already at 2689 chars against a 4000 cap and could not absorb it:

  • rendering-fades.md - why stars and gas fade at different radii, the vignette, and the lens: the radial-annuli approximation, why the region is cleared and re-laid, and why a negative scale is the inverted inner image.
  • rendering-gas.md - sprites, hue-follows-radiation, screen-space blocks, dust, and the opaque base. Keeps the finding that grid resolution used to act as an exposure control.
  • rendering-stars.md - color and alpha quantization, the (color, alpha) batching that turns ~10k draws into a few hundred, the three brightness tiers, association glow, and the four transients.

docs/rendering.md gains links to all three.

Note on what survives compression

The blocks that compressed cleanly are the ones whose claim fits in two lines. The ones that did not are all of the same kind - a decision plus the failure mode it prevents - and those are exactly what the docs now carry. A comment that says "coherent dust only" without "isolated dense blocks stamping dark specks was the failure mode" is a rule with its reason amputated, so the reason moved rather than dying.

Done when

  • src/js/lib/dataviz.tsx gone from the pyproject.toml code-comments excludes.
  • ward exec precommit green, ward exec check-js green.
Second tranche of #78, and the first of the two "real project" files it names. ## What moved where 45 over-long comment blocks in `src/js/lib/dataviz.tsx`, longest 14 lines. Compressed to the two-line cap with the reasoning relocated rather than deleted - the rule's own remedy. Three new docs, because `docs/rendering.md` was already at 2689 chars against a 4000 cap and could not absorb it: * [`rendering-fades.md`](../src/branch/main/docs/rendering-fades.md) - why stars and gas fade at different radii, the vignette, and the lens: the radial-annuli approximation, why the region is cleared and re-laid, and why a negative scale is the inverted inner image. * [`rendering-gas.md`](../src/branch/main/docs/rendering-gas.md) - sprites, hue-follows-radiation, screen-space blocks, dust, and the opaque base. Keeps the finding that grid resolution used to act as an exposure control. * [`rendering-stars.md`](../src/branch/main/docs/rendering-stars.md) - color and alpha quantization, the (color, alpha) batching that turns ~10k draws into a few hundred, the three brightness tiers, association glow, and the four transients. `docs/rendering.md` gains links to all three. ## Note on what survives compression The blocks that compressed cleanly are the ones whose claim fits in two lines. The ones that did not are all of the same kind - a decision plus the failure mode it prevents - and those are exactly what the docs now carry. A comment that says "coherent dust only" without "isolated dense blocks stamping dark specks was the failure mode" is a rule with its reason amputated, so the reason moved rather than dying. ## Done when - [x] `src/js/lib/dataviz.tsx` gone from the `pyproject.toml` code-comments excludes. - [x] `ward exec precommit` green, `ward exec check-js` green.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/galaxy-gen#83
No description provided.