{"id":49494626,"url":"https://github.com/hmmf022/loadcraft","last_synced_at":"2026-05-01T08:33:52.217Z","repository":{"id":341972026,"uuid":"1161488949","full_name":"hmmf022/loadcraft","owner":"hmmf022","description":"Container loading simulator with WebGPU 3D visualization / WebGPU 3D コンテナ積載シミュレータ","archived":false,"fork":false,"pushed_at":"2026-03-23T04:31:11.000Z","size":722,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-24T00:48:29.989Z","etag":null,"topics":["3d","container-loading","react","simulator","typescript","vite","voxel","webgpu","wgsl","zustand"],"latest_commit_sha":null,"homepage":"https://loadcraft.pages.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmmf022.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-19T06:55:44.000Z","updated_at":"2026-03-23T04:19:28.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hmmf022/loadcraft","commit_stats":null,"previous_names":["hmmf022/loadcraft"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/hmmf022/loadcraft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmmf022%2Floadcraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmmf022%2Floadcraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmmf022%2Floadcraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmmf022%2Floadcraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmmf022","download_url":"https://codeload.github.com/hmmf022/loadcraft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmmf022%2Floadcraft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32490813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","container-loading","react","simulator","typescript","vite","voxel","webgpu","wgsl","zustand"],"created_at":"2026-05-01T08:33:52.104Z","updated_at":"2026-05-01T08:33:52.209Z","avatar_url":"https://github.com/hmmf022.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LoadCraft\n\nWebGPU 3D ビジュアライゼーションによるコンテナ積載シミュレータ。\n\n\u003e [English README](README.md)\n\n## 機能\n\n- **3D WebGPU レンダリング** — WGSL シェーダによるリアルタイムインスタンス描画\n- **ドラッグ＆ドロップ配置** — サイドバーからコンテナへ荷物を配置\n- **衝突判定** — 1cm ボクセル精度のオーバーラップ検出\n- **重量・安定性分析** — 総重量、重心偏差、支持率の算出\n- **Undo / Redo** — コマンドパターンによる完全な履歴管理\n- **Save / Load** — JSON プロジェクトファイル、CSV/JSON 荷物インポート\n- **カメラプリセット** — Front / Back / Left / Right / Top / Iso + 自由回転\n- **グリッドスナップ** — 1 / 5 / 10 cm のスナップ切替\n- **レスポンシブ対応** — デスクトップサイドバー + モバイルハンバーガーメニュー\n- **ボクセルシェイプエディタ** — Minecraft 風ブロックエディタで複合形状の荷物を作成\n- **自動積載失敗理由** — 配置不可アイテムの理由コードを UI と MCP の両方で確認可能\n\n## 必要環境\n\n- Node.js（Vite 7.x 対応版）\n- WebGPU 対応ブラウザ（Chrome 113+, Edge 113+ など）\n\n## はじめに\n\n```bash\ngit clone https://github.com/\u003cyour-username\u003e/loadcraft.git\ncd loadcraft\nnpm install\nnpm run dev\n```\n\n- シミュレータ: `http://localhost:5173/`\n- シェイプエディタ: `http://localhost:5173/editor.html`\n\n## スクリプト\n\n| コマンド | 説明 |\n|---|---|\n| `npm run dev` | 開発サーバー起動 |\n| `npm run build` | 型チェック + プロダクションビルド |\n| `npm run lint` | ESLint |\n| `npm test` | テスト実行（Vitest） |\n\n## 技術スタック\n\nWebGPU + WGSL, React 19, Zustand, TypeScript, Vite\n\n## アーキテクチャ\n\n3層構造 — UI・Core・Renderer を分離。\n\n```\nUI (React + Zustand)  →  Core (VoxelGrid, Physics)  →  Renderer (WebGPU)\n```\n\n- **Core** (`src/core/`) — データ層。VoxelGrid、衝突判定、重量/重力分析、履歴、保存/読込、インポート/エクスポート。DOM・GPU 依存なし。\n- **Renderer** (`src/renderer/`) — WebGPU 描画。シェーダ、カメラ、パイプライン。React 依存なし。\n- **UI + State** (`src/ui/`, `src/state/`) — React コンポーネント + Zustand ストア。ストアが唯一の信頼源。\n\n## プロジェクト構成\n\n```\nsrc/\n├── core/           # VoxelGrid, Voxelizer, History, WeightCalculator, ...\n├── renderer/       # WebGPU Renderer, Camera, Raycaster, Pipelines, Shaders\n├── state/          # Zustand ストア\n├── ui/             # React コンポーネント (App, Sidebar, ToolBar, StatsPanel, ...)\n├── editor/         # ボクセルシェイプエディタ（別エントリポイント）\n│   ├── renderer/   # エディタ専用 WebGPU レンダラー\n│   ├── state/      # エディタ Reducer + 履歴\n│   └── ui/         # エディタ UI コンポーネント\n└── main.tsx        # シミュレータ エントリポイント\ndocs/               # 設計書\neditor.html         # シェイプエディタ HTML エントリ\n```\n\n## MCP サーバー (Docker)\n\n2 つの MCP サーバー（simulator / editor）を Docker で実行できます。tsup が全依存を単一 JS ファイルにバンドルするため、ランタイムイメージは Node.js + JS ファイル 2 つだけで動作します。\n\n```bash\n# ビルド\ndocker build -t loadcraft-mcp .\n\n# simulator MCP テスト\necho '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}' | docker run --rm -i loadcraft-mcp\n\n# editor MCP テスト\necho '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}' | docker run --rm -i loadcraft-mcp node dist-mcp-editor/main.js\n```\n\n### `.mcp.json` 設定例\n\n```json\n{\n  \"mcpServers\": {\n    \"loadcraft\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"loadcraft-mcp\"]\n    },\n    \"loadcraft-editor\": {\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"--rm\", \"-i\", \"loadcraft-mcp\", \"node\", \"dist-mcp-editor/main.js\"]\n    }\n  }\n}\n```\n\nファイル永続化が必要な場合は `args` に `-v ./data:/data` を追加してください。\n\n`auto_pack` MCP ツールは、配置できなかった荷物の理由コードを `failureReasons` で返します。\nMCP の ShapeData 取り込み/出力は 1cm ブロック固定（`gridSize` は `1` のみ対応）で、エディタの表示倍率は UI 専用です。\n\n## ライセンス\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmmf022%2Floadcraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmmf022%2Floadcraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmmf022%2Floadcraft/lists"}