scan-to-threejs — скилл для Claude Code: установка и работа
Скилл scan-to-threejs для Claude Code собирает редактируемые комнаты Three.js из сканов iPhone, RoomPlan JSON и GLB/glTF. Модель сверяется с фото.
MIT ★ 3 114 обновлён 2026-10-27
npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a claude-codeЧто делает scan-to-threejs
Скилл преобразует захваченные данные в редактируемую комнату Three.js. Для house.json он использует scripts/house_to_rooms.py, для наборов с manifest.json — scripts/bundle_to_room.py, а для GLB/glTF — scripts/measure_scan.mjs. Исходные файлы и координаты текстур сохраняются.
Сначала задаются пол, стены, проёмы, потолочные уровни и размеры объектов, затем добавляются материалы и детали. RoomPlan JSON даёт стены, проёмы и габариты объектов, но не подтверждает наличие фото или глубины. Отдельные сессии не обязаны иметь общую мировую систему координат, поэтому названия комнат нельзя использовать для их выравнивания.
Фото подготавливаются через prepare_photos.py, а сравнения запускаются скриптами cmp.sh и cmp_photo.sh через CAP_URL=http://localhost:5188. Эти инструменты собирают сопоставленные изображения, но не оценивают сходство сами. Для другого окружения с Pillow задаётся CAP_PYTHON; личные сканы и созданные сравнения нужно оставить вне Git.
Какие задачи решает
- собрать редактируемую комнату Three.js из скана iPhone
- перевести
house.jsonили набор сmanifest.jsonв комнату - измерить геометрию GLB/glTF без потери координат текстур
- сопоставить модель с фото через согласованную камеру
- разделить измеренные, смоделированные и приблизительные детали
Примеры запросов агенту
- Собери редактируемую комнату Three.js из
house.jsonи сохрани исходные трансформации. - Преобразуй GLB-файл через
scripts/measure_scan.mjs, затем сравни модель с подготовленными фото. - Зарегистрируй
RoomModuleвdemos/index.tsи покажи, какие детали измерены, смоделированы или приблизительны.
Как установить scan-to-threejs
1Через Skills CLI (Vercel)
npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a claude-code2Вручную: положить файлы
~/.claude/skills/scan-to-threejs/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/scan-to-threejs/
1Через Skills CLI (Vercel)
npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a codex2Вручную: положить файлы
.agents/skills/scan-to-threejs/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a cursor2Вручную: положить файлы
.cursor/skills/scan-to-threejs/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install wesbos/3d-model-anything .agents/skills/scan-to-threejs2Вручную: положить файлы
.github/skills/scan-to-threejs/SKILL.md1Через Skills CLI (Vercel)
npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a gemini-cli2Командой платформы
gemini skills install https://github.com/wesbos/3d-model-anything --path .agents/skills/scan-to-threejsВручную: положить файлы
.devin/skills/scan-to-threejs/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о scan-to-threejs
Как установить scan-to-threejs в Claude Code?
Выполни npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a claude-code, затем используй файл ~/.claude/skills/scan-to-threejs/SKILL.md.
Что делает scan-to-threejs?
Скилл превращает iPhone-экспорты 3D Model Anything, RoomPlan JSON и GLB/glTF-сканы в редактируемые комнаты Three.js. Он помогает сравнивать геометрию с фото и уточнять модель.
Что нужно для работы scan-to-threejs?
Нужен исходный скан и проект с Three.js. Для сравнений через cmp.sh и cmp_photo.sh требуется запущенный сервис по адресу http://localhost:5188; если Pillow находится в другом окружении Python, задаётся CAP_PYTHON.
Исходный текст
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