five-on-it / apps/tools/src/city-level
apps/tools/src/city-level
A level from a city spec (npm run level:city -- <spec.json>): @foi/catalogue's solver resolves the spec into a plan (its roads, rivers, hills, roundabouts, districts, parks), or says what it cannot build; then the city generator builds the plan in headless Blender (assets/blender/levels/generate.py --plan, city.py) and writes what it writes for a town, into the kits folder (or --out): the level's own kit (<name>.glb and <name>.foi.json), its recipe and its places. Then level:recipe and level:export, as for any recipe. The worker runs the same for a draft's city.