Guide · Workflow

How to Build a 3D Motion Website with Claude

By Md Mahafuj Alam · Updated

You build a 3D motion website with Claude by doing the creative work first and the code second: write a short scroll story, generate keyframes and a camera move with AI image and video tools, cut the video into an image sequence with ffmpeg, then use Claude Code to build a Next.js site that scrubs those frames with GSAP ScrollTrigger and Lenis. This guide walks through all seven steps and links to a detailed guide for each one.

What a "3D motion website" actually is

Most sites people call "3D" are not rendering a 3D scene in the browser. They play back footage that was made elsewhere and tie it to the scroll bar. The visitor feels they are moving a camera through space, but the page is mostly drawing pictures on a canvas. Knowing which kind you are building decides your tools, your file sizes and how much code Claude has to write.

There are three common types.

1. Video or image-sequence scrub

A camera move is rendered or generated as a video, cut into hundreds of still frames, and drawn to a <canvas> as the visitor scrolls. Scroll position maps to frame number. This gives the most cinematic result for the least runtime cost, because the browser only decodes images. The trade-off is weight: every frame is a file. Kestra, a real estate developer scroll story, works this way: its 443 frames came from two 4K Kling 3.0 clips.

2. AI images plus a light three.js layer

Here the "3D" comes from a few strong still images and real-time effects on top: parallax depth, shader transitions, particles or light. There is no video at all. MANJARI, a mango juice product scroll story, is four-chapter scroll-driven WebGL hero rendered live in three.js from AI images (GPT Image 2), no video; depth-parallax backdrops from Depth Anything V2 depth maps; a photographed mango swaps into a procedural 3D mango that falls, splits and bursts into GPU juice droplets; juice-flood shader; small images first then full-resolution; shaders compiled before the loader fades; canvases render only on screen with capped pixel ratio; fewer particles on low-power devices; reduced-motion and no-WebGL fallback; Lenis; copy in one config file, hero story in another; every image prompt and an asset pipeline included; Next.js 15, React 19, TypeScript, static export. It is lighter to ship and easier to change, but it needs more design care to feel like motion rather than a slideshow.

3. Real-time 3D

A true three.js scene with models, lights and a camera driven by scroll. It is the most flexible and the most expensive: you need 3D assets, careful performance work and a fallback for weak devices. Many good sites mix types, such as Orbitly, an app launch scroll story with a 691-frame image sequence on a canvas and a real-time three.js light layer on top.

If you are not sure which type fits your project, read image sequence vs video vs three.js before you generate anything. The choice is hard to reverse once the assets exist.

The stack: what each tool does

Claude writes the code, but it does not make the pictures. The workflow splits cleanly into an asset pipeline and a code pipeline, and it helps to know which tool owns which job.

ToolJob in this workflow
Claude CodePlans and writes the Next.js site from your terminal, runs commands, edits files
AI image toolMakes the keyframes: the first and last frame of each shot, in a consistent style
AI video toolTurns keyframes into a camera move between them (image-to-video or first/last-frame)
ffmpegCuts the video into numbered still frames and resizes them
Next.jsThe React framework: routing, builds, static assets in public/
GSAP + ScrollTriggerMaps scroll position to frame number, pins sections, animates text
LenisSmooth scrolling, so the scrub feels continuous rather than steppy
three.jsOptional real-time layer: light, particles, shaders, or a full 3D scene

Claude Code runs in your terminal, reads your project and makes changes you approve. Anthropic documents the install and first session in the Claude Code quickstart. The full setup for this kind of project, including the packages and a ready-made CLAUDE.md, is in Claude Code setup for 3D scroll websites.

Before step 1: write a one-page brief

A brief is the document every later step checks against. It stops the image tool, the video tool and Claude from each pulling the project in a different direction. One page is enough, and it should answer these questions:

  • Who is it for and what should they do? Book a viewing, download an app, buy a product. The story bends towards that action.
  • Which of the three types is it? Image-sequence scrub, AI images with a light 3D layer, or real-time 3D. This sets the asset list.
  • What does it look like? Palette, light, lens, typeface, and two or three reference films or sites.
  • What are the limits? A frame budget for desktop and for phones, and which devices must run it well.
  • What must never happen? For example: no text over moving footage, no motion for visitors who ask for reduced motion.

Keep the brief next to the code. Much of it becomes the CLAUDE.md file in step 5, and the visual half becomes your keyframe prompts in step 2. When a choice comes up later, such as whether to add another chapter, the brief answers it.

Step 1: Write the scroll story

A scroll story is a short film the visitor directs with their thumb. Before you generate a single image, write it as a list of chapters. Each chapter needs three things: what the camera sees, what the copy says, and what the visitor should feel or do at that point.

  • Keep it short. Four to six chapters is enough for a landing page. Each extra chapter is another shot to generate and more frames to load.
  • Give the camera one idea per chapter. Push in, orbit, rise, pass through. One clear move per section reads better than three blended ones.
  • Write the copy now. Headlines decide where the image must stay calm. If text will sit on the left, the subject should sit on the right.
  • End on an action. The last frame should hold still behind your call to action, not keep moving.

The planning guide covers chapter structure, pacing and a storyboard template: how to plan a scroll story. If you need a starting concept, scroll website ideas lists formats that suit products, property, apps and brands.

Step 2: Generate the keyframes

Keyframes are the still images that anchor each shot. For a video-scrub site you usually need a start and an end frame per camera move; for an image-led site like MANJARI, the keyframes are the final artwork.

Treat this as art direction, not prompting. Decide these before you open an image tool:

  • Light. One named light source and time of day for the whole story. Mixed lighting between chapters is the fastest way to look generated.
  • Palette. Three to five colours you will reuse in the site's CSS, so the footage and the interface belong together.
  • Lens and height. A consistent focal length and camera height makes separate shots feel like one film.
  • Negative space. Leave room where your headlines will go. Busy frames fight text.
  • Aspect. Generate a landscape set for desktop and plan a portrait set for phones from the start (see step 6).

Generate several options per keyframe and pick the ones that match each other, not the single prettiest image. Consistency across chapters matters more than any one frame.

Step 3: Turn keyframes into video

Feed the keyframes to an AI video tool that supports image-to-video or first-and-last-frame generation. Describe the camera move, not the scene, because the scene is already in the image. "Slow dolly forward, slight rise, no cuts, subject stays centred" gives the tool less room to invent.

  • Ask for one continuous shot. Cuts and scene changes break a scrub; the visitor sees a jump mid-scroll.
  • Prefer slow moves. Scroll speed varies wildly. Fast camera moves turn into blur when someone flicks the page.
  • Render at the highest resolution you can. You will downscale later, and downscaling hides compression artefacts.
  • Generate a few takes. AI video drifts: objects melt, text morphs, architecture bends. Pick the take that stays stable to the last frame.

Each template documents how its footage was made. Kestra's frames came from two 4K Kling 3.0 clips, and Orbitly ships with the Seedance video prompts used to make it, which is a useful reference for how camera-move prompts are written.

Step 4: Cut the video into frames

The browser cannot scrub a video smoothly in both directions on every device, so most scroll stories draw still frames instead. ffmpeg does the cutting. This command samples a clip at 24 frames per second, scales it to 1920 pixels wide and writes numbered JPEGs:

Terminalbash
mkdir -p public/frames/desktop
ffmpeg -i shot-01.mp4 -vf "fps=24,scale=1920:-2" -q:v 3 public/frames/desktop/frame_%04d.jpg

The frame count is the main cost decision on the whole site. More frames means smoother motion and a heavier page. Work it out before you export with the frame budget calculator, and if you would rather not use the command line, the video to frames tool does the cut in your browser.

For formats, quality settings, WebP and AVIF conversion and how to make light preview tiers, read how to convert video to an image sequence with ffmpeg. For scale, Kestra ships 443 frames and Orbitly ships 691.

Step 5: Build the site with Claude Code

With frames in public/frames/, the build is a normal Next.js project. Claude Code works best when you give it the rules up front and the work in small pieces. Anthropic's best practices recommend separating exploration and planning from implementation, and giving Claude a check it can run, such as a build or a screenshot, so it can verify its own work.

A sensible build order:

  1. Write a CLAUDE.md with the stack, folder layout, frame paths and performance rules. Claude reads it at the start of every session.
  2. Ask for the canvas image-sequence component alone, tested on one chapter, before anything else.
  3. Add Lenis and ScrollTrigger, and wire scroll progress to the frame index.
  4. Add pinned chapters and text reveals, one chapter at a time.
  5. Add progressive loading: a light tier first, full-quality frames after.
  6. Only then add the optional three.js layer and the polish.

A first prompt should be narrow and testable. Something like this gets the core of the site built in isolation, where problems are easy to see:

Example first prompttext
Create components/scroll/ScrollSequence.tsx: a client component that
draws frames /frames/desktop/frame_0001.jpg to frame_[0443].jpg on one
<canvas> with cover fit, sized by devicePixelRatio (max 2). It takes a
progress value from 0 to 1. Add a test page with a range slider that
drives progress, so I can check it before any scroll code exists.
Run npx tsc --noEmit and fix any errors.

Notice what the prompt does: it names the file, states the inputs, fixes the frame paths and asks for a check. It also leaves scroll out entirely. When the slider version works, adding ScrollTrigger is a small, separate change.

The component itself, with preloading, devicePixelRatio handling and cover-fit drawing, is explained in canvas image sequence in Next.js. The scroll engine, including how to drive Lenis from GSAP's ticker and avoid double animation loops, is in GSAP ScrollTrigger with Lenis in Next.js.

You do not have to invent the prompts. Claude prompts for 3D scroll websites has copy-and-paste prompts for every stage, each with a list of what to check afterwards.

Step 6: Make it work on phones

A scroll story that works on a laptop can fail on a phone in three ways: the landscape frames are cropped to a narrow strip, the download is too large for a mobile connection, and memory pressure crashes the tab. Plan for all three.

  • Portrait frames. Generate or crop a separate 9:16 set rather than centre-cropping desktop frames. Kestra and Orbitly both ship dedicated portrait frames for phones.
  • Frame tiers. Load small preview frames first so the scrub works immediately, then stream in sharper frames. Kestra uses two tiers, with 1920 × 1072 HD frames streaming in after the previews.
  • Memory. Keep decoded images near the current scroll position and release the rest. Kestra loads HD frames nearest the scroll position and releases far frames from memory.
  • Reduced motion. Respect prefers-reduced-motion with a calm alternative, not a broken page.

Details and code are in scroll animation performance on mobile and reduced motion for scroll animation.

Step 7: Deploy and measure

Next.js can be deployed as a Node.js server, a Docker container, a static export or through a platform adapter, as listed in the Next.js deployment docs. A scroll story with no server features often works as a static export, which makes hosting simple. The part that needs care is the frames: hundreds of files that should be served with long cache lifetimes and, ideally, from a CDN.

After launch, measure on real devices. Animated sites tend to struggle with Largest Contentful Paint (a huge first frame) and Interaction to Next Paint (main-thread work during scroll). For reference, Kestra scores 90 on mobile and Orbitly scores 72, which shows how much the loading strategy matters even between two image-sequence sites.

The hosting checklist is in how to deploy an animated Next.js site, and the metrics are covered in Core Web Vitals for animated websites.

What makes AI 3D sites look cheap

The tools have made the mechanics easy, so the difference between a good site and a forgettable one is now almost entirely craft. These are the patterns that give an AI-built site away, and what to do instead.

Flat lighting

Default generations tend towards even, shadowless light. Real product films use a key light, shadow and contrast to give form. Name the light in every keyframe prompt (low sun from the left, a single softbox overhead) and keep it the same across chapters.

Generic camera moves

A slow push-in on every shot becomes wallpaper. Give each chapter a move that means something: reveal a product by orbiting it, show scale by rising, enter a space by passing through a doorway. The move should carry the story, not decorate it.

Drifting AI video

Generated video often lets details wander: logos warp, windows change count, hands gain fingers. On a scroll scrub the visitor can stop and reverse, so they will see it. Review the chosen take frame by frame, trim the unstable tail, and prefer shorter, steadier clips stitched together.

Text over busy footage

Headlines laid over detailed, moving imagery are hard to read and look careless. Plan negative space in the keyframes, add a subtle gradient scrim behind copy, and pin text only where the frame is calm.

No art direction

The most common problem is that nobody decided what the site should look like. A one-page brief with palette, light, lens, typeface and two or three reference films will do more for the result than any prompt technique. Put the palette into CSS variables so the interface matches the footage.

Starting from a template instead

Every step above can be done from scratch. If you would rather start with a working engine and change the story, the Edok Studio Motion templates each represent one of the three types:

  • Kestra: image-sequence scrub with two frame tiers, portrait frames for phones and a WebGL shader that turns footage into an ink drawing.
  • Orbitly: image sequence plus a real-time three.js light layer, built with Next.js, TypeScript, GSAP ScrollTrigger and Lenis, with copy in two config files and colours as CSS variables.
  • MANJARI: a WebGL scroll story built from AI images, with no video.

A template is also a good thing to point Claude Code at. Ask it to read the project and explain how the frame loader works before you change anything, then swap in your own frames and copy.

FAQ

Questions, answered.

The questions people ask most about this topic.

01Can Claude make a 3D website on its own?

Claude Code can write the whole codebase: the canvas sequence player, the scroll engine, pinned chapters, a three.js layer and the deploy configuration. It does not generate the images or video. You make those with AI image and video tools, cut them into frames with ffmpeg, and Claude builds the site around them.

02Do I need to know three.js to build a 3D scroll website?

Not for the most common type. An image-sequence site draws pre-rendered frames on a canvas and needs no 3D code at all. three.js only becomes necessary when you want real-time effects such as light, particles or shaders, or a true 3D scene.

03How many frames should a scroll animation use?

Enough for smooth motion at the scroll length you plan, and no more. It depends on how long each chapter scrolls and how far the camera moves. Use the frame budget calculator to balance smoothness against download size before exporting. For reference, Kestra uses 443 frames and Orbitly uses 691.

04Why use an image sequence instead of a video element?

Scrubbing a video element backwards and forwards with the scroll bar is unreliable across browsers, because video is compressed for forward playback. Individual frames on a canvas can be drawn in any order instantly, which makes the scrub smooth in both directions.

05Will a 3D motion website work on phones?

Yes, if you plan for it: a separate portrait frame set, small preview frames that load first, memory limits on decoded images, and a reduced-motion fallback. A desktop site squeezed onto a phone usually loads too much and crops the subject badly.

06Is Next.js required?

No. The technique works in any framework or in plain HTML. Next.js is a common choice because it handles routing, builds and static assets well, and Claude Code is comfortable working in it.