← all repositories
hoainho/img2threejs

Image-to-3D that ships TypeScript factories, not mesh files

It exists to rebuild objects from reference photos as token-efficient, animation-ready Three.js code, using agent vision to gate quality before every sculpting pass.

img2threejs
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

img2threejs takes one reference image and reconstructs the object as a TypeScript THREE.Group factory built from primitives, procedural shaders, and generated geometry. The result is a runnable, animation-ready scene graph with pivots, sockets, and colliders, not a static mesh download. It is designed to run inside agent contexts like Claude Code or Codex, using the agent’s own vision to review renders pass by pass.

The interesting bit

The project treats token efficiency as a systems problem: deterministic Python scripts handle validation, spec authoring, and bookkeeping using only the standard library, so the expensive model context is reserved solely for looking at side-by-side comparison sheets and deciding whether to continue or refine. A strict-quality gate blocks shallow specs before a single line of Three.js is generated, preventing wasted tokens on underspecified geometry.

Key highlights

  • Output is diffable TypeScript and JSON specs rather than multi-megabyte mesh files.
  • Staged sculpting pipeline with locked build passes — from blockout to optimization — each requiring a render, comparison sheet, and passing agent-vision score.
  • A pre-generation detailInventory catalogs identity-defining features like bevels, gloss, screws, and wear before any code is emitted.
  • Pure Python 3.10+ standard library scripts with zero external dependencies; no pip installs, no PIL, no numpy.
  • Runtime hierarchy exposes pivots, sockets, colliders, and destruction groups via root.userData.sculptRuntime.

Caveats

  • A single image cannot guarantee 100 percent likeness for specific people or characters; the pipeline reports per-region confidence and may request additional views.
  • The workflow assumes the host agent provides vision or a browser tool for review loops; without it, the gating mechanism cannot advance.
  • It is explicitly a skill for agent runtimes, not a standalone human-facing CLI tool.

Verdict

Worth a look if you are building agentic 3D workflows and want version-controllable, animation-ready output from photos. Skip it if you need photogrammetry-accurate scans or a self-contained desktop application.

Frequently asked

What is hoainho/img2threejs?
It exists to rebuild objects from reference photos as token-efficient, animation-ready Three.js code, using agent vision to gate quality before every sculpting pass.
Is img2threejs open source?
Yes — hoainho/img2threejs is open source, released under the MIT license.
What language is img2threejs written in?
hoainho/img2threejs is primarily written in Python.
How popular is img2threejs?
hoainho/img2threejs has 1k stars on GitHub.
Where can I find img2threejs?
hoainho/img2threejs is on GitHub at https://github.com/hoainho/img2threejs.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.