{
  "$defs": {
    "Binding": {
      "additionalProperties": false,
      "description": "Which series drives a shape, and the values drawn empty and full.",
      "properties": {
        "high": {
          "default": 1.0,
          "title": "High",
          "type": "number"
        },
        "low": {
          "default": 0.0,
          "title": "Low",
          "type": "number"
        },
        "series": {
          "minLength": 1,
          "title": "Series",
          "type": "string"
        }
      },
      "required": [
        "series"
      ],
      "title": "Binding",
      "type": "object"
    },
    "Mark": {
      "additionalProperties": false,
      "properties": {
        "at": {
          "title": "At",
          "type": "number"
        },
        "label": {
          "default": "",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "at"
      ],
      "title": "Mark",
      "type": "object"
    },
    "Shape": {
      "additionalProperties": false,
      "description": "One element of a schematic: a vessel that fills, a bar that grows, a\nlamp that lights, a pipe, or a label. Placed on a plane, y upwards, in the\nscene's units; `depth` is used only in 3D.",
      "properties": {
        "color": {
          "default": "#2458b3",
          "pattern": "^#[0-9a-fA-F]{6}$",
          "title": "Color",
          "type": "string"
        },
        "depth": {
          "default": 1.0,
          "exclusiveMinimum": 0,
          "title": "Depth",
          "type": "number"
        },
        "height": {
          "default": 1.0,
          "exclusiveMinimum": 0,
          "title": "Height",
          "type": "number"
        },
        "id": {
          "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$",
          "title": "Id",
          "type": "string"
        },
        "kind": {
          "enum": [
            "vessel",
            "bar",
            "lamp",
            "pipe",
            "label"
          ],
          "title": "Kind",
          "type": "string"
        },
        "label": {
          "default": "",
          "title": "Label",
          "type": "string"
        },
        "marks": {
          "default": [],
          "description": "Vessels and bars: lines at these values",
          "items": {
            "$ref": "#/$defs/Mark"
          },
          "title": "Marks",
          "type": "array"
        },
        "threshold": {
          "default": 0.5,
          "description": "Lamps and pipes: on above this value",
          "title": "Threshold",
          "type": "number"
        },
        "to_x": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Pipes: where the pipe ends",
          "title": "To X"
        },
        "to_y": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "To Y"
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Binding"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The series the shape shows"
        },
        "width": {
          "default": 1.0,
          "exclusiveMinimum": 0,
          "title": "Width",
          "type": "number"
        },
        "x": {
          "title": "X",
          "type": "number"
        },
        "y": {
          "title": "Y",
          "type": "number"
        }
      },
      "required": [
        "id",
        "kind",
        "x",
        "y"
      ],
      "title": "Shape",
      "type": "object"
    }
  },
  "$id": "mokili.scene/1",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "A schematic picture of a system, driven by a run's series. It explains a\nresult; it never produces one.",
  "properties": {
    "assumptions": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Assumptions",
      "type": "array"
    },
    "description": {
      "default": "",
      "title": "Description",
      "type": "string"
    },
    "models": {
      "description": "The models whose runs it draws",
      "items": {
        "pattern": "^sha256:[0-9a-f]{64}$",
        "type": "string"
      },
      "minItems": 1,
      "title": "Models",
      "type": "array"
    },
    "name": {
      "minLength": 1,
      "title": "Name",
      "type": "string"
    },
    "schema": {
      "const": "mokili.scene/1",
      "title": "Schema",
      "type": "string"
    },
    "shapes": {
      "items": {
        "$ref": "#/$defs/Shape"
      },
      "minItems": 1,
      "title": "Shapes",
      "type": "array"
    },
    "units": {
      "default": "m",
      "description": "The unit of every position and size",
      "minLength": 1,
      "title": "Units",
      "type": "string"
    }
  },
  "required": [
    "schema",
    "name",
    "models",
    "shapes"
  ],
  "title": "Scene",
  "type": "object"
}
