Agent Skills › wesbos/3d-model-anything › scan-to-threejs

scan-to-threejs

GitHub

将iPhone扫描、RoomPlan JSON或GLB/glTF模型转换为可编辑的Three.js房间场景。支持测量基准建立、几何建模及照片辅助验证,用于空间重建与可视化。

.agents/skills/scan-to-threejs/SKILL.md wesbos/3d-model-anything

Trigger Scenarios

需要基于3D扫描数据重建室内场景 将RoomPlan或GLB格式转换为Three.js可交互模型 进行空间几何测量与视觉比对

Install

npx skills add wesbos/3d-model-anything --skill scan-to-threejs -g -y
More Options

Non-standard path

npx skills add https://github.com/wesbos/3d-model-anything/tree/main/.agents/skills/scan-to-threejs -g -y

Use without installing

npx skills use wesbos/3d-model-anything@scan-to-threejs

指定 Agent (Claude Code)

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

安装 repo 全部 skill

npx skills add wesbos/3d-model-anything --all -g -y

预览 repo 内 skill

npx skills add wesbos/3d-model-anything --list

SKILL.md

Frontmatter
{
    "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 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 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 for geometry, materials and wall cutaways; read 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:

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.

Version History

  • 31b2dc9 Current 2026-11-07 08:57

Metadata

Files
0
Version
31b2dc9
Hash
44c6056f
Indexed
2026-11-07 08:57

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-07 10:18
浙ICP备14020137号-1