mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-27 20:14:49 +02:00
[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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user