Papercraft 3D in the browser: three.js and agent skills
10 steps · about 4 h 15 min · Intermediate
- Getting Started: Here's Where the Real Fun Begins! (guide, Discover three.js, 30 min)
Start with the scene, camera and renderer, since every pop-up paper world is built on these three parts.
- Fundamentals (doc, three.js manual, 25 min)
This covers ES modules and import maps, the setup the papercraft templates use when you serve them over http.
- Physically Based Rendering and Lighting (guide, Discover three.js, 20 min)
Light and material work together, and this is why printed cardstock only reads as paper under the right light.
- MeshStandardMaterial (tutorial, Sean Bradley, sbcode.net, 20 min)
Changing roughness and other parameters in a live GUI shows how a matte paper surface differs from glossy ones.
- Shadows (tutorial, Sean Bradley, sbcode.net, 25 min)
Soft shadows under hinged cards are a big part of the pop-up look, so learn how shadow maps and light settings work.
- Discover three.js: The Big List of three.js Tips and Tricks (reference, Discover three.js, 30 min)
Skim the performance tips and gotchas before you build a larger scene with many cards.
- Specification - Agent Skills (doc, agentskills.io, 20 min)
Learn the open format behind papercraft: a SKILL.md file plus scripts, references and assets folders.
- Agent Skills - Claude Platform Docs (doc, Anthropic, 20 min)
See how an agent loads a skill's metadata and instructions in stages, and why a style can be bundled as a skill.
- Getting started - Library (doc, Playwright, 20 min)
The repo's capture script renders review frames headlessly with Playwright, so learn to script a browser and take screenshots.
- xikhar/papercraft: Agent skill for pop-up papercraft style (repo, GitHub, xikhar, 45 min)
Finish by serving the templates and reading the harness and scene code to see these ideas combined in a real project.