Skip to content

refactor(webgl): remove dead tunnel layer + unused GLSL utils#27

Merged
arzafran merged 1 commit into
mainfrom
chore/webgl-dead-code
Jun 24, 2026
Merged

refactor(webgl): remove dead tunnel layer + unused GLSL utils#27
arzafran merged 1 commit into
mainfrom
chore/webgl-dead-code

Conversation

@arzafran

Copy link
Copy Markdown
Member

What this does

A /zero-tech-debt pass on lib/webgl: removes plumbing that came from the satus starter / gpu-dithering prototype but is unused by the shipped tool. Behavior is identical — the dithering canvas renders exactly as before.

Summary

  • Drop the tunnel layer + tunnel-rat dep. Both WebGLTunnel and DOMTunnel rendered .Out with no .In anywhere — in spargo, <Content/> renders directly inside <Canvas>, so the tunnels, CanvasContext, and useCanvas were vestigial (satus used .In to inject WebGL from <Hero>, which we deleted). tunnel-rat is now only a transitive dep of drei.
  • Delete lib/webgl/utils/noise.ts + glsl.ts — exported NOISE / MAP_RANGE, imported nowhere.
  • Trim BLEND.SOFT_LIGHT — only BLEND.NORMAL is used by the dithering shader.
  • Drop the RAF render prop — always defaulted true, never passed false.

Test Plan

  • bun run build green
  • tsc --noEmit clean
  • biome check clean (one pre-existing intentional effect-dep warning)
  • Verified in-browser: canvas renders identically (red-dithered hero, full control panel)

…ech-debt)

Carried over from the satus starter / gpu-dithering prototype, never used by the
shipped tool:
- tunnel-rat + CanvasContext/useCanvas: both tunnels rendered .Out with no .In
  anywhere (Content renders directly inside <Canvas>). Dropped the dep, the
  hook, and the context provider.
- lib/webgl/utils/noise.ts + glsl.ts: exported NOISE / MAP_RANGE, imported
  nowhere.
- BLEND.SOFT_LIGHT: only BLEND.NORMAL is used.
- RAF 'render' prop: always defaulted true, never passed.

Behavior-preserving; verified render is identical.
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gpu-dithering Ready Ready Preview Jun 24, 2026 12:57pm
spargo Ready Ready Preview, Comment Jun 24, 2026 12:57pm

@arzafran arzafran merged commit d15459f into main Jun 24, 2026
8 checks passed
@arzafran arzafran deleted the chore/webgl-dead-code branch June 24, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant