{"id":45189825,"url":"https://github.com/tribixbite/craftmatic","last_synced_at":"2026-05-27T14:13:08.885Z","repository":{"id":337329442,"uuid":"1153120637","full_name":"tribixbite/craftmatic","owner":"tribixbite","description":"Minecraft schematic toolkit — parse, generate, render, and convert .schem files","archived":false,"fork":false,"pushed_at":"2026-03-04T15:51:52.000Z","size":110274,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-04T22:46:43.330Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tribixbite.github.io/craftmatic/","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/tribixbite.png","metadata":{"files":{"readme":"README.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-08T23:18:10.000Z","updated_at":"2026-03-04T16:04:13.000Z","dependencies_parsed_at":"2026-02-09T05:00:16.916Z","dependency_job_id":null,"html_url":"https://github.com/tribixbite/craftmatic","commit_stats":null,"previous_names":["tribixbite/craftmatic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tribixbite/craftmatic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tribixbite%2Fcraftmatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tribixbite%2Fcraftmatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tribixbite%2Fcraftmatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tribixbite%2Fcraftmatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tribixbite","download_url":"https://codeload.github.com/tribixbite/craftmatic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tribixbite%2Fcraftmatic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30117470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T08:19:04.902Z","status":"ssl_error","status_checked_at":"2026-03-05T08:17:37.148Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-02-20T12:00:23.654Z","updated_at":"2026-05-27T14:13:08.879Z","avatar_url":"https://github.com/tribixbite.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# craftmatic\n\nMinecraft schematic toolkit — parse, generate, render, and convert `.schem` files.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/castle_steampunk.png\" width=\"400\" alt=\"Steampunk Castle\"\u003e\n  \u003cimg src=\"docs/images/village_desert.png\" width=\"400\" alt=\"Desert Village\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/cathedral_elven.png\" width=\"400\" alt=\"Elven Cathedral\"\u003e\n  \u003cimg src=\"docs/images/ship_fantasy.png\" width=\"400\" alt=\"Fantasy Ship\"\u003e\n\u003c/p\u003e\n\n\u003e Textured isometric renders — 334 Faithful 32x textures, 10 structure types, 9 architectural styles\n\n## Features\n\n- **Parse \u0026 Write** Sponge Schematic v2 (`.schem`) files\n- **Generate** structures with 10 types, 9 style presets, and 20 room types\n- **Render** textured 2D PNG floor plans, cutaway isometrics, and exterior views\n- **View** schematics in an interactive 3D viewer (Three.js)\n- **Export** standalone HTML viewers\n- **Convert** between Three.js scenes and `.schem` format\n- **Web App** — browser-based toolkit with structure generation, upload, gallery, and export\n- Works as both a **library** and **CLI tool**\n\n## Install\n\n```bash\nnpm install craftmatic\n```\n\n## CLI\n\n```bash\n# Print schematic info\nnpx craftmatic info building.schem\n\n# Render 2D PNGs (floor plans, cutaways, exterior)\nnpx craftmatic render building.schem\n\n# Open interactive 3D viewer\nnpx craftmatic view building.schem\n\n# Export standalone HTML viewer\nnpx craftmatic export building.schem viewer.html\n\n# Generate a structure\nnpx craftmatic gen house --floors 3 --style fantasy --seed 42\n\n# Build texture atlas (334 Faithful 32x textures + procedural fallback)\nnpx craftmatic atlas textures.png\n```\n\n### Generation Options\n\n```\nnpx craftmatic gen [type] [options]\n\nTypes: house, tower, castle, dungeon, ship, cathedral, bridge, windmill, marketplace, village\n\nOptions:\n  -f, --floors \u003cn\u003e     Number of floors (default: 2)\n  -s, --style \u003cstyle\u003e  Building style (default: fantasy)\n  -r, --rooms \u003clist\u003e   Comma-separated room list\n  -w, --width \u003cn\u003e      Building width\n  -l, --length \u003cn\u003e     Building length\n  -o, --output \u003cpath\u003e  Output file path\n  --seed \u003cn\u003e           Random seed\n```\n\n### Styles\n\n`fantasy` | `medieval` | `modern` | `gothic` | `rustic` | `steampunk` | `elven` | `desert` | `underwater`\n\n### Room Types\n\n`living` `dining` `kitchen` `foyer` `bedroom` `bathroom` `study` `library` `vault` `armory` `observatory` `lab` `gallery` `throne` `forge` `greenhouse` `captains_quarters` `cell` `nave` `belfry`\n\n## Library API\n\n```typescript\nimport {\n  parseSchematic,\n  parseToGrid,\n  writeSchematic,\n  generateStructure,\n  renderFloorDetail,\n  renderCutawayIso,\n  renderExterior,\n  exportHTML,\n  schemToThree,\n  threeToSchem,\n  initDefaultAtlas,\n  buildAtlasForBlocks,\n} from 'craftmatic';\n\n// Parse a schematic\nconst data = await parseSchematic('building.schem');\nconst grid = await parseToGrid('building.schem');\n\n// Generate a structure\nconst house = generateStructure({\n  type: 'house',\n  floors: 3,\n  style: 'fantasy',\n  rooms: ['vault', 'observatory', 'lab'],\n  seed: 42,\n});\n\n// Write to .schem\nwriteSchematic(house, 'output.schem');\n\n// Render 2D PNGs\nconst floorPng = await renderFloorDetail(grid, 0, { scale: 40 });\nconst cutawayPng = await renderCutawayIso(grid, 0, { tile: 12 });\nconst exteriorPng = await renderExterior(grid, { tile: 8 });\n\n// Export HTML viewer\nexportHTML(grid, 'viewer.html');\n\n// Convert to Three.js\nconst threeGroup = schemToThree(data);\n\n// Convert Three.js back to schematic\nconst schemData = threeToSchem(threeGroup);\n\n// Build texture atlas (334 Faithful 32x textures + procedural fallback)\nconst atlas = await initDefaultAtlas();\nconst pngBuffer = await atlas.toPNG();\nconst uvMap = atlas.toJSON();\n```\n\n## Web App\n\nA full-featured browser-based toolkit is included. Try the [live demo](https://tribixbite.github.io/craftmatic/) or run it locally:\n\n```bash\nnpm run dev:web      # Dev server on port 4000\nnpm run build:web    # Production build → web/dist/\nnpm run preview:web  # Preview production build\n```\n\n**Features:**\n- Generate any of 10 structure types with 9 styles, full parameter controls, and live 3D preview\n- Upload `.schem` files with drag-and-drop — browser-native NBT parsing (no server required)\n- Gallery of 20 pre-generated showcase structures with isometric thumbnails\n- Interactive Three.js viewer with cutaway slider, orbit controls, non-cube geometries, and Faithful 32x textures\n- Export to GLB (binary glTF), `.schem`, or standalone HTML\n- Responsive dark-mode UI optimized for mobile and desktop\n\n## Textures\n\nThe bundled texture atlas uses a hybrid system:\n\n- **334 real block textures** from [Faithful 32x](https://faithfulpack.net) (CC-BY-SA) at 32x32 resolution\n- **Procedural fallback** for blocks without a real texture — generated with pattern-matched algorithms (grain, speckle, brick, etc.)\n- **17 custom item sprites** — hand-drawn 16x16 furniture sprites for floor plan rendering (beds, chests, lanterns, flower pots, etc.)\n\nBoth 2D renderers (floor plans, isometric) and the 3D viewer use the texture atlas for per-block, per-face texture mapping. See `textures/ATTRIBUTION.md` for license details.\n\n## Development\n\n```bash\ngit clone https://github.com/tribixbite/craftmatic.git\ncd craftmatic\nnpm install\nnpm run build        # Build library\nnpm run build:web    # Build web app\nnpm run typecheck    # Type-check all code\nnpm test             # Run test suite (93 tests)\n```\n\n## Specs\n\nDetailed technical documentation is in [`docs/specs/`](docs/specs/README.md):\n\n- [Architecture](docs/specs/architecture.md) — module layout and data flow\n- [Schematic Format](docs/specs/schematic-format.md) — Sponge Schematic v2 parsing\n- [Block Mapping](docs/specs/block-mapping.md) — block state to color/texture system\n- [Generation Styles](docs/specs/generation-styles.md) — style preset system\n- [Conversion](docs/specs/conversion-spec.md) — Three.js bidirectional conversion\n- [Rendering](docs/specs/rendering.md) — 2D PNG and 3D rendering pipeline\n- [Web Application](docs/specs/web-app.md) — browser toolkit with Vite + Three.js\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftribixbite%2Fcraftmatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftribixbite%2Fcraftmatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftribixbite%2Fcraftmatic/lists"}