---
title: "img2threejs Turns Any Photo Into Editable 3D Code With 12k Stars"
subtitle: "A new agent skill turns a single reference image into diffable TypeScript that procedurally reconstructs the object as an animation-ready Three.js scene."
url: "https://alphasignal.ai/news/img2threejs-turns-any-photo-into-editable-3d-code-with-12k-stars"
author: "AlphaSignal Newsroom"
author_url: "https://alphasignal.ai/editorial-team"
company: "AlphaSignal"
company_url: "https://alphasignal.ai/company/alphasignal"
published: "2026-08-21T12:29:25.000Z"
updated: "2026-08-22T02:52:05.789Z"
type: "Repo"
topics:
  - "Image"
  - "Development"
subtopics:
  - "Image Generation"
  - "Neural Rendering"
upvotes: 485
source_url: "https://github.com/img2threejs/img2threejs"
comments: 0
truncated: true
---

# 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.

A trending open source project called [img2threejs](https://github.com/img2threejs/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.

_Preview only. Full text requires an AlphaSignal Pro account._

## Sources

- [img2threejs GitHub repository](https://github.com/img2threejs/img2threejs)
- [img2threejs Live Demo Gallery](https://img2threejs.github.io/img2threejs-showcase/)
- [img2threejs showcase source](https://github.com/hoainho/img2threejs-showcase)
