From f3a4d09f0ba16c9c2d06dfb128a469c7dc093ebd Mon Sep 17 00:00:00 2001 From: Matthew Meszaros Date: Wed, 2 Sep 2026 08:46:01 -0700 Subject: [PATCH] feat: release the grain frame's shader mount through dispose(), the method ShaderMount actually exposes, so the WebGL context and canvas are really freed when a frame scrolls out of range instead of throwing on a missing disconnect() and leaking every context --- site/src/components/GrainBackdrop.astro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/src/components/GrainBackdrop.astro b/site/src/components/GrainBackdrop.astro index d1aec09e..f3bb1eb7 100644 --- a/site/src/components/GrainBackdrop.astro +++ b/site/src/components/GrainBackdrop.astro @@ -122,8 +122,8 @@ const t = GRAIN_TONES[tone]; } // Frees the GL context and its canvas; the CSS gradient stays underneath. function unmount(el: HTMLElement) { - const m = (el as HTMLElement & { paperShaderMount?: { disconnect: () => void } }).paperShaderMount; - if (m) m.disconnect(); + const m = (el as HTMLElement & { paperShaderMount?: { dispose: () => void } }).paperShaderMount; + if (m) m.dispose(); delete el.dataset.grainReady; }