ralpha-assets/RalphaData/recipes/recipe.schema.json

138 lines
3.7 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Ralpha Scene Recipe",
"description": "Composite scene definition for instant spawning",
"type": "object",
"required": ["recipe_id", "name", "components"],
"properties": {
"recipe_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": "string",
"enum": ["interior", "exterior", "portrait", "product", "vehicle", "custom"]
},
"template_map": {
"type": "string",
"description": "Base template map to use",
"enum": ["Template_Empty", "Template_Studio", "Template_Outdoor", "Template_Interior"]
},
"components": {
"type": "array",
"items": { "$ref": "#/definitions/Component" }
},
"lighting_preset": {
"type": "string",
"description": "Lighting preset ID to apply"
},
"post_preset": {
"type": "string",
"description": "Post-processing preset ID to apply"
},
"camera_preset": {
"type": "string",
"description": "Camera preset ID to apply"
},
"sky_preset": {
"type": "string",
"description": "Sky/atmosphere preset to apply"
},
"dependencies": {
"type": "array",
"items": { "type": "string" },
"description": "Other recipe IDs that must be spawned first"
},
"tags": {
"type": "array",
"items": { "type": "string" }
}
},
"definitions": {
"Component": {
"type": "object",
"required": ["asset"],
"properties": {
"asset": {
"type": "string",
"description": "Asset ID from catalogue"
},
"position": {
"oneOf": [
{
"type": "array",
"items": { "type": "number" },
"minItems": 3,
"maxItems": 3,
"description": "Absolute [x, y, z] position"
},
{
"type": "string",
"description": "Relative position (e.g., 'center', 'in_front_of:Sofa', 'wall:north')"
}
]
},
"rotation": {
"type": "array",
"items": { "type": "number" },
"minItems": 3,
"maxItems": 3,
"description": "[pitch, yaw, roll] in degrees"
},
"scale": {
"oneOf": [
{ "type": "number" },
{
"type": "array",
"items": { "type": "number" },
"minItems": 3,
"maxItems": 3
}
],
"default": 1.0
},
"facing": {
"type": "string",
"description": "What the object should face",
"enum": ["focal_point", "camera", "center", "north", "south", "east", "west", "away"]
},
"placement": {
"type": "string",
"enum": ["floor", "wall", "surface", "hanging", "floating"],
"default": "floor"
},
"offset": {
"type": "array",
"items": { "type": "number" },
"minItems": 3,
"maxItems": 3,
"description": "Offset from calculated position"
},
"attach_to": {
"type": "string",
"description": "Asset ID to attach to"
},
"socket": {
"type": "string",
"description": "Socket name for attachment"
},
"optional": {
"type": "boolean",
"default": false,
"description": "Skip if asset not found"
},
"variants": {
"type": "object",
"description": "Material/property overrides"
}
}
}
}
}