img2threejs
Rebuild the object in a reference image as a code-only, procedural, quality-gated, animation-ready Three.js model. Token-efficient image-to-3D.
What is img2threejs?
Rebuild the object in a reference image as a code-only, procedural, quality-gated, animation-ready Three.js model. Token-efficient image-to-3D.
Overview of img2threejs
What it is
Rebuild the object in a reference image as a code-only, procedural Three.js model. Quality-gated, animation-ready, and deliberately token-efficient — reconstruction-by-code, not photogrammetry, mesh extraction, or downloaded art packs.
Key features
- Produces a
THREE.Groupfactory written in TypeScript that recreates the object from primitives, procedural shaders, and generated geometry, with a runtime hierarchy (pivots, sockets, colliders) for animation readiness. - Runs under Hermes, Claude Code, Codex, or OpenCode; agent-agnostic.
- Subjects classified as
object,character, orhybrid; characters use an anatomy-aware track. - Detail-first analysis: enumerates a
detailInventoryof identity-defining small details before code generation; strict quality gate blocks generation until inventory is complete. - Opt-in projection-first path for maximum likeness of a specific person or character.
- Multi-view silhouette carving (opt-in) using at least two deterministic orthographic binary silhouettes.
- CS2 weapon review gates for Knife and Glock-18 routes.
Use cases
Reconstructing objects and characters from a single reference image into animation-ready Three.js models, with support for hard-surface objects and anatomy-aware character rigging. The generated code runs live in the browser without mesh files or downloads.
Getting started
npx --yes img2threejs@latest install
npx --yes img2threejs@latest doctor
For plugins:
npx --yes @img2threejs/img2@latest install --yes
npx --yes @img2threejs/img2@latest plugins
See the repository README for full details.
License and pricing
Licensed under Apache-2.0. Open source.
Based on the project's public README and repository metadata.