The page stays a page
All the copy lives in one ordinary HTML file. The engine never reads it. The page only reports, many times a second, which section is in the middle of the screen. In the guide
- index.html
- getStage()

Popfold ยท alpha
Popfold turns a long page into a small 3D world that opens as you scroll. Each section is one beat of a story: a box opens, rooms slide out, pieces spring in, the camera moves on.
Built on three.js. This page is made with it. Everything is alpha and can still change.

The story
Your page stays an ordinary HTML page. Each section is a stop in the story, and a keyframe says how far the box is open and where the camera stands at that stop.
The page tells the engine one thing, many times a second: which section are we at? The engine blends the keyframes on either side and draws the result.
Click the dots in the rooms for the story behind each piece.

Pieces
A piece comes from a small built-in set, from your own code, or from a model file. Give a piece a story and it gets a dot; a click opens a card. Everything in this box is built in code.
Built-in piecesYour own code.glb models

Studio
Each Popfold site has a studio page that runs the same engine. Scrub the story, fold the box by hand, move a piece and save where it stands, set a beat's camera and what it opens, switch to evening light, capture a still of every stop.
Saving works only on your own machine. Here you can look and play.

Without 3D
The HTML that ships is already complete: the copy, a still of every stop, and every story written out. The 3D scene starts only if the browser can run it. Old browsers, search engines and AI agents read the same story.

Shells
The compact is this box: a lid and two drawers, or pages that turn like a pop-up book. The diorama is one modelled room whose walls swing up. The tower is a stack of floors with an elevator and glowing pipes, for long stories and diagrams.
The buttons fold this box again, or swap it for a small tower. The diorama needs a modelled room, so it is not shown here yet.

How it is built

Start
One command, popfold init, starts a new site as a copy of a template: an office in a box or a small tower, six sections, no model files. Its story, pieces and cards sit in one JSON file.
What alpha means here: Popfold runs only as TypeScript source inside a Vite site, there is no package to install, anything beyond the built-in pieces is still code, and nothing is kept backwards compatible before 1.0.