🪁 Building the KITE website as a scroll-driven WebGPU film

The KITE Interactive website tells a technology consultancy's story as one continuous scroll through eight 3D chapters. It runs on three.js WebGPU with TSL shaders, falls back to WebGL2, and keeps a full text version for anyone who cannot or does not want to watch.

By Dennis Bruijn · · 9 min read · #projects #sites #threejs #webgpu #react #typescript

Most company websites are a stack of sections you scroll past. I wanted KITE's to be a single camera move instead: you start in front of a beige computer glowing in emerald fog, and every turn of the scroll wheel pushes you further into the story. Through the screen, onto an office floor, under a printed page, into a shredder, and out the other side to a golden emblem and a "Hello". It's a film you direct with your thumb.

This post walks through what that film is made of. Everything below comes from the repository's README; where something isn't finished, I say so.

The beige KITE computer glowing in emerald fog next to the headline A Technology Consultancy, Built for Forward Momentum, with the Selected Work film strip on its CRT

Watch the 31-second KITE Interactive explainer

Click the poster for the explainer: 31.5 seconds, no audio, made with Montage. Real captures of the public site.

One scroll, eight chapters

There are no routes on this site. It is a single page, and the whole thing is one continuous camera move. Wheel, touch, keyboard, the scrollbar and the header navigation all drive it, and Lenis smooths the native document scroll so it never fights the browser.

#ChapterWhat happens
1HeroA KITE computer in emerald fog. Its CRT already shows a live feed of the next scene.
2Selected WorkThe camera dives into the screen. A curved film strip shows KITE's capabilities.
3About UsThe camera dives through the center frame onto an office floor.
4PaperA printed page curls down over the office, then scrolls like an editorial page, with a working consultation coupon.
5ShredderA 3D shredder cuts the page into falling strips.
6One last trickGold emblems fly past, then a diamond-shaped wipe.
7Golden KITEThe emblem's bands separate and lock together in a flash.
8Contact"Hello" over 3D phones, then the contact page and footer.

The header jumps between four anchors (Home, Selected Work, About Us and Contact), and each anchor is simply a position on the timeline.

The first scroll is my favorite moment. The CRT on the hero isn't a picture of the next chapter; it's a live render of it. So when the camera dives into the glass, you don't cut to a new scene, you just keep going.

The camera holds on the KITE computer, dives into its CRT and settles on the Selected Work film strip

The dive from the hero into Selected Work, 5.4 seconds. Click to play the loop.

Inside, eight capabilities ride a curved film strip. Use the arrows, the dots, drag or swipe, and open Explore for the details of each one. They are capabilities on purpose, not client case studies: the site makes no client claims it can't back up.

Selected Work with Technology Strategy in the center frame of a curved film strip, arrows at both edges and the Explore link under the title

WebGPU with two fallbacks

The renderer is three.js r186 WebGPURenderer. When a browser has no WebGPU adapter, it falls back to WebGL2 automatically. And when a browser has neither, the site doesn't sit there waiting on a renderer that will never arrive: the semantic text version becomes the page.

That decision is made by a check in src/engine/support.ts, which runs once the lazy-loaded 3D chunk has arrived. Here it is in full, because it's short:

/**
 * Resolve whether the 3D story can run: a WebGPU adapter or a WebGL2 context.
 * Without either, three's renderer cannot initialise, so the text page is shown.
 */
export async function graphicsSupported() {
  try {
    const gpu = (
      navigator as Navigator & { gpu?: { requestAdapter(): Promise<unknown> } }
    ).gpu
    if (gpu && (await gpu.requestAdapter())) return true
  } catch {
    // Fall through to the WebGL2 check.
  }
  try {
    const canvas = document.createElement('canvas')
    const gl = canvas.getContext('webgl2')
    gl?.getExtension('WEBGL_lose_context')?.loseContext()
    return !!gl
  } catch {
    return false
  }
}

The same ladder, running in your browser right now. Which rung do you land on?

<style>
  :root { color-scheme: dark; }
  body { margin: 0; padding: 16px; background: #000; color: #e8f5f1; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
  .rung { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 8px; border: 1px solid #1c2624; border-radius: 8px; opacity: .45; transition: opacity .3s, border-color .3s; }
  .rung.hit { opacity: 1; border-color: #19c37d; }
  .dot { width: 8px; height: 8px; border-radius: 50%; background: #1c2624; flex: none; }
  .hit .dot { background: #19c37d; box-shadow: 0 0 10px #19c37d; }
  small { color: #8aa39d; }
</style>
<div class="rung" id="webgpu"><span class="dot"></span>1. WebGPU adapter <small id="webgpu-note">checking…</small></div>
<div class="rung" id="webgl2"><span class="dot"></span>2. WebGL2 context <small id="webgl2-note"></small></div>
<div class="rung" id="text"><span class="dot"></span>3. Text version <small id="text-note"></small></div>
<script>
  const note = (id, text) => { document.getElementById(id + '-note').textContent = text; };
  const hit = (id, text) => { document.getElementById(id).classList.add('hit'); note(id, text); };

  async function check() {
    try {
      if (navigator.gpu && (await navigator.gpu.requestAdapter())) {
        return hit('webgpu', 'adapter found: the film renders with WebGPU');
      }
      note('webgpu', navigator.gpu ? 'no adapter' : 'not available');
    } catch {
      note('webgpu', 'request failed');
    }
    try {
      const gl = document.createElement('canvas').getContext('webgl2');
      if (gl) {
        gl.getExtension('WEBGL_lose_context')?.loseContext();
        return hit('webgl2', 'context created: three.js falls back to WebGL2');
      }
      note('webgl2', 'not available');
    } catch {
      note('webgl2', 'failed');
    }
    hit('text', 'neither: the semantic text version becomes the page');
  }

  check();
</script>

The 3D engine itself is a lazy chunk behind a loading veil, so the header and the text version arrive first.

Headlines painted into textures

This is the trick that makes the whole film hang together. The headlines and the printed paper page aren't DOM text floating over the canvas. They're laid out with Canvas 2D and uploaded as textures, so text curls, shreds and goes through post-processing like any other pixel.

There are off-the-shelf ways to put UI text into a three.js scene, and the README is blunt about them: @pmndrs/uikit and KTX2 textures weren't needed. Text has to curl, shred and pass through post-processing, so it's painted to textures, and every texture is either generated at runtime or a small WebP.

The printed paper page curling down over the About Us office floor of cubicles

The paper page curling over the About Us office. Real capture of the public site.

The page curl is a vertex shader over subdivided paper tiles. When the page has scrolled past, the shredder rebuilds its last screen as strips and lets them fall.

The paper page curls down over the office, then the shredder cuts the last screen of the page into falling strips

The page curl and the shredder, 6 seconds. Click to play.

Here's the idea in miniature: a headline painted onto a 2D canvas, then cut into strips. On the real site the strips are TSL materials in a 3D scene, but the principle is the same. Once text is pixels, you can do anything to it.

<style>
  body { margin: 0; background: #000; color: #e8f5f1; font: 13px system-ui, sans-serif; }
  .stage { position: relative; height: 240px; overflow: hidden; }
  canvas { position: absolute; top: 18px; display: block; }
  .bar { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid #161616; }
  button { background: #0b3b36; color: #e8fff8; border: 1px solid #19c37d; border-radius: 6px; padding: 6px 12px; font: inherit; cursor: pointer; }
</style>
<div class="stage" id="stage"></div>
<div class="bar"><button id="shred">Shred it</button><button id="reset">Print a new page</button></div>
<script>
  const stage = document.getElementById('stage');
  const reduced = matchMedia('(prefers-reduced-motion: reduce)').matches;
  const STRIPS = 14;
  let page, strips = [], raf = 0;

  function paint() {
    cancelAnimationFrame(raf);
    stage.replaceChildren();
    const w = Math.min(440, innerWidth - 32), h = Math.round(w * 0.45);
    const s = w / 440;
    page = document.createElement('canvas');
    page.width = w; page.height = h;
    page.style.left = (innerWidth - w) / 2 + 'px';
    const ctx = page.getContext('2d');
    ctx.fillStyle = '#f1efe6'; ctx.fillRect(0, 0, w, h);
    ctx.fillStyle = '#1d2b28';
    ctx.font = `600 ${Math.round(28 * s)}px system-ui, sans-serif`;
    ['Making Technology Clearer,', 'More Structured, and', 'Built to Last'].forEach((line, i) => ctx.fillText(line, 22 * s, (52 + i * 38) * s));
    ctx.fillStyle = '#19c37d'; ctx.fillRect(22 * s, h - 22 * s, 56 * s, 4 * s);
    stage.append(page);
  }

  function shred() {
    if (!page || strips.length) return;
    const sw = page.width / STRIPS, left = parseFloat(page.style.left);
    strips = Array.from({ length: STRIPS }, (_, i) => {
      const c = document.createElement('canvas');
      c.width = Math.ceil(sw); c.height = page.height;
      c.getContext('2d').drawImage(page, i * sw, 0, sw, page.height, 0, 0, sw, page.height);
      c.style.left = left + i * sw + 'px';
      stage.append(c);
      return { c, y: 0, v: 0, delay: Math.random() * 0.35, spin: (i % 2 ? 1 : -1) * (2 + Math.random() * 6) };
    });
    page.remove();
    if (reduced) { strips.forEach(({ c }) => { c.style.transition = 'opacity .6s'; c.style.opacity = '0'; }); return; }
    const start = performance.now();
    const tick = (now) => {
      const t = (now - start) / 1000;
      for (const s of strips) {
        if (t < s.delay) continue;
        s.v += 0.6; s.y += s.v;
        s.c.style.transform = `translateY(${s.y}px) rotate(${s.spin * Math.min(1, (t - s.delay) * 2)}deg)`;
      }
      if (strips.some((s) => s.y < 400)) raf = requestAnimationFrame(tick);
    };
    raf = requestAnimationFrame(tick);
  }

  document.getElementById('shred').onclick = shred;
  document.getElementById('reset').onclick = () => { strips = []; paint(); };
  paint();
</script>

The same painted layouts also supply the hotspot rectangles (src/engine/canvas2d.ts, plus the layouts in src/chapters/paperLayout.ts and finaleLayout.ts). That's how the real DOM buttons line up exactly with the painted ones, which matters a lot in the next section.

The post pass

Every frame ends in one shared post pass (src/engine/post.ts): CRT curvature and bezel, chromatic fringing, bloom, grain, vignette and white flashes. Because the text is in the texture, it gets the full treatment too.

CSS can only fake most of this (real curvature bends the image in a shader), but toggling a rough version on and off shows how much character those layers add. The grain is re-seeded every frame, just like on the live site.

<style>
  body { margin: 0; padding: 20px 16px; background: #000; color: #e8f5f1; font: 13px system-ui, sans-serif; display: grid; justify-items: center; gap: 14px; }
  .crt { position: relative; width: min(400px, 100%); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 26px / 20px; background: radial-gradient(ellipse at center, #0f4a43, #05201c 75%); box-shadow: 0 0 0 10px #c9c2ad, 0 0 0 12px #8f8873; }
  .feed { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 24px; text-align: center; font-weight: 700; font-size: clamp(18px, 6vw, 28px); line-height: 1.15; color: #d8fff4; }
  .on .feed { text-shadow: -1.5px 0 rgb(255 60 90 / .7), 1.5px 0 rgb(60 200 255 / .7), 0 0 16px rgb(25 195 125 / .9); }
  .layer { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; }
  .on .layer { opacity: 1; }
  .scan { background: repeating-linear-gradient(to bottom, rgb(0 0 0 / .3) 0 1px, transparent 1px 3px); }
  .vignette { background: radial-gradient(ellipse at center, transparent 50%, rgb(0 0 0 / .8) 100%); box-shadow: inset 0 0 40px rgb(0 0 0 / .9); }
  canvas.layer { width: 100%; height: 100%; mix-blend-mode: overlay; image-rendering: pixelated; }
  .flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
  .flash.go { animation: flash .45s ease-out; }
  @keyframes flash { from { opacity: .95; } to { opacity: 0; } }
  .bar { display: flex; gap: 12px; align-items: center; }
  button { background: #0b3b36; color: #e8fff8; border: 1px solid #19c37d; border-radius: 6px; padding: 6px 12px; font: inherit; cursor: pointer; }
</style>
<div class="crt on" id="crt">
  <div class="feed">Solutions That<br>Move Forward</div>
  <canvas class="layer" id="grain" width="160" height="120"></canvas>
  <div class="layer scan"></div>
  <div class="layer vignette"></div>
  <div class="flash" id="flash"></div>
</div>
<div class="bar">
  <label><input type="checkbox" id="toggle" checked> Post pass</label>
  <button id="bang">Flash</button>
</div>
<script>
  const crt = document.getElementById('crt');
  const grain = document.getElementById('grain');
  const ctx = grain.getContext('2d');
  const img = ctx.createImageData(grain.width, grain.height);
  const reduced = matchMedia('(prefers-reduced-motion: reduce)').matches;

  function seed() {
    for (let i = 0; i < img.data.length; i += 4) {
      const v = Math.random() * 255;
      img.data[i] = img.data[i + 1] = img.data[i + 2] = v;
      img.data[i + 3] = 70;
    }
    ctx.putImageData(img, 0, 0);
  }
  function loop() { seed(); requestAnimationFrame(loop); }
  reduced ? seed() : loop();

  document.getElementById('toggle').onchange = (e) => crt.classList.toggle('on', e.target.checked);
  document.getElementById('bang').onclick = () => {
    const f = document.getElementById('flash');
    f.classList.remove('go'); void f.offsetWidth; f.classList.add('go');
  };
</script>

The golden KITE emblem with its bands separated and glowing over a dark floor, just before they lock

The golden KITE, a moment before its bands lock in the white "handshake" flash. Real capture of the public site.

That flash comes from the same post pass. The diamond-shaped wipe just before it is its own TSL material: an SDF mask that reveals the golden feed. The emblem you see there is the site's own logo, the same one that serves as the project icon:

The KITE Interactive emblem, a layered emerald diamond

Accessible by construction

A WebGPU film is a great way to build a site nobody can use, so this part got as much attention as the shaders.

  • Real controls over the canvas. The header, menu, carousel controls, coupon and contact links are real DOM controls laid over the canvas, not hit-tests on pixels. That's why the painted layouts hand out their hotspot rectangles.
  • A complete text version. A semantic text version is visually hidden while the scenes run, and keyboard focus moves the story to the focused section. Tab through the page and the camera follows you.
  • Reduced motion respected. It disables scroll smoothing and softens the grain.
  • Readable without JavaScript. The build prerenders the text version into index.html and writes schema.org JSON-LD, /llms.txt and /sitemap.xml, all from src/content/site.ts. Every word on the site lives in that one file, so the film and the text version can't drift apart.
  • Tested with the canvas running. The Playwright suite checks WCAG 2.2 A and AA rules with axe, both with the canvas running and on the text-only fallback.

An accessibility statement opens from the contact page, too.

Contact without a backend

There's no server behind the contact flow, on purpose. Book a call and the consultation coupon open the scheduling link or email address when they're configured. Otherwise the site's enquiry form prepares a draft you can copy, and the site never sends or stores it.

The same restraint runs through the rest of the privacy story:

  • The site's own code doesn't use cookies, localStorage or sessionStorage.
  • Fonts (Space Grotesk and Manrope) are self-hosted through Fontsource, and the models, stills and Draco decoder are served from the site itself.
  • Vercel Web Analytics and Speed Insights are only included in Vercel builds. Analytics records page views and exactly two named events, Book a call and Send an enquiry, with no extra properties.

Under the hood

LayerChoice
UIReact 19 and TypeScript
BuildVite 8, with a prerender step for the text version, JSON-LD, llms.txt and the sitemap
3Dthree.js r186 WebGPURenderer with TSL shaders, through react-three-fiber
ScrollLenis over the native document scroll
AssetsBlender Python scripts for every model (Draco GLB) and still (WebP)
TestsVitest with Testing Library and jsdom; Playwright with axe
HostingVercel

The frame pipeline, in one breath:

Scroll (Lenis over native scroll)
  └─▶ Timeline (runtime.ts)
        ├─▶ Chapter layers (scenes and live feeds)
        │     └─▶ Post pass (CRT, fringe, bloom, grain)
        │           └─▶ Canvas (WebGPU or WebGL2)
        └─▶ DOM overlay (header, hotspots, text version)
  • Timeline. src/engine/runtime.ts holds the shared per-frame state and turns the scroll position into chapter progress. It's built from the measured heights of the paper and contact pages, so longer copy makes those chapters scroll further.
  • Layers. Each chapter owns a 3D scene, a camera and a screen-space UI scene (src/engine/layers.ts). Offscreen targets carry the live feeds, like the work chapter on the hero CRT, and the director renders only the layers visible at the current scroll position.
  • Transitions. Dives are camera moves square to a screen that samples the next feed. That's the whole secret of the opening shot.

Nothing is hand-modeled

Every model and every still is generated by scripts. Nothing depicts invented clients, projects or people: the imagery shows capabilities rather than client work, and props rather than people.

npm run assets:models   # Blender → public/models/*.glb (Draco)
npm run assets:media    # screen textures and Blender stills → public/media/*.webp
npm run assets:optimize # favicon and emblem from brand-design/

CI that lives on my machine

GitHub Actions no longer runs the checks. npm run verify exports the commit with git archive, runs npm ci, npm run check and every Playwright project in a Docker container, and publishes the result as a Verify (local) commit status. A pre-push hook runs it for you. Vitest covers the timeline, the text version, the actions, the enquiry drafts and the error boundary in 5 test files; the 9 Playwright tests run the real canvas on desktop Chromium, mobile Chromium and WebKit.

The README is honest about the catch, and so am I: the status records that a trusted developer machine ran the checks. It isn't independent CI.

There's also a scroll recorder, scripts/record-scroll.mjs, that records the story as a landscape, portrait or square video for social posts.

Credit where it's due

The layout, choreography and finish are inspired by shader.se, rebuilt in KITE's own palette, typography and copy.

What's not there yet

From the roadmap:

  • A first tagged release. The current version has never been tagged. The plan is a tag and a GitHub Release from the CHANGELOG.
  • A shorter README. The local CI reference moves to its own doc, so the README stays a showcase.
  • Media in sync with copy. Whenever the copy in src/content/site.ts changes length, the capture scroll positions get re-surveyed in Montage and the GIFs and explainer re-rendered.

The site itself is live at www.kite-interactive.online. Grab a mouse with a good scroll wheel.

KITE Interactive website has its own card on the projects page, with the demo loop, the explainer and the stack at a glance.

Curious about the source? It's private, but access can be granted to anyone interested in contributing. Get in touch.