wtc-gl ScrollRenderer Landing Page
A marketing page for the wtc-gl WebGL2 library, built on its real ScrollRenderer recipe: a single fixed canvas renders a distinct fragment-shader scene per scroll section, scissor-tested to that section's own bounds every frame — a plasma-tunnel hero, an animated voronoi-cell feature panel, and a layered wave-flow showcase.
Ship scroll-reactive
WebGL, section by section.
A lightweight ES6 WebGL2 library with a built-in ScrollRendererrecipe: register a shader scene per DOM element and it renders scissor-tested to that element's exact bounds, every frame, for free.
One canvas. Many scenes.
Wiring a fixed canvas to a dozen scroll-triggered WebGL moments usually means a dozen fights with scissor rects, device pixel ratio, and cleanup. ScrollScene tracks an element's getBoundingClientRect() every frame and exposes ready-made u_time, u_resolution, and u_originuniforms — so each scene only has to be a shader.
- Auto-pauses off-screen scenes via IntersectionObserver
- Element-relative fragment math out of the box
- Composable: image and HTML capture recipes included
import { ScrollRenderer, ScrollScene, Drawable, Mesh, Program, Plane } from 'wtc-gl'
const renderer = new ScrollRenderer()
document.body.appendChild(renderer.canvas)
const drawable = new Drawable(renderer.gl)
new Mesh(renderer.gl, {
geometry: new Plane(renderer.gl),
program: new Program(renderer.gl, { vertex, fragment }),
}).setParent(drawable)
renderer.addScene(
new ScrollScene({ element: document.querySelector('.hero'), scene: drawable })
)
renderer.playing = trueBring your own shader.
Every scene above is a plain fragment shader — no build step.
Read the docs