Skip to main content
skill CX Codex

scan-to-threejs — Claude Code skill: setup and use

scan-to-threejs is a Claude Code skill that rebuilds editable Three.js rooms from iPhone, RoomPlan JSON, and GLB/glTF scans. It matches models to photos.

MIT ★ 3,114 updated 2026-10-27

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a claude-code
Open on GitHub

What scan-to-threejs does

The skill turns captured geometry into an editable Three.js room. It uses scripts/house_to_rooms.py for house.json, scripts/bundle_to_room.py for session or shared-room bundles with manifest.json, and scripts/measure_scan.mjs for GLB/glTF. Original files and texture coordinates stay intact.

The workflow establishes floors, wall planes, openings, ceiling steps, and object dimensions before detailed modeling. RoomPlan JSON provides walls, openings, and object bounds; it does not establish that photos or depth are available. Separate sessions may use different world frames, so room names cannot align them.

Photos go through prepare_photos.py, while cmp.sh and cmp_photo.sh create matched-camera comparisons through CAP_URL=http://localhost:5188. Those tools assemble comparison images but do not judge similarity. Set CAP_PYTHON when Pillow lives in another Python environment, and keep personal captures plus generated comparisons out of Git.

What it helps with

  • rebuild an editable Three.js room from an iPhone scan
  • convert house.json or a manifest.json bundle into a room
  • measure GLB/glTF geometry while preserving texture coordinates
  • compare a modeled room with posed photos
  • track which details are measured, modeled, or approximate

Example prompts for the agent

  • Rebuild an editable Three.js room from house.json and preserve the original transforms.
  • Run scripts/measure_scan.mjs on this GLB file, then compare the result with the prepared photos.
  • Register RoomModule in demos/index.ts and label the measured, modeled, and approximate details.

How to install scan-to-threejs

1Skills CLI (Vercel)

npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a claude-code

2Manually: put the files in place

~/.claude/skills/scan-to-threejs/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/scan-to-threejs/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about scan-to-threejs

How do I install scan-to-threejs in Claude Code?

Run npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a claude-code, then use ~/.claude/skills/scan-to-threejs/SKILL.md.

What does scan-to-threejs do?

It rebuilds editable Three.js rooms from 3D Model Anything iPhone exports, RoomPlan JSON, and GLB/glTF scans. It also supports photo-guided refinement and matched-camera comparisons.

What does scan-to-threejs need to run?

It needs a source scan and a Three.js project. The comparison scripts require a running service at http://localhost:5188; set CAP_PYTHON when Pillow is installed in another Python environment.

Source text

SKILL.md · MIT
---
name: scan-to-threejs
description: Rebuild editable Three.js rooms from 3D Model Anything iPhone exports, RoomPlan JSON, or GLB/glTF scans. Use for scan-based reconstruction and photo-guided refinement of modeled spaces.
---

# Scan to Three.js

Use captured geometry as measurement evidence and posed photos as visual evidence. Build editable geometry, then compare it against those inputs. Conversion produces a measured baseline; detailed reconstruction requires modeling and visual review.

## Inputs and coordinates

Read [house-capture.md](references/house-capture.md) for iPhone exports. The app's display name is 3D Model Anything; existing `house-capture/*` format identifiers and file layouts remain unchanged.

- For `house.json`, use `scripts/house_to_rooms.py` to select active scans and resolve placement. Separate sessions do not necessarily share a world frame.
- For a session or shared-room bundle containing `manifest.json`, use `scripts/bundle_to_room.py`. Preserve original room indices; a single-room export need not use index zero.
- For GLB/glTF, use `scripts/measure_scan.mjs`. Preserve original files and texture coordinates.
- Raw RoomPlan JSON supplies walls/openings and object bounds; it does not imply that photos or depth are present.

Use meters, +Y up and floor zero. Retain session-to-room and room-to-house transforms. Apply the same transformations to geometry, photo poses, lights and reference layers. Never infer session alignment from matching room names.

## Project setup

Read [project-layout.md](references/project-layout.md) for the companion viewer and commands. Its public office is an optional worked example, not the dimensions or quality requirement for another person's room. In an existing project, adapt to its conventions rather than copying over its application.

Keep new personal captures and generated comparisons ignored by Git. The public demo explicitly includes selected office model assets; that is not permission to publish other captures. Set `S` to this skill's actual `scripts` directory and run helper commands from the target project.

## Measure, model, compare

Establish the floor, wall planes, openings, ceiling steps and object dimensions before adding detail. Use orthographic scan renders and multiple photos to resolve ambiguous shapes. Record uncertainty rather than inventing measurements.

Read [modeling.md](references/modeling.md) for geometry, materials and wall cutaways; read [advanced-modeling.md](references/advanced-modeling.md) for detailed modeling and performance. Match the user's requested fidelity. For a detailed reconstruction, compare silhouettes, construction, material scale, surface graphics and lighting at the intended viewing distance. RoomPlan boxes are bounds, not finished furniture.

Prepare photos in the converted room's array order with `prepare_photos.py`. Preserve the camera pose and intrinsics; see the format reference for sensor orientation. Use the matched-camera tools:

```sh
CAP_URL=http://localhost:5188 "$S/cmp.sh" plan 'room=my-room&view=top&ppm=110'
CAP_URL=http://localhost:5188 "$S/cmp_photo.sh" my-room 0 13 26
```

These tools capture and stitch comparisons; they do not evaluate similarity. Inspect the results, identify concrete discrepancies, fix the largest, and repeat. Do not crop by non-black pixels: empty scan regions are evidence and cropping changes framing. Set `CAP_PYTHON` if Pillow is installed in another Python environment.

Preserve visual quality while optimizing: favor batching, instancing and idle rendering. Compare before/after full-quality images. Independently verify functionality and appearance; a build passing does not establish visual accuracy.

## Delivery

Implement `RoomModule` and register it in `demos/index.ts`. Use `referenceAvailable: false` when reference assets are intentionally absent. Preserve optional photo poses for comparison tooling. Check the production build, relevant viewer modes and browser errors. Include matched-camera evidence and explain which details are measured, modeled or approximate. House assembly uses validated placements, not a hard-coded example floor plan.

© wesbos · MIT · wesbos/3d-model-anything

Similar skills

All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →

Project sponsors

Companies that keep this analytics open