[eric] canvas: fullscreen glides straight to the zone, shell wash renders identically to the canvas wash (grain seam class dead), grain hook survives two consumers, tool-ui repairs learn agent id aliases and array rows

This commit is contained in:
ciregenz
2026-08-06 12:22:00 -07:00
parent 0f4226dfef
commit 5221540e17
4 changed files with 47 additions and 11 deletions
@@ -32,7 +32,9 @@ export function useGrainTileUrl(opacity: number): string | null {
} else {
const img = sourceImage ?? new Image();
sourceImage = img;
img.onload = () => bake(img);
// addEventListener, never onload=: with two consumers (shell + canvas) the second onload
// assignment silently erased the first, and that instance stayed grainless forever.
img.addEventListener('load', () => bake(img), { once: true });
if (!img.src) img.src = './grain-texture.png';
if (img.complete && img.naturalWidth > 0) bake(img);
}