Skip to content
© Devang Patel
PerformanceCreative development

This Portfolio

A portfolio that measures itself while you read it.

Role
Design, engineering and content, end to end
Timeline
First build Jul to Sep 2026; this redesign Nov 2026
Team
Solo

Stack:

  • Next.js 15
  • React 19
  • TypeScript
  • Tailwind CSS
  • MDX
  • GSAP
  • Lenis
  • Three.js

Overview

The site is the case study. Real-time 3D models built in code in place of every project image, one WebGL canvas drawing all of them, a scroll-pinned process, sticky stacking cards and curtain page transitions, all held to a performance budget, and the page prints its own Core Web Vitals, measured on your device.

The problem

Award-style portfolios are usually slow, and fast portfolios are usually forgettable. A developer who sells speed can't pick one: the site has to carry heavy motion and still pass Core Web Vitals on a mid-range phone.

Constraints

  1. 01

    Mobile LCP under 2.5s, CLS under 0.1, INP under 200ms. Lighthouse 90+ on desktop, 85+ on mobile.

  2. 02

    Free tools only: no paid fonts, plugins or APIs.

  3. 03

    Complete and readable without JavaScript, and in its final state under reduced motion.

  4. 04

    Every claim on the page must be checkable. No invented clients, metrics or testimonials.

Architecture

  1. Edge
    • CDNPrerendered HTML for every route
  2. Render
    • Next.js App RouterServer Components; client islands only where state lives
  3. After paint
    • Motion runtimeGSAP binds data attributes; Lenis drives the scroll
    • Live vitalsweb-vitals into an external store
  4. On intent
    • One WebGL canvasThree.js + R3F draws every model into its own box; imported on first pointer, touch or scroll
  5. Content
    • Typed data + MDXIn git; no CMS round trip
Content arrives as HTML. Motion attaches after paint. WebGL waits until someone moves.

Decisions and trade-offs

WebGL loads on intent

Chose
Import Three.js on the first pointer move, touch or scroll
Over
Loading it on idle after hydration
Why
Three.js is the heaviest code on the site. Waiting for intent keeps it out of LCP and out of the main-thread work that blocks first interactions. Nobody misses an interactive effect before they've interacted.

Never animate the LCP element in

Chose
The hero name paints as plain HTML; its entrance is transform-only
Over
A masked word-by-word reveal on the name
Why
A masked reveal hides the text until the animation runs, which pushes LCP back by the length of the animation.

One canvas for every model

Chose
A single fixed WebGL canvas that draws each model into its page box (viewport and scissor)
Over
A separate canvas per model
Why
Browsers cap how many WebGL contexts a page can hold, and each one costs memory and its own shader compiles. One canvas means one context however many models a page shows, and a box that's offscreen costs nothing.

One motion runtime, not animated components

Chose
Server Components carry data-reveal and data-split; one client runtime binds them
Over
A client wrapper around every animated element
Why
Content stays server-rendered, so motion costs one module instead of turning every section into client code.

An external store for live vitals

Chose
useSyncExternalStore, batched per frame
Over
A React context provider around the app
Why
Readings change on every layout shift. A provider would re-render the whole tree for each one, and an instrument shouldn't change what it measures.

The hardest problem

Many models, one WebGL context

Every project, service and chapter on this site has a live model, and a page can show a dozen. A canvas each would hit the browser's context limit and recompile the same shaders over and over. Instead, one transparent canvas sits over the page, and each frame it walks the boxes that registered a model: it skips anything offscreen, clips a model under a sticky card that has slid over it, dims it with a card that's receding, and renders it into exactly that box. The page keeps its layout, links and text; the canvas only paints.

components/three/views-canvas.tsx (condensed)ts
useFrame((state, delta) => {
  const H = window.innerHeight;
  gl.setScissorTest(false);
  gl.clear();
  gl.setScissorTest(true);

  for (const [id, inst] of instances) {
    const view = viewStore.all().get(id);
    const r = view.el.getBoundingClientRect();
    if (r.bottom <= 0 || r.top >= H) continue; // offscreen: free

    // clip under any later sticky card that has slid over this one
    let bottom = r.bottom;
    for (const next of laterCards(inst.card)) bottom = Math.min(bottom, next.getBoundingClientRect().top);
    if (bottom - r.top < 2) continue;

    inst.model.update({ t: state.clock.elapsedTime, dt: delta, hover: inst.hover });
    gl.setViewport(r.left, H - r.bottom, r.width, r.height);
    gl.setScissor(r.left, H - bottom, r.width, bottom - r.top);
    gl.clearDepth(); // scissored: only this box
    gl.render(inst.model.scene, inst.model.camera);
  }
}, 1);

Pointer tilt, drag spin, the dim pass and the entrance are omitted.

Under the hood

Two of the rules this site is built on, as things you can run. Each loads only when you scroll to it.

Why everything here moves with transform

140 boxes, the same motion, two ways: transform, which the compositor handles, or top and left, which forces layout every frame. Add some main-thread work and watch frames blow through the 16.7ms line. It's why the only properties animated on this site are transform and opacity.

The frame-budget study loads when it's on screen

The four curves everything moves on

The site's easing tokens, drawn from their real cubic-béziers and replayed on the real eases. ‘Shutter’ is the signature: it opens fast and settles long.

The easing tokens loads when it's on screen

What I'd do next

  1. 01

    Publish field data from the Chrome UX Report once the site has enough traffic to appear in it, next to the lab numbers.

  2. 02

    Export a still of each model for visitors without WebGL, so they see the model instead of a typographic stand-in.

Related writing

Next project

Multisite Hosting & Support

Keeping a portfolio of client sites secure, current and fast.

Read the case study