five-on-it / apps/tools/src/recipe
apps/tools/src/recipe
Recipes: a level described by what it places, in the game's frame, turned into an editor scene (npm run level:recipe -- <file.recipe.json> --scene <name>). A recipe names its kits, places kit pieces (kit/piece) and blocks (block:<kind>) with a position, a yaw, a pitch and a scale (a road script's values for a road piece, a block script's params for a block: a door's lock, a container's kind, items and lock), and lists its roads (polylines, laid as road blocks: a chain of slabs for a bend), spawn points (each with its role, when it has one), nail strips and dummies. The Blender generators write recipes (assets/blender/levels/*.py); levelToRecipe makes one from a level, so a block level can be dressed with kit pieces at the same coordinates. exportRecipe turns a recipe into level data in memory, the way the generator worker does (apps/worker).