Files
hexifyer/package.json
Axel Meyer bc7d5a3cc7 Add vision-LLM import pipeline for hex terrain classification
Adds a 3-phase pipeline to populate a HexMap from a source image using
Claude's vision capabilities instead of naive pixel-color matching:

Phase 1 (extract-submaps): crops annotated submap PNGs per hex,
  including center + 6 neighbours with SVG overlay.
Phase 2: Claude classifies submaps in a Code session, writing
  classifications.json — resumable across sessions.
Phase 3 (import-from-json): reads classifications.json into the DB.

Also adds assemble-map.ts to reconstruct a full image from a Leaflet
tile pyramid (used to recover the Aventurien source map from kiepenkerl).

Adds CLAUDE.md documenting the approach, scale constants
(PIXELS_PER_MEILE=8, hexSize=40 = 10 Meilen/Hex), and the
Nord/Mitte/Süd region split for the Aventurien map.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 09:49:01 +02:00

38 lines
1.0 KiB
JSON

{
"name": "hexifyer",
"version": "0.1.0",
"description": "Hex grid overlay tool for fantasy maps",
"private": true,
"type": "module",
"scripts": {
"dev": "concurrently \"vite --host 127.0.0.1 --port 5174\" \"tsx watch server/index.ts\"",
"build": "vite build",
"preview": "vite preview",
"test": "vitest run",
"test:watch": "vitest",
"server": "tsx server/index.ts",
"pipeline:tiles": "tsx pipeline/generate-tiles.ts",
"pipeline:assemble": "tsx pipeline/assemble-map.ts",
"pipeline:extract": "tsx pipeline/extract-submaps.ts",
"pipeline:import": "tsx pipeline/import-from-json.ts"
},
"devDependencies": {
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"@types/leaflet": "^1.9.21",
"sharp": "^0.33.0",
"tsx": "^4.19.0",
"typescript": "^5.7.0",
"vite": "^6.0.0",
"vitest": "^3.0.0"
},
"dependencies": {
"@anthropic-ai/sdk": "^0.89.0",
"concurrently": "^9.2.1",
"cors": "^2.8.6",
"express": "^5.2.1",
"leaflet": "^1.9.4",
"sql.js": "^1.14.1"
}
}