img2threejs Turns Any Photo Into Editable 3D Code With 12k Stars
A new agent skill turns a single reference image into diffable TypeScript that procedurally reconstructs the object as an animation-ready Three.js scene.
PRO- img2threejs converts a reference image into procedural Three.js code, not a mesh file.
- Runs as an agent skill inside Claude Code, Codex, or OpenCode with zero pip dependencies.
- Output is a TypeScript THREE.Group factory with pivots, sockets, and colliders for animation.
- Staged sculpting pipeline runs eight passes gated by agent-vision comparison sheets.
- Token efficient by design: Python scripts enforce, the model only judges pass or fail.
- Strong on hard-surface objects, honest about limits on character likeness from one image.
A trending open source project called img2threejs takes an unusual approach to image-to-3D. Instead of running photogrammetry, extracting meshes, or piping the image through a diffusion model that spits out a GLB, it asks a coding agent to rebuild the object from Three.js primitives, procedural shaders, and generated geometry. The output is TypeScript you can read, diff, and animate.
The repo has crossed 12k stars, ships under Apache 2.0, and is designed to run as a skill inside agent hosts like Claude Code, Codex, or OpenCode.
Code as the 3D format
Give it one reference image of an object and it produces a THREE.Group factory written in TypeScript that recreates that shape from primitives, procedural shaders, and generated geometry. Alongside the mesh, it emits a runtime hierarchy of pivots, sockets, and colliders so the result is ready to animate rather than an inert lump. Most image-to-3D pipelines skip that step. A photogrammetry mesh gives you a shell; this gives you a rigged, articulated scene graph.
The skill is agent-agnostic and uses whatever vision the host provides, whether native image reading, a browser MCP, a project preview, or a user-supplied screenshot. There is no model to download and no cloud API to pay for. The cost is whatever tokens your agent burns during the pipeline.
This story is for Pro members
You've reached the end of the free preview. Upgrade to AlphaSignal Pro to read the full article - and everything else behind the paywall.