Early accessLifetime access — $239 one-timeClaim →

How to build a cursor-reactive interactive website with Claude Code

Intermediate6:44 watch

A physics-based text curtain that reacts to your cursor, built with ChatGPT art and Claude Code — with the three takes where the physics broke left in.

Tools used

Most AI build tutorials show you the take that worked. This one doesn't: the curtain physics breaks three separate times on camera and gets fixed three separate times, because the fixing is the actual skill.

The build is a "Gates of Hell" scene with a curtain of text that hangs in front of the gate and reacts to the cursor as you move through it. Pinterest supplies the reference, ChatGPT generates the artwork, and Claude Code running Opus writes the scene, the physics and the sound.

If you have ever had an AI-generated effect come out subtly wrong and had no idea what to say next, this is the lesson for that.

01Gather reference art with a specific mood

Search Pinterest for the scene you have in mind and collect images that agree with each other on lighting and mood. For an atmospheric build the lighting reference is worth more than the subject reference — it is what makes the finished scene feel like one place rather than several assets in a stack.

Save more than you think you need. These get pasted back in during debugging.

From the library

Get the prompt for this build

The designs used in this lesson live in the library. Open one to copy the prompt behind it.

02Generate the gate art in ChatGPT

Prompt ChatGPT for the gate itself, described as a single object rather than a scene. The instinct is to ask for the whole picture at once, and it is the wrong one — a composed scene cannot be layered, and layering is what makes it interactive.

Ask for the subject, framed straight on, with nothing behind it.

03Isolate it onto a transparent background

Cut the gate out onto transparency. This is the step that decides whether the finished thing has depth: a gate on transparency can sit in front of a separate background with the curtain between them, and each layer can move at its own rate.

Check the edges at full size. Fringing that is invisible in a thumbnail is very visible at hero scale.

  • One subject per image, always on transparency
  • Inspect the cut-out at 100% before using it

04Generate the background scene separately

Now generate the environment as its own image, matching the lighting of the gate. Two images that were generated independently rarely agree on light direction, so it is worth saying explicitly where the light comes from in both prompts.

You now have the layers the scene will be assembled from.

05Start the build with Claude Code on Opus

Hand Claude Code the layers and describe the scene: gate in front, background behind, a curtain of text hanging between them that responds to the pointer.

The first result will be structurally right and physically wrong. That is the expected outcome, not a failure — the layout is describable in words and the physics is not.

06Fix it with screenshots, not adjectives

This is the part worth the whole video. When the curtain came out wrong, the fix was not a better description — it was a screenshot of the wrong result handed back with a note about what specifically was wrong with it.

It took three rounds. Zoom and curtain physics in round one, still broken in round two, and only in the third round — after asking specifically for cursor-reactive movement rather than "more realistic" movement — did it settle.

The pattern generalises: for anything visual, show the model what it did and name the difference, rather than restating what you wanted.

  • Screenshot the broken state and paste it in
  • Name one specific difference between what you see and what you want
  • Expect several rounds on physics — that is normal, not a sign to restart

07Add a control panel instead of re-prompting

Once the physics works, ask for a small on-page control panel exposing the parameters — curtain weight, reaction distance, damping. Tuning those with sliders takes seconds, where every tweak through the model is a full rebuild.

Then ask for sound. Claude Code will add sound effects if you simply ask, and almost nobody does.

  • Expose the variables you will want to tune, not all of them
  • Ask for sound — it is one sentence and most builds skip it

What you end up with

An interactive scene with layered depth, cursor-reactive physics and sound — none of it hand-written.

The transferable skill is the debugging loop. Screenshot the wrong result, name the specific difference, repeat. It is slower than hoping the next prompt lands, and it converges where re-describing the goal never does.

Prefer to watch it end to end? Open this build on YouTube — or subscribe for the weekly one.

Next lesson

How to build a 3D portal scroll effect with Claude CodeThree image layers — background, door, clouds — and a scroll that zooms you through the portal. The layering is what makes the depth real.

Keep learning