К основному содержанию
скилл CX Codex

scan-to-threejs — скилл для Claude Code: установка и работа

Скилл scan-to-threejs для Claude Code собирает редактируемые комнаты Three.js из сканов iPhone, RoomPlan JSON и GLB/glTF. Модель сверяется с фото.

MIT ★ 3 114 обновлён 2026-10-27

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add wesbos/3d-model-anything --skill scan-to-threejs -a claude-code
Открыть на GitHub

Что делает 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-code

2Вручную: положить файлы

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

Папка скилла целиком; для одного проекта — .claude/skills/scan-to-threejs/

По шагам, с командами для каждой платформы: Как установить скилл в 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

Похожие скиллы

Все скиллы по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →
threejs MengTo Помогает агенту собирать и отлаживать интерактивные 3D-сцены на Three.js: сцена, камера, свет, загрузка glTF, контролы и производительность. CX Codex +1 2 500установок threejs-loaders CloudAI-X Скилл threejs-loaders обучает ИИ загружать 3D-модели glTF, текстуры и HDR-карты в three.js r186. Пригодится при настройке ассетов, цветовых пространств и шкалы прогресса для WebGL или WebGPU. CX Codex +1 18 400установок 3DAssets.dev 3dassets-dev MCP-сервер 3DAssets.dev находит и скачивает бесплатные 3D-модели GLB с лицензией CC0 для three.js или Godot прямо через агента. Пригодится при сборке сцен без ручного поиска файлов. CX Codex +1 ★ 8звёзд репо threejs-webgl freshtechbro Скилл threejs-webgl для Claude Code учит агента настраивать сцены Three.js, рендереры WebGL и WebGPU, свет, материалы и загрузку glTF-моделей. Описывает настройку Three.js для 3D-визуализаций и конфигураторов. CX Codex +1 5 300установок threejs-scene-composition calesthio Скилл threejs-scene-composition для Claude Code помогает собрать и анимировать Three.js-сцену для рендер-медиа. Включается для продуктовых 3D-кадров, титров, процедурных миров и проверки рендера. CX Codex +1 169установок threejs-3d-generator majidmanzarpour Скилл threejs-3d-generator генерирует 3D-модели для игр на Three.js через Tripo API: из текста или картинки, с текстурами, ригом и анимациями, и складывает готовые GLB или FBX в проект. CX Codex +1 4 400установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой