{
  "$defs": {
    "InstanceExtras": {
      "additionalProperties": false,
      "description": "``extras.scenebrew`` on a prop instance node: what placed it, what it is.",
      "examples": [
        {
          "design": "0199a1c0-0000-7000-8000-0000000000e0",
          "docks": "0199a1c0-0000-7000-8000-0000000000d2,0199a1c0-0000-7000-8000-0000000000d3",
          "mesh": {
            "asset": "0199a1c0-0000-7000-8000-0000000000f1",
            "materials": {
              "*": "0199a1c0-0000-7000-8000-0000000000c1"
            },
            "sha256": "a1abfd410973b0111c215baa879b9edcd739e601659ba44168269767cc2e9108"
          },
          "node": "0199a1c0-0000-7000-8000-0000000000d1",
          "recipe": "0199a1c0-0000-7000-8000-0000000000e1",
          "role": "object",
          "subtype": "platform"
        }
      ],
      "properties": {
        "node": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "PEG node id of the point it stands on",
          "title": "Node"
        },
        "role": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "PEG node role of that point",
          "title": "Role"
        },
        "subtype": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "PEG node subtype of that point",
          "title": "Subtype"
        },
        "docks": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A ride's two dock node ids, comma-joined",
          "title": "Docks"
        },
        "pair": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "A teleporter's partner node id",
          "title": "Pair"
        },
        "recipe": {
          "description": "The recipe that placed the instance",
          "minLength": 1,
          "title": "Recipe",
          "type": "string"
        },
        "entry": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The scatter entry key, for a scattered instance",
          "title": "Entry"
        },
        "design": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The design holding the recipe",
          "title": "Design"
        },
        "mesh": {
          "anyOf": [
            {
              "$ref": "#/$defs/MeshReference"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The library mesh it instantiates; absent for a stand-in that binds none"
        }
      },
      "required": [
        "recipe"
      ],
      "title": "InstanceExtras",
      "type": "object"
    },
    "MaterialExtras": {
      "additionalProperties": false,
      "description": "``extras.scenebrew`` on a material: what it stands for and its fallback.",
      "examples": [
        {
          "asset": "0199a1c0-0000-7000-8000-0000000000c1",
          "body": "lava_pool",
          "fallback_color": [
            0.9,
            0.3,
            0.05,
            1.0
          ],
          "label": "lava",
          "role": "terrain"
        },
        {
          "asset": null,
          "body": "terrain",
          "fallback_color": [
            0.42,
            0.62,
            0.32,
            1.0
          ],
          "label": "ground",
          "role": "terrain"
        }
      ],
      "properties": {
        "asset": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Library material asset the material stands for; null for an unbound label",
          "title": "Asset"
        },
        "label": {
          "description": "The surface label it renders (ground, path, wall, lava, …) or, for a prop, the material slot it fills (material:<key>:<slot>)",
          "minLength": 1,
          "title": "Label",
          "type": "string"
        },
        "role": {
          "description": "terrain: a terrain body's bucket; prop: instanced geometry",
          "enum": [
            "terrain",
            "prop"
          ],
          "title": "Role",
          "type": "string"
        },
        "body": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The terrain body the material belongs to; null for a prop",
          "title": "Body"
        },
        "fallback_color": {
          "description": "Linear RGBA shown while the material's maps are not embedded",
          "maxItems": 4,
          "minItems": 4,
          "prefixItems": [
            {
              "maximum": 1.0,
              "minimum": 0.0,
              "type": "number"
            },
            {
              "maximum": 1.0,
              "minimum": 0.0,
              "type": "number"
            },
            {
              "maximum": 1.0,
              "minimum": 0.0,
              "type": "number"
            },
            {
              "maximum": 1.0,
              "minimum": 0.0,
              "type": "number"
            }
          ],
          "title": "Fallback Color",
          "type": "array"
        }
      },
      "required": [
        "asset",
        "label",
        "role",
        "body",
        "fallback_color"
      ],
      "title": "MaterialExtras",
      "type": "object"
    },
    "MeshReference": {
      "additionalProperties": false,
      "description": "The library mesh an instance node instantiates.",
      "properties": {
        "asset": {
          "description": "Library mesh asset UUID",
          "format": "uuid",
          "title": "Asset",
          "type": "string"
        },
        "sha256": {
          "description": "Lowercase hex SHA-256 of the mesh file",
          "pattern": "^[0-9a-f]{64}$",
          "title": "Sha256",
          "type": "string"
        },
        "materials": {
          "additionalProperties": {
            "format": "uuid",
            "type": "string"
          },
          "description": "Mesh material slot name → library material asset overriding it; \"*\" overrides every slot",
          "propertyNames": {
            "minLength": 1
          },
          "title": "Materials",
          "type": "object"
        }
      },
      "required": [
        "asset",
        "sha256"
      ],
      "title": "MeshReference",
      "type": "object"
    },
    "SceneExtras": {
      "additionalProperties": false,
      "description": "``extras.scenebrew`` on the scene: provenance and the output options.",
      "examples": [
        {
          "blueprint": "0199a1c0-0000-7000-8000-0000000000b1",
          "materials": "reference",
          "meshes": "embed",
          "schema_version": "1.0.0"
        }
      ],
      "properties": {
        "schema_version": {
          "const": "1.0.0",
          "default": "1.0.0",
          "description": "Version of the extras contract",
          "title": "Schema Version",
          "type": "string"
        },
        "blueprint": {
          "description": "UUID of the blueprint the scene cooks",
          "format": "uuid",
          "title": "Blueprint",
          "type": "string"
        },
        "materials": {
          "description": "reference: materials carry no images; embed: maps embedded",
          "enum": [
            "reference",
            "embed"
          ],
          "title": "Materials",
          "type": "string"
        },
        "meshes": {
          "description": "reference: prop instance nodes carry no mesh; embed: meshes embedded",
          "enum": [
            "reference",
            "embed"
          ],
          "title": "Meshes",
          "type": "string"
        }
      },
      "required": [
        "blueprint",
        "materials",
        "meshes"
      ],
      "title": "SceneExtras",
      "type": "object"
    }
  },
  "anyOf": [
    {
      "$ref": "#/$defs/SceneExtras"
    },
    {
      "$ref": "#/$defs/MaterialExtras"
    },
    {
      "$ref": "#/$defs/InstanceExtras"
    }
  ],
  "description": "Any ``extras.scenebrew`` object; its position in the glTF names the shape.",
  "examples": [
    {
      "blueprint": "0199a1c0-0000-7000-8000-0000000000b1",
      "materials": "reference",
      "meshes": "embed",
      "schema_version": "1.0.0"
    },
    {
      "asset": "0199a1c0-0000-7000-8000-0000000000c1",
      "body": "lava_pool",
      "fallback_color": [
        0.9,
        0.3,
        0.05,
        1.0
      ],
      "label": "lava",
      "role": "terrain"
    },
    {
      "design": "0199a1c0-0000-7000-8000-0000000000e0",
      "docks": "0199a1c0-0000-7000-8000-0000000000d2,0199a1c0-0000-7000-8000-0000000000d3",
      "mesh": {
        "asset": "0199a1c0-0000-7000-8000-0000000000f1",
        "materials": {
          "*": "0199a1c0-0000-7000-8000-0000000000c1"
        },
        "sha256": "a1abfd410973b0111c215baa879b9edcd739e601659ba44168269767cc2e9108"
      },
      "node": "0199a1c0-0000-7000-8000-0000000000d1",
      "recipe": "0199a1c0-0000-7000-8000-0000000000e1",
      "role": "object",
      "subtype": "platform"
    }
  ],
  "title": "GlbExtras"
}
