{
  "type": "object",
  "properties": {
    "version": {
      "anyOf": [
        {
          "const": 1,
          "type": "number"
        },
        {
          "const": 2,
          "type": "number"
        }
      ]
    },
    "assets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "format": {
            "type": "string",
            "enum": [
              "glb",
              "obj"
            ]
          },
          "physical": {
            "type": "boolean"
          },
          "preserveMaterials": {
            "type": "boolean"
          },
          "upAxis": {
            "type": "string",
            "enum": [
              "Y",
              "Z"
            ]
          },
          "data": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000000
          }
        },
        "required": [
          "id",
          "name",
          "format",
          "data"
        ],
        "additionalProperties": false
      },
      "maxItems": 24,
      "default": []
    },
    "timeline": {
      "type": "object",
      "properties": {
        "duration": {
          "type": "number",
          "minimum": 1,
          "maximum": 600
        },
        "loop": {
          "type": "boolean"
        },
        "keys": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "actorId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "time": {
                "type": "number",
                "minimum": 0,
                "maximum": 600
              },
              "position": {
                "type": "array",
                "items": [
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  },
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  },
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  }
                ],
                "minItems": 3,
                "maxItems": 3
              },
              "rotation": {
                "type": "array",
                "items": [
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  },
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  },
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  }
                ],
                "minItems": 3,
                "maxItems": 3
              },
              "scale": {
                "type": "array",
                "items": [
                  {
                    "type": "number",
                    "minimum": 0.05,
                    "maximum": 20
                  },
                  {
                    "type": "number",
                    "minimum": 0.05,
                    "maximum": 20
                  },
                  {
                    "type": "number",
                    "minimum": 0.05,
                    "maximum": 20
                  }
                ],
                "minItems": 3,
                "maxItems": 3
              }
            },
            "required": [
              "id",
              "actorId",
              "time",
              "position",
              "rotation",
              "scale"
            ],
            "additionalProperties": false
          },
          "maxItems": 1000
        }
      },
      "required": [
        "duration",
        "loop",
        "keys"
      ],
      "additionalProperties": false,
      "default": {
        "duration": 10,
        "loop": true,
        "keys": []
      }
    },
    "twoD": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "physics3d": {
      "type": "object",
      "properties": {
        "version": {
          "const": 1,
          "type": "number"
        },
        "gravity": {
          "type": "array",
          "items": [
            {
              "type": "number",
              "minimum": -10000,
              "maximum": 10000
            },
            {
              "type": "number",
              "minimum": -10000,
              "maximum": 10000
            },
            {
              "type": "number",
              "minimum": -10000,
              "maximum": 10000
            }
          ],
          "minItems": 3,
          "maxItems": 3
        },
        "ground": {
          "type": "boolean"
        },
        "groundY": {
          "type": "number",
          "minimum": -500,
          "maximum": 500
        },
        "bodies": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "actorId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "shape": {
                "type": "string",
                "enum": [
                  "box",
                  "sphere"
                ]
              },
              "half": {
                "type": "array",
                "items": [
                  {
                    "type": "number",
                    "minimum": 0.01,
                    "maximum": 100
                  },
                  {
                    "type": "number",
                    "minimum": 0.01,
                    "maximum": 100
                  },
                  {
                    "type": "number",
                    "minimum": 0.01,
                    "maximum": 100
                  }
                ],
                "minItems": 3,
                "maxItems": 3
              },
              "mass": {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              "restitution": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "friction": {
                "type": "number",
                "minimum": 0,
                "maximum": 2
              },
              "offset": {
                "type": "array",
                "items": [
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  },
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  },
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  }
                ],
                "minItems": 3,
                "maxItems": 3
              }
            },
            "required": [
              "actorId",
              "shape",
              "half",
              "mass",
              "restitution",
              "friction"
            ],
            "additionalProperties": false
          },
          "maxItems": 128
        },
        "actions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "pattern": "^(Key[A-Z]|Digit[0-9]|Arrow(Up|Down|Left|Right)|Space)$"
              },
              "actorId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "operation": {
                "type": "string",
                "enum": [
                  "ApplyForce",
                  "ApplyTorque",
                  "ApplyImpulse",
                  "ApplyAngularImpulse"
                ]
              },
              "vector": {
                "type": "array",
                "items": [
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  },
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  },
                  {
                    "type": "number",
                    "minimum": -10000,
                    "maximum": 10000
                  }
                ],
                "minItems": 3,
                "maxItems": 3
              },
              "trigger": {
                "type": "string",
                "enum": [
                  "held",
                  "pressed"
                ]
              }
            },
            "required": [
              "code",
              "actorId",
              "operation",
              "vector",
              "trigger"
            ],
            "additionalProperties": false
          },
          "maxItems": 128
        }
      },
      "required": [
        "version",
        "gravity",
        "ground",
        "groundY",
        "bodies",
        "actions"
      ],
      "additionalProperties": false
    },
    "program3d": {
      "type": "object",
      "properties": {
        "version": {
          "const": 1,
          "type": "number"
        },
        "scriptModules": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "source": {
                "type": "string",
                "minLength": 1,
                "maxLength": 32768
              },
              "fields": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                  "x-runtime-validation": true
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "number",
                        "boolean",
                        "string",
                        "array",
                        "object"
                      ]
                    },
                    "default": {
                      "x-runtime-validation": true
                    },
                    "min": {
                      "type": "number",
                      "minimum": -1000000000,
                      "maximum": 1000000000
                    },
                    "max": {
                      "type": "number",
                      "minimum": -1000000000,
                      "maximum": 1000000000
                    }
                  },
                  "required": [
                    "type",
                    "default"
                  ],
                  "additionalProperties": false
                },
                "default": {}
              }
            },
            "required": [
              "id",
              "source"
            ],
            "additionalProperties": false
          },
          "maxItems": 16,
          "default": []
        },
        "components": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "actorId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "script": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "enabled": {
                "type": "boolean",
                "default": true
              },
              "template": {
                "type": "boolean",
                "default": false
              },
              "state": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                  "x-runtime-validation": true
                },
                "additionalProperties": {
                  "x-runtime-validation": true
                },
                "default": {}
              }
            },
            "required": [
              "id",
              "actorId",
              "script"
            ],
            "additionalProperties": false
          },
          "maxItems": 64,
          "default": []
        },
        "animationControllers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "actorId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "initial": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "states": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                      "x-runtime-validation": true
                    },
                    "clip": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "speed": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 8,
                      "default": 1
                    },
                    "loop": {
                      "type": "string",
                      "enum": [
                        "once",
                        "repeat",
                        "pingpong"
                      ],
                      "default": "repeat"
                    }
                  },
                  "required": [
                    "id",
                    "clip"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 32
              },
              "transitions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "from": {
                      "type": "string",
                      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                      "x-runtime-validation": true
                    },
                    "to": {
                      "type": "string",
                      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                      "x-runtime-validation": true
                    },
                    "when": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": -1000000000,
                          "maximum": 1000000000
                        },
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048
                        }
                      ]
                    },
                    "fade": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 5,
                      "default": 0.15
                    },
                    "after": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 3600,
                      "default": 0
                    }
                  },
                  "required": [
                    "from",
                    "to",
                    "when"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 128,
                "default": []
              }
            },
            "required": [
              "id",
              "actorId",
              "initial",
              "states"
            ],
            "additionalProperties": false
          },
          "maxItems": 32,
          "default": []
        },
        "widgets": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "kind": {
                "type": "string",
                "enum": [
                  "text",
                  "button",
                  "progress",
                  "slider",
                  "toggle",
                  "select"
                ]
              },
              "label": {
                "type": "string",
                "maxLength": 100
              },
              "panel": {
                "type": "string",
                "maxLength": 60,
                "default": ""
              },
              "value": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": -1000000000,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                ],
                "default": 0
              },
              "visible": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": -1000000000,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                ],
                "default": 1
              },
              "enabled": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": -1000000000,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                ],
                "default": 1
              },
              "event": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "variable": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "min": {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000,
                "default": 0
              },
              "max": {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000,
                "default": 100
              },
              "step": {
                "type": "number",
                "minimum": 0.0001,
                "maximum": 100000,
                "default": 1
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "value": {
                      "type": "number",
                      "minimum": -1000000000,
                      "maximum": 1000000000
                    }
                  },
                  "required": [
                    "label",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 32,
                "default": []
              }
            },
            "required": [
              "id",
              "kind",
              "label"
            ],
            "additionalProperties": false
          },
          "maxItems": 64,
          "default": []
        },
        "randomSeed": {
          "type": "integer",
          "minimum": 1,
          "maximum": 2147483647,
          "default": 1
        },
        "title": {
          "type": "string",
          "maxLength": 100
        },
        "description": {
          "type": "string",
          "maxLength": 1500,
          "default": ""
        },
        "variables": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
            "x-runtime-validation": true
          },
          "additionalProperties": {
            "type": "number",
            "minimum": -1000000000,
            "maximum": 1000000000
          }
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "maxLength": 100
              },
              "event": {
                "type": "string",
                "enum": [
                  "start",
                  "tick",
                  "key",
                  "custom"
                ]
              },
              "eventId": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "key": {
                "type": "string",
                "pattern": "^(Key[A-Z]|Digit[0-9]|Arrow(Up|Down|Left|Right)|Space|ShiftLeft|ShiftRight|ControlLeft|ControlRight|Mouse[0-4])$"
              },
              "when": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": -1000000000,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                ],
                "default": 1
              },
              "set": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "variable": {
                      "type": "string",
                      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                      "x-runtime-validation": true
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": -1000000000,
                          "maximum": 1000000000
                        },
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048
                        }
                      ]
                    }
                  },
                  "required": [
                    "variable",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100,
                "default": []
              },
              "actions": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "physics",
                          "type": "string"
                        },
                        "target": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "actorId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                }
                              },
                              "required": [
                                "actorId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "instance": {
                                  "anyOf": [
                                    {
                                      "type": "number",
                                      "minimum": -1000000000,
                                      "maximum": 1000000000
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2048
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "instance"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "operation": {
                          "type": "string",
                          "enum": [
                            "ApplyForce",
                            "ApplyTorque",
                            "ApplyImpulse",
                            "ApplyAngularImpulse"
                          ]
                        },
                        "vector": {
                          "type": "array",
                          "items": [
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            }
                          ],
                          "minItems": 3,
                          "maxItems": 3
                        }
                      },
                      "required": [
                        "type",
                        "target",
                        "operation",
                        "vector"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "spawn",
                          "type": "string"
                        },
                        "prefab": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                          "x-runtime-validation": true
                        },
                        "position": {
                          "type": "array",
                          "items": [
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            }
                          ],
                          "minItems": 3,
                          "maxItems": 3
                        },
                        "rotation": {
                          "type": "array",
                          "items": [
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            }
                          ],
                          "minItems": 3,
                          "maxItems": 3,
                          "default": [
                            0,
                            0,
                            0
                          ]
                        },
                        "velocity": {
                          "type": "array",
                          "items": [
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": -1000000000,
                                  "maximum": 1000000000
                                },
                                {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 2048
                                }
                              ]
                            }
                          ],
                          "minItems": 3,
                          "maxItems": 3,
                          "default": [
                            0,
                            0,
                            0
                          ]
                        },
                        "lifetime": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": -1000000000,
                              "maximum": 1000000000
                            },
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2048
                            }
                          ],
                          "default": 30
                        },
                        "result": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                          "x-runtime-validation": true
                        }
                      },
                      "required": [
                        "type",
                        "prefab",
                        "position"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "despawn",
                          "type": "string"
                        },
                        "instance": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": -1000000000,
                              "maximum": 1000000000
                            },
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2048
                            }
                          ]
                        }
                      },
                      "required": [
                        "type",
                        "instance"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "sound_play",
                          "type": "string"
                        },
                        "sound": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                          "x-runtime-validation": true
                        },
                        "voice": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                          "x-runtime-validation": true
                        },
                        "volume": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": -1000000000,
                              "maximum": 1000000000
                            },
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2048
                            }
                          ],
                          "default": 1
                        },
                        "rate": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": -1000000000,
                              "maximum": 1000000000
                            },
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2048
                            }
                          ],
                          "default": 1
                        },
                        "loop": {
                          "type": "boolean",
                          "default": false
                        },
                        "target": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "actorId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                }
                              },
                              "required": [
                                "actorId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "instance": {
                                  "anyOf": [
                                    {
                                      "type": "number",
                                      "minimum": -1000000000,
                                      "maximum": 1000000000
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2048
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "instance"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "required": [
                        "type",
                        "sound",
                        "voice"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "sound_stop",
                          "type": "string"
                        },
                        "voice": {
                          "type": "string",
                          "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                          "x-runtime-validation": true
                        }
                      },
                      "required": [
                        "type",
                        "voice"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "animation_play",
                          "type": "string"
                        },
                        "target": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "actorId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                }
                              },
                              "required": [
                                "actorId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "instance": {
                                  "anyOf": [
                                    {
                                      "type": "number",
                                      "minimum": -1000000000,
                                      "maximum": 1000000000
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2048
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "instance"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "clip": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100
                        },
                        "loop": {
                          "type": "string",
                          "enum": [
                            "once",
                            "repeat",
                            "pingpong"
                          ],
                          "default": "repeat"
                        },
                        "speed": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": -1000000000,
                              "maximum": 1000000000
                            },
                            {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 2048
                            }
                          ],
                          "default": 1
                        },
                        "fade": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 5,
                          "default": 0.15
                        }
                      },
                      "required": [
                        "type",
                        "target",
                        "clip"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "const": "animation_stop",
                          "type": "string"
                        },
                        "target": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "actorId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 100
                                }
                              },
                              "required": [
                                "actorId"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "instance": {
                                  "anyOf": [
                                    {
                                      "type": "number",
                                      "minimum": -1000000000,
                                      "maximum": 1000000000
                                    },
                                    {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 2048
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "instance"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "fade": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 5,
                          "default": 0.15
                        }
                      },
                      "required": [
                        "type",
                        "target"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "maxItems": 32,
                "default": []
              }
            },
            "required": [
              "name",
              "event"
            ],
            "additionalProperties": false
          },
          "maxItems": 200
        },
        "prefabs": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "actorId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "physics": {
                "type": "boolean",
                "default": false
              },
              "maxAlive": {
                "type": "integer",
                "minimum": 1,
                "maximum": 128,
                "default": 32
              }
            },
            "required": [
              "id",
              "actorId"
            ],
            "additionalProperties": false
          },
          "maxItems": 32,
          "default": []
        },
        "sounds": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "name": {
                "type": "string",
                "maxLength": 100
              },
              "recipe": {
                "type": "object",
                "properties": {
                  "duration": {
                    "type": "number",
                    "minimum": 0.02,
                    "maximum": 12
                  },
                  "seed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 4294967295,
                    "default": 1
                  },
                  "layers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "wave": {
                          "type": "string",
                          "enum": [
                            "sine",
                            "triangle",
                            "saw",
                            "square",
                            "noise"
                          ]
                        },
                        "frequency": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "endFrequency": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10000
                        },
                        "gain": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1,
                          "default": 0.3
                        },
                        "attack": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 12,
                          "default": 0.005
                        },
                        "release": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 12,
                          "default": 0.08
                        }
                      },
                      "required": [
                        "wave",
                        "frequency"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 8
                  }
                },
                "required": [
                  "duration",
                  "layers"
                ],
                "additionalProperties": false
              },
              "data": {
                "type": "string",
                "maxLength": 5600000,
                "pattern": "^data:audio\\/(wav|mpeg|ogg);base64,[A-Za-z0-9+/]+={0,2}$",
                "x-runtime-validation": true
              }
            },
            "required": [
              "id",
              "name",
              "data"
            ],
            "additionalProperties": false
          },
          "maxItems": 24,
          "default": []
        },
        "sensors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "variable": {
                "type": "string",
                "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                "x-runtime-validation": true
              },
              "target": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "actorId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      }
                    },
                    "required": [
                      "actorId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "instance": {
                        "anyOf": [
                          {
                            "type": "number",
                            "minimum": -1000000000,
                            "maximum": 1000000000
                          },
                          {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 2048
                          }
                        ]
                      }
                    },
                    "required": [
                      "instance"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "property": {
                "type": "string",
                "enum": [
                  "x",
                  "y",
                  "z",
                  "vx",
                  "vy",
                  "vz",
                  "wx",
                  "wy",
                  "wz",
                  "alive"
                ]
              }
            },
            "required": [
              "variable",
              "target",
              "property"
            ],
            "additionalProperties": false
          },
          "maxItems": 128,
          "default": []
        },
        "bindings": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "actorId": {
                "type": "string"
              },
              "parent": {
                "type": "string"
              },
              "position": {
                "type": "array",
                "items": [
                  {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    ]
                  }
                ],
                "minItems": 3,
                "maxItems": 3
              },
              "rotation": {
                "type": "array",
                "items": [
                  {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    ]
                  }
                ],
                "minItems": 3,
                "maxItems": 3
              },
              "scale": {
                "type": "array",
                "items": [
                  {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    ]
                  },
                  {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      },
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 2048
                      }
                    ]
                  }
                ],
                "minItems": 3,
                "maxItems": 3,
                "default": [
                  1,
                  1,
                  1
                ]
              },
              "visible": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": -1000000000,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                ],
                "default": 1
              }
            },
            "required": [
              "actorId",
              "position",
              "rotation"
            ],
            "additionalProperties": false
          },
          "maxItems": 150
        },
        "camera": {
          "type": "object",
          "properties": {
            "actorId": {
              "type": "string"
            },
            "mode": {
              "type": "string",
              "enum": [
                "follow",
                "fixed"
              ],
              "default": "follow"
            },
            "offset": {
              "type": "array",
              "items": [
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                },
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                },
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                }
              ],
              "minItems": 3,
              "maxItems": 3
            },
            "lookAt": {
              "type": "array",
              "items": [
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                },
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                },
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                }
              ],
              "minItems": 3,
              "maxItems": 3
            },
            "alternateOffset": {
              "type": "array",
              "items": [
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                },
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                },
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                }
              ],
              "minItems": 3,
              "maxItems": 3,
              "default": [
                0,
                1,
                0
              ]
            },
            "alternateLookAt": {
              "type": "array",
              "items": [
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                },
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                },
                {
                  "type": "number",
                  "minimum": -1000000000,
                  "maximum": 1000000000
                }
              ],
              "minItems": 3,
              "maxItems": 3,
              "default": [
                0,
                1,
                -100
              ]
            },
            "switchKey": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(Key[A-Z]|Digit[0-9]|Arrow(Up|Down|Left|Right)|Space|ShiftLeft|ShiftRight|ControlLeft|ControlRight|Mouse[0-4])$"
                },
                {
                  "const": "",
                  "type": "string"
                }
              ],
              "default": ""
            },
            "smoothing": {
              "type": "number",
              "minimum": 0,
              "maximum": 30,
              "default": 5
            },
            "far": {
              "type": "number",
              "minimum": 100,
              "maximum": 30000,
              "default": 10000
            },
            "pointerLock": {
              "type": "boolean",
              "default": false
            }
          },
          "required": [
            "actorId",
            "offset",
            "lookAt"
          ],
          "additionalProperties": false
        },
        "menu": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "maxLength": 80
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "maxLength": 80
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 250,
                      "default": ""
                    },
                    "set": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$",
                        "x-runtime-validation": true
                      },
                      "additionalProperties": {
                        "type": "number",
                        "minimum": -1000000000,
                        "maximum": 1000000000
                      }
                    }
                  },
                  "required": [
                    "label",
                    "set"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 20
              }
            },
            "required": [
              "label",
              "options"
            ],
            "additionalProperties": false
          },
          "maxItems": 12
        },
        "hud": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "maxLength": 60
              },
              "value": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": -1000000000,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                ]
              },
              "decimals": {
                "type": "integer",
                "minimum": 0,
                "maximum": 3,
                "default": 0
              },
              "suffix": {
                "type": "string",
                "maxLength": 30,
                "default": ""
              }
            },
            "required": [
              "label",
              "value"
            ],
            "additionalProperties": false
          },
          "maxItems": 16
        },
        "messages": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "when": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": -1000000000,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  }
                ]
              },
              "text": {
                "type": "string",
                "maxLength": 180
              }
            },
            "required": [
              "when",
              "text"
            ],
            "additionalProperties": false
          },
          "maxItems": 30
        },
        "points": {
          "type": "array",
          "items": {
            "type": "array",
            "items": [
              {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000
              },
              {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000
              },
              {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000
              }
            ],
            "minItems": 3,
            "maxItems": 3
          },
          "maxItems": 256,
          "default": []
        },
        "boxes": {
          "type": "array",
          "items": {
            "type": "array",
            "items": [
              {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000
              },
              {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000
              },
              {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000
              },
              {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000
              },
              {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000
              },
              {
                "type": "number",
                "minimum": -1000000000,
                "maximum": 1000000000
              }
            ],
            "minItems": 6,
            "maxItems": 6
          },
          "maxItems": 3000,
          "default": []
        },
        "controls": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "maxLength": 60
              },
              "code": {
                "type": "string",
                "pattern": "^(Key[A-Z]|Digit[0-9]|Arrow(Up|Down|Left|Right)|Space|ShiftLeft|ShiftRight|ControlLeft|ControlRight|Mouse[0-4])$"
              }
            },
            "required": [
              "label",
              "code"
            ],
            "additionalProperties": false
          },
          "maxItems": 24,
          "default": []
        },
        "pauseWhen": {
          "anyOf": [
            {
              "type": "number",
              "minimum": -1000000000,
              "maximum": 1000000000
            },
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 2048
            }
          ],
          "default": 0
        }
      },
      "required": [
        "version",
        "title",
        "variables",
        "rules",
        "bindings",
        "camera",
        "menu",
        "hud",
        "messages"
      ],
      "additionalProperties": false
    },
    "adventure": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "briefing": {
          "type": "string",
          "maxLength": 500
        },
        "seconds": {
          "type": "number",
          "minimum": 30,
          "maximum": 3600
        },
        "healthDrain": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "weapon": {
          "type": "boolean"
        },
        "spawn": {
          "type": "array",
          "items": [
            {
              "type": "number",
              "minimum": -250,
              "maximum": 250
            },
            {
              "type": "number",
              "minimum": -250,
              "maximum": 250
            }
          ],
          "minItems": 2,
          "maxItems": 2
        },
        "speed": {
          "type": "number",
          "minimum": 1,
          "maximum": 12
        },
        "sprint": {
          "type": "number",
          "minimum": 1,
          "maximum": 3
        },
        "eyeHeight": {
          "type": "number",
          "minimum": 0.5,
          "maximum": 3
        },
        "maxSlope": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 3
        },
        "objectives": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "actorId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "action": {
                "type": "string",
                "enum": [
                  "collect",
                  "activate",
                  "deliver",
                  "rescue",
                  "extract",
                  "defeat"
                ]
              },
              "requires": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "maxItems": 30
              },
              "item": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "amount": {
                "type": "integer",
                "minimum": 1,
                "maximum": 99
              },
              "holdSeconds": {
                "type": "number",
                "minimum": 0,
                "maximum": 20
              }
            },
            "required": [
              "actorId",
              "label"
            ],
            "additionalProperties": false
          },
          "maxItems": 30
        }
      },
      "required": [
        "title",
        "spawn",
        "speed",
        "sprint",
        "eyeHeight",
        "maxSlope",
        "objectives"
      ],
      "additionalProperties": false
    },
    "gameplay": {
      "type": "object",
      "properties": {
        "version": {
          "const": 1,
          "type": "number"
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "goal": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500
        },
        "seconds": {
          "type": "integer",
          "minimum": 30,
          "maximum": 3600
        },
        "bounds": {
          "type": "number",
          "minimum": 10,
          "maximum": 50
        },
        "whistleRadius": {
          "type": "number",
          "minimum": 2,
          "maximum": 20
        },
        "commandRange": {
          "type": "number",
          "minimum": 2,
          "maximum": 100
        },
        "cameraHeight": {
          "type": "number",
          "minimum": 5,
          "maximum": 80
        },
        "cameraDistance": {
          "type": "number",
          "minimum": 0,
          "maximum": 80
        },
        "mission": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {},
          "x-runtime-validation": true
        }
      },
      "required": [
        "version",
        "title",
        "goal",
        "seconds",
        "bounds",
        "whistleRadius",
        "mission"
      ],
      "additionalProperties": false
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "actors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "kind": {
            "type": "string",
            "enum": [
              "arch",
              "tower",
              "bridge",
              "rocks",
              "tree",
              "trees",
              "terrain",
              "water",
              "sun",
              "player",
              "cube",
              "sphere",
              "cylinder",
              "cone",
              "torus",
              "plane",
              "capsule",
              "curve",
              "imported"
            ]
          },
          "group": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          },
          "position": {
            "type": "array",
            "items": [
              {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              },
              {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              },
              {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              }
            ],
            "minItems": 3,
            "maxItems": 3
          },
          "rotation": {
            "type": "array",
            "items": [
              {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              },
              {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              },
              {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              }
            ],
            "minItems": 3,
            "maxItems": 3
          },
          "scale": {
            "type": "array",
            "items": [
              {
                "type": "number",
                "minimum": 0.05,
                "maximum": 20
              },
              {
                "type": "number",
                "minimum": 0.05,
                "maximum": 20
              },
              {
                "type": "number",
                "minimum": 0.05,
                "maximum": 20
              }
            ],
            "minItems": 3,
            "maxItems": 3
          },
          "texture": {
            "type": "object",
            "properties": {
              "pattern": {
                "type": "string",
                "enum": [
                  "none",
                  "stone",
                  "sand",
                  "grass",
                  "tiles",
                  "image"
                ]
              },
              "scale": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 100
              },
              "relief": {
                "type": "number",
                "minimum": 0,
                "maximum": 2
              },
              "image": {
                "type": "string",
                "maxLength": 3000000,
                "pattern": "^data:image\\/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$"
              },
              "name": {
                "type": "string",
                "maxLength": 120
              }
            },
            "required": [
              "pattern",
              "scale",
              "relief"
            ],
            "additionalProperties": false
          },
          "visible": {
            "type": "boolean"
          },
          "color": {
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "roughness": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "metallic": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "prefab": {
            "type": "string",
            "enum": [
              "supply-crate",
              "relay",
              "survivor",
              "drone",
              "extraction",
              "field-shelter",
              "signal-mast"
            ]
          },
          "collisionRadius": {
            "type": "number",
            "minimum": 0.1,
            "maximum": 20
          },
          "ai": {
            "type": "object",
            "properties": {
              "behavior": {
                "type": "string",
                "enum": [
                  "wildlife",
                  "patrol",
                  "guard"
                ]
              },
              "speed": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 12
              },
              "awareness": {
                "type": "number",
                "minimum": 1,
                "maximum": 30
              },
              "patrolRadius": {
                "type": "number",
                "minimum": 1,
                "maximum": 20
              }
            },
            "required": [
              "behavior",
              "speed",
              "awareness",
              "patrolRadius"
            ],
            "additionalProperties": false
          },
          "squad": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string",
                "enum": [
                  "leader",
                  "unit",
                  "base",
                  "cargo",
                  "barrier",
                  "enemy",
                  "obstacle"
                ]
              },
              "variant": {
                "type": "string",
                "enum": [
                  "amber",
                  "mint"
                ]
              },
              "speed": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 20
              },
              "strength": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10
              },
              "weight": {
                "type": "integer",
                "minimum": 1,
                "maximum": 36
              },
              "reward": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100
              },
              "health": {
                "type": "number",
                "minimum": 1,
                "maximum": 500
              },
              "radius": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 10
              },
              "requires": {
                "type": "string",
                "maxLength": 100
              },
              "attackDamage": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 100
              },
              "attackRange": {
                "type": "number",
                "minimum": 0.5,
                "maximum": 10
              },
              "aggroRange": {
                "type": "number",
                "minimum": 1,
                "maximum": 30
              },
              "attackCooldown": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 10
              },
              "stunSeconds": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 30
              },
              "carrySpeed": {
                "type": "number",
                "minimum": 0.1,
                "maximum": 20
              }
            },
            "required": [
              "role"
            ],
            "additionalProperties": false
          },
          "modelRecipe": {
            "type": "object",
            "properties": {
              "shapes": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "const": "box",
                          "type": "string"
                        },
                        "min": {
                          "type": "array",
                          "items": [
                            {
                              "type": "number",
                              "minimum": -10000,
                              "maximum": 10000
                            },
                            {
                              "type": "number",
                              "minimum": -10000,
                              "maximum": 10000
                            },
                            {
                              "type": "number",
                              "minimum": -10000,
                              "maximum": 10000
                            }
                          ],
                          "minItems": 3,
                          "maxItems": 3
                        },
                        "max": {
                          "type": "array",
                          "items": [
                            {
                              "type": "number",
                              "minimum": -10000,
                              "maximum": 10000
                            },
                            {
                              "type": "number",
                              "minimum": -10000,
                              "maximum": 10000
                            },
                            {
                              "type": "number",
                              "minimum": -10000,
                              "maximum": 10000
                            }
                          ],
                          "minItems": 3,
                          "maxItems": 3
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9a-fA-F]{6}$"
                        }
                      },
                      "required": [
                        "kind",
                        "min",
                        "max"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "const": "polyhedron",
                          "type": "string"
                        },
                        "points": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "number",
                                "minimum": -10000,
                                "maximum": 10000
                              },
                              {
                                "type": "number",
                                "minimum": -10000,
                                "maximum": 10000
                              },
                              {
                                "type": "number",
                                "minimum": -10000,
                                "maximum": 10000
                              }
                            ],
                            "minItems": 3,
                            "maxItems": 3
                          },
                          "minItems": 3,
                          "maxItems": 8192
                        },
                        "faces": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 8191
                            },
                            "minItems": 3,
                            "maxItems": 64
                          },
                          "minItems": 1,
                          "maxItems": 16384
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9a-fA-F]{6}$"
                        }
                      },
                      "required": [
                        "kind",
                        "points",
                        "faces"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "const": "lathe",
                          "type": "string"
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": [
                              {
                                "type": "number",
                                "minimum": -10000,
                                "maximum": 10000
                              },
                              {
                                "type": "number",
                                "minimum": -10000,
                                "maximum": 10000
                              },
                              {
                                "type": "number",
                                "minimum": -10000,
                                "maximum": 10000
                              }
                            ],
                            "minItems": 3,
                            "maxItems": 3
                          },
                          "minItems": 2,
                          "maxItems": 256
                        },
                        "segments": {
                          "type": "integer",
                          "minimum": 3,
                          "maximum": 256,
                          "default": 16
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[0-9a-fA-F]{6}$"
                        }
                      },
                      "required": [
                        "kind",
                        "profile"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "minItems": 1,
                "maxItems": 20000
              }
            },
            "required": [
              "shapes"
            ],
            "additionalProperties": false
          },
          "rigRecipe": {
            "type": "object",
            "properties": {
              "bones": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
                    },
                    "parent": {
                      "type": "string",
                      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
                    },
                    "position": {
                      "type": "array",
                      "items": [
                        {
                          "type": "number",
                          "minimum": -10000,
                          "maximum": 10000
                        },
                        {
                          "type": "number",
                          "minimum": -10000,
                          "maximum": 10000
                        },
                        {
                          "type": "number",
                          "minimum": -10000,
                          "maximum": 10000
                        }
                      ],
                      "minItems": 3,
                      "maxItems": 3,
                      "default": [
                        0,
                        0,
                        0
                      ]
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 64
              },
              "parts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "bone": {
                      "type": "string",
                      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
                    },
                    "geometry": {
                      "type": "object",
                      "properties": {
                        "shapes": {
                          "type": "array",
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "const": "box",
                                    "type": "string"
                                  },
                                  "min": {
                                    "type": "array",
                                    "items": [
                                      {
                                        "type": "number",
                                        "minimum": -10000,
                                        "maximum": 10000
                                      },
                                      {
                                        "type": "number",
                                        "minimum": -10000,
                                        "maximum": 10000
                                      },
                                      {
                                        "type": "number",
                                        "minimum": -10000,
                                        "maximum": 10000
                                      }
                                    ],
                                    "minItems": 3,
                                    "maxItems": 3
                                  },
                                  "max": {
                                    "type": "array",
                                    "items": [
                                      {
                                        "type": "number",
                                        "minimum": -10000,
                                        "maximum": 10000
                                      },
                                      {
                                        "type": "number",
                                        "minimum": -10000,
                                        "maximum": 10000
                                      },
                                      {
                                        "type": "number",
                                        "minimum": -10000,
                                        "maximum": 10000
                                      }
                                    ],
                                    "minItems": 3,
                                    "maxItems": 3
                                  },
                                  "color": {
                                    "type": "string",
                                    "pattern": "^#[0-9a-fA-F]{6}$"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "min",
                                  "max"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "const": "polyhedron",
                                    "type": "string"
                                  },
                                  "points": {
                                    "type": "array",
                                    "items": {
                                      "type": "array",
                                      "items": [
                                        {
                                          "type": "number",
                                          "minimum": -10000,
                                          "maximum": 10000
                                        },
                                        {
                                          "type": "number",
                                          "minimum": -10000,
                                          "maximum": 10000
                                        },
                                        {
                                          "type": "number",
                                          "minimum": -10000,
                                          "maximum": 10000
                                        }
                                      ],
                                      "minItems": 3,
                                      "maxItems": 3
                                    },
                                    "minItems": 3,
                                    "maxItems": 8192
                                  },
                                  "faces": {
                                    "type": "array",
                                    "items": {
                                      "type": "array",
                                      "items": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 8191
                                      },
                                      "minItems": 3,
                                      "maxItems": 64
                                    },
                                    "minItems": 1,
                                    "maxItems": 16384
                                  },
                                  "color": {
                                    "type": "string",
                                    "pattern": "^#[0-9a-fA-F]{6}$"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "points",
                                  "faces"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "kind": {
                                    "const": "lathe",
                                    "type": "string"
                                  },
                                  "profile": {
                                    "type": "array",
                                    "items": {
                                      "type": "array",
                                      "items": [
                                        {
                                          "type": "number",
                                          "minimum": -10000,
                                          "maximum": 10000
                                        },
                                        {
                                          "type": "number",
                                          "minimum": -10000,
                                          "maximum": 10000
                                        },
                                        {
                                          "type": "number",
                                          "minimum": -10000,
                                          "maximum": 10000
                                        }
                                      ],
                                      "minItems": 3,
                                      "maxItems": 3
                                    },
                                    "minItems": 2,
                                    "maxItems": 256
                                  },
                                  "segments": {
                                    "type": "integer",
                                    "minimum": 3,
                                    "maximum": 256,
                                    "default": 16
                                  },
                                  "color": {
                                    "type": "string",
                                    "pattern": "^#[0-9a-fA-F]{6}$"
                                  }
                                },
                                "required": [
                                  "kind",
                                  "profile"
                                ],
                                "additionalProperties": false
                              }
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 20000
                        }
                      },
                      "required": [
                        "shapes"
                      ],
                      "additionalProperties": false
                    },
                    "position": {
                      "type": "array",
                      "items": [
                        {
                          "type": "number",
                          "minimum": -10000,
                          "maximum": 10000
                        },
                        {
                          "type": "number",
                          "minimum": -10000,
                          "maximum": 10000
                        },
                        {
                          "type": "number",
                          "minimum": -10000,
                          "maximum": 10000
                        }
                      ],
                      "minItems": 3,
                      "maxItems": 3,
                      "default": [
                        0,
                        0,
                        0
                      ]
                    },
                    "rotation": {
                      "type": "array",
                      "items": [
                        {
                          "type": "number",
                          "minimum": -10000,
                          "maximum": 10000
                        },
                        {
                          "type": "number",
                          "minimum": -10000,
                          "maximum": 10000
                        },
                        {
                          "type": "number",
                          "minimum": -10000,
                          "maximum": 10000
                        }
                      ],
                      "minItems": 3,
                      "maxItems": 3,
                      "default": [
                        0,
                        0,
                        0
                      ]
                    },
                    "color": {
                      "type": "string",
                      "pattern": "^#[a-fA-F0-9]{6}$",
                      "default": "#dddddd"
                    },
                    "roughness": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1,
                      "default": 0.55
                    },
                    "metallic": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1,
                      "default": 0.1
                    }
                  },
                  "required": [
                    "bone",
                    "geometry"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 64
              },
              "clips": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
                    },
                    "tracks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "bone": {
                            "type": "string",
                            "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$"
                          },
                          "property": {
                            "type": "string",
                            "enum": [
                              "position",
                              "rotation"
                            ]
                          },
                          "keys": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "time": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 180
                                },
                                "value": {
                                  "type": "array",
                                  "items": [
                                    {
                                      "type": "number",
                                      "minimum": -10000,
                                      "maximum": 10000
                                    },
                                    {
                                      "type": "number",
                                      "minimum": -10000,
                                      "maximum": 10000
                                    },
                                    {
                                      "type": "number",
                                      "minimum": -10000,
                                      "maximum": 10000
                                    }
                                  ],
                                  "minItems": 3,
                                  "maxItems": 3
                                }
                              },
                              "required": [
                                "time",
                                "value"
                              ],
                              "additionalProperties": false
                            },
                            "minItems": 2,
                            "maxItems": 256
                          }
                        },
                        "required": [
                          "bone",
                          "property",
                          "keys"
                        ],
                        "additionalProperties": false
                      },
                      "minItems": 1,
                      "maxItems": 128
                    }
                  },
                  "required": [
                    "name",
                    "tracks"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 32,
                "default": []
              }
            },
            "required": [
              "bones",
              "parts"
            ],
            "additionalProperties": false
          },
          "assetId": {
            "type": "string",
            "maxLength": 100
          },
          "cad": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16000000,
            "x-runtime-validation": true
          },
          "locked": {
            "type": "boolean"
          },
          "modifiers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "twist",
                    "taper",
                    "bend",
                    "noise"
                  ]
                },
                "amount": {
                  "type": "number",
                  "minimum": -180,
                  "maximum": 180
                }
              },
              "required": [
                "type",
                "amount"
              ],
              "additionalProperties": false
            },
            "maxItems": 8
          },
          "curve": {
            "type": "object",
            "properties": {
              "points": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": [
                    {
                      "type": "number",
                      "minimum": -10000,
                      "maximum": 10000
                    },
                    {
                      "type": "number",
                      "minimum": -10000,
                      "maximum": 10000
                    },
                    {
                      "type": "number",
                      "minimum": -10000,
                      "maximum": 10000
                    }
                  ],
                  "minItems": 3,
                  "maxItems": 3
                },
                "minItems": 2,
                "maxItems": 32
              },
              "radius": {
                "type": "number",
                "minimum": 0.02,
                "maximum": 5
              },
              "closed": {
                "type": "boolean"
              }
            },
            "required": [
              "points",
              "radius",
              "closed"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "group",
          "position",
          "rotation",
          "scale",
          "visible",
          "color",
          "roughness",
          "metallic"
        ],
        "additionalProperties": false
      },
      "maxItems": 150
    },
    "terrain": {
      "type": "object",
      "properties": {
        "generator": {
          "type": "string",
          "enum": [
            "legacy",
            "eroded",
            "landscape"
          ]
        },
        "material": {
          "type": "string",
          "enum": [
            "meadow",
            "coast",
            "desert",
            "alpine"
          ]
        },
        "resolution": {
          "anyOf": [
            {
              "const": 96,
              "type": "number"
            },
            {
              "const": 160,
              "type": "number"
            },
            {
              "const": 256,
              "type": "number"
            },
            {
              "const": 512,
              "type": "number"
            },
            {
              "const": 1024,
              "type": "number"
            },
            {
              "const": 2048,
              "type": "number"
            }
          ]
        },
        "width": {
          "type": "number",
          "minimum": 32,
          "maximum": 8192
        },
        "depth": {
          "type": "number",
          "minimum": 32,
          "maximum": 8192
        },
        "height": {
          "type": "number",
          "minimum": 0.3,
          "maximum": 2.5
        },
        "erosion": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "seed": {
          "type": "integer",
          "minimum": 0,
          "maximum": 99999
        },
        "preset": {
          "type": "string",
          "enum": [
            "highlands",
            "alpine",
            "island",
            "dunes"
          ]
        },
        "stamps": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "minimum": -256,
                "maximum": 256
              },
              "z": {
                "type": "number",
                "minimum": -256,
                "maximum": 256
              },
              "radius": {
                "type": "number",
                "minimum": 0.5,
                "maximum": 20
              },
              "strength": {
                "type": "number",
                "minimum": -10,
                "maximum": 10
              },
              "mode": {
                "type": "string",
                "enum": [
                  "raise",
                  "lower",
                  "smooth",
                  "flatten"
                ]
              },
              "targetHeight": {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              }
            },
            "required": [
              "x",
              "z",
              "radius",
              "strength"
            ],
            "additionalProperties": false
          },
          "maxItems": 500
        },
        "seedMode": {
          "type": "string",
          "enum": [
            "legacy",
            "full"
          ]
        },
        "nativeGraph": {
          "type": "object",
          "properties": {
            "schemaVersion": {
              "const": 1,
              "type": "number"
            },
            "kernelSha256": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            },
            "recipe": {
              "type": "object",
              "properties": {
                "cells": {
                  "anyOf": [
                    {
                      "const": 64,
                      "type": "number"
                    },
                    {
                      "const": 128,
                      "type": "number"
                    },
                    {
                      "const": 256,
                      "type": "number"
                    }
                  ]
                },
                "worldSize": {
                  "type": "number",
                  "minimum": 32,
                  "maximum": 8192
                },
                "nodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "Mountain",
                          "MountainRange",
                          "Ridge",
                          "Plains",
                          "Island",
                          "Constant",
                          "Canyon",
                          "Dunes",
                          "Volcano",
                          "Perlin",
                          "Voronoi",
                          "Gradient",
                          "Shape",
                          "Cracks",
                          "Erode",
                          "Thermal",
                          "Terrace",
                          "Blur",
                          "Warp",
                          "Carve",
                          "Detail",
                          "Shaper",
                          "Clamp",
                          "Curve",
                          "Stratify",
                          "HydroFix",
                          "SlopeMask",
                          "HeightMask",
                          "WearMask",
                          "DepositMask",
                          "Curvature",
                          "Peaks",
                          "Soil",
                          "FlowMap",
                          "RockMap",
                          "Angle",
                          "Blend",
                          "Add",
                          "Max",
                          "Min",
                          "Output"
                        ]
                      },
                      "seed": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 2147483647
                      },
                      "parameters": {
                        "type": "array",
                        "items": {
                          "type": "number"
                        },
                        "maxItems": 8
                      },
                      "inputs": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": -1,
                          "maximum": 11
                        },
                        "maxItems": 3
                      },
                      "ports": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 3
                        },
                        "maxItems": 3
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  "minItems": 1,
                  "maxItems": 12
                },
                "output": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 11
                }
              },
              "required": [
                "cells",
                "worldSize",
                "nodes"
              ],
              "additionalProperties": false
            },
            "bakeSignature": {
              "type": "string",
              "pattern": "^[0-9a-f]{8}$"
            }
          },
          "required": [
            "schemaVersion",
            "kernelSha256",
            "recipe",
            "bakeSignature"
          ],
          "additionalProperties": false
        },
        "nativeMaps": {
          "type": "object",
          "properties": {
            "mask": {
              "type": "string",
              "maxLength": 360000,
              "pattern": "^[A-Za-z0-9+/]*={0,2}$"
            },
            "wear": {
              "type": "string",
              "maxLength": 360000,
              "pattern": "^[A-Za-z0-9+/]*={0,2}$"
            },
            "deposit": {
              "type": "string",
              "maxLength": 360000,
              "pattern": "^[A-Za-z0-9+/]*={0,2}$"
            }
          },
          "required": [
            "mask",
            "wear",
            "deposit"
          ],
          "additionalProperties": false
        },
        "pipeline": {
          "type": "object",
          "properties": {
            "resolution": {
              "anyOf": [
                {
                  "const": 128,
                  "type": "number"
                },
                {
                  "const": 256,
                  "type": "number"
                },
                {
                  "const": 512,
                  "type": "number"
                }
              ],
              "default": 256
            },
            "operations": {
              "type": "array",
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "const": "hydraulic",
                        "type": "string"
                      },
                      "seed": {
                        "type": "integer"
                      },
                      "rainfall": {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 1,
                        "default": 0.15
                      },
                      "steps": {
                        "type": "integer",
                        "minimum": 4,
                        "maximum": 128,
                        "default": 48
                      },
                      "inertia": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 0.95,
                        "default": 0.2
                      },
                      "capacity": {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 20,
                        "default": 4
                      },
                      "erosion": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.35
                      },
                      "deposition": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.3
                      },
                      "evaporation": {
                        "type": "number",
                        "minimum": 0.001,
                        "maximum": 0.5,
                        "default": 0.025
                      },
                      "radius": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 3,
                        "default": 2
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "const": "thermal",
                        "type": "string"
                      },
                      "iterations": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 64,
                        "default": 12
                      },
                      "talus": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 3,
                        "default": 0.6
                      },
                      "strength": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 0.5,
                        "default": 0.2
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "const": "noise",
                        "type": "string"
                      },
                      "amplitude": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1000,
                        "default": 8
                      },
                      "frequency": {
                        "type": "number",
                        "minimum": 0.0001,
                        "maximum": 4,
                        "default": 0.015
                      },
                      "octaves": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12,
                        "default": 6
                      },
                      "persistence": {
                        "type": "number",
                        "minimum": 0.05,
                        "maximum": 0.9,
                        "default": 0.5
                      },
                      "seed": {
                        "type": "integer"
                      },
                      "ridged": {
                        "type": "boolean",
                        "default": false
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "const": "terrace",
                        "type": "string"
                      },
                      "step": {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 1000,
                        "default": 2
                      },
                      "strength": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1,
                        "default": 0.7
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "const": "strata",
                        "type": "string"
                      },
                      "spacing": {
                        "type": "number",
                        "minimum": 0.01,
                        "maximum": 1000,
                        "default": 2
                      },
                      "amplitude": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100,
                        "default": 0.3
                      },
                      "angle": {
                        "type": "number",
                        "minimum": -180,
                        "maximum": 180,
                        "default": 0
                      }
                    },
                    "required": [
                      "kind"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "maxItems": 12
            }
          },
          "required": [
            "operations"
          ],
          "additionalProperties": false
        },
        "heightfield": {
          "type": "object",
          "properties": {
            "columns": {
              "type": "integer",
              "minimum": 2,
              "maximum": 2049
            },
            "rows": {
              "type": "integer",
              "minimum": 2,
              "maximum": 2049
            },
            "encoding": {
              "type": "string",
              "enum": [
                "float32le",
                "uint16le"
              ]
            },
            "data": {
              "type": "string",
              "minLength": 1,
              "maxLength": 22500000,
              "pattern": "^[A-Za-z0-9+/]*={0,2}$"
            },
            "minimum": {
              "type": "number",
              "minimum": -10000,
              "maximum": 10000
            },
            "maximum": {
              "type": "number",
              "minimum": -10000,
              "maximum": 10000
            }
          },
          "required": [
            "columns",
            "rows",
            "encoding",
            "data"
          ],
          "additionalProperties": false
        },
        "tiling": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "default": true
            },
            "cells": {
              "anyOf": [
                {
                  "const": 32,
                  "type": "number"
                },
                {
                  "const": 64,
                  "type": "number"
                },
                {
                  "const": 128,
                  "type": "number"
                }
              ],
              "default": 64
            },
            "lodDistance": {
              "type": "number",
              "minimum": 16,
              "maximum": 100000,
              "default": 180
            },
            "skirtDepth": {
              "type": "number",
              "minimum": 0.01,
              "maximum": 100,
              "default": 2
            }
          },
          "required": [],
          "additionalProperties": false
        },
        "layers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "name": {
                "type": "string",
                "maxLength": 80
              },
              "channel": {
                "type": "string",
                "enum": [
                  "height",
                  "slope",
                  "wear",
                  "deposit",
                  "flow"
                ]
              },
              "min": {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              },
              "max": {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              },
              "blend": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000,
                "default": 0.1
              },
              "color": {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              "roughness": {
                "type": "number",
                "minimum": 0,
                "maximum": 1,
                "default": 0.85
              }
            },
            "required": [
              "id",
              "channel",
              "min",
              "max",
              "color"
            ],
            "additionalProperties": false
          },
          "maxItems": 16
        }
      },
      "required": [
        "height",
        "erosion",
        "seed"
      ],
      "additionalProperties": false
    },
    "water": {
      "type": "object",
      "properties": {
        "level": {
          "type": "number",
          "minimum": -20,
          "maximum": 30
        },
        "speed": {
          "type": "number",
          "minimum": 0,
          "maximum": 4
        },
        "scale": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 12
        },
        "distortion": {
          "type": "number",
          "minimum": 0,
          "maximum": 12
        },
        "reflection": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "opacity": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 1
        }
      },
      "required": [
        "level",
        "speed",
        "scale",
        "distortion",
        "reflection",
        "opacity"
      ],
      "additionalProperties": false
    },
    "environment": {
      "type": "object",
      "properties": {
        "hdr": {
          "type": "boolean"
        },
        "exposure": {
          "type": "number",
          "minimum": 0.1,
          "maximum": 3
        },
        "sunIntensity": {
          "type": "number",
          "minimum": 0,
          "maximum": 8
        },
        "environmentIntensity": {
          "type": "number",
          "minimum": 0,
          "maximum": 3
        },
        "hour": {
          "type": "number",
          "minimum": 6,
          "maximum": 20
        },
        "fog": {
          "type": "number",
          "minimum": 0,
          "maximum": 80
        },
        "grass": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "ambientIntensity": {
          "type": "number",
          "minimum": 0,
          "maximum": 8
        },
        "ambientSkyColor": {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$"
        },
        "ambientGroundColor": {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$"
        }
      },
      "required": [
        "hour",
        "fog",
        "grass"
      ],
      "additionalProperties": false
    },
    "logic": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "kind": {
            "type": "string",
            "enum": [
              "event",
              "action",
              "condition",
              "output"
            ]
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 3000
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 2000
          },
          "value": {
            "type": "string",
            "maxLength": 200
          }
        },
        "required": [
          "id",
          "title",
          "kind",
          "x",
          "y",
          "value"
        ],
        "additionalProperties": false
      },
      "maxItems": 40
    },
    "scatter": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "assetId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50000
          },
          "seed": {
            "type": "integer",
            "default": 1
          },
          "visible": {
            "type": "boolean",
            "default": true
          },
          "minHeight": {
            "type": "number",
            "minimum": -10000,
            "maximum": 10000,
            "default": -10000
          },
          "maxHeight": {
            "type": "number",
            "minimum": -10000,
            "maximum": 10000,
            "default": 10000
          },
          "maxSlope": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "default": 2
          },
          "scaleMin": {
            "type": "number",
            "minimum": 0.001,
            "maximum": 100,
            "default": 1
          },
          "scaleMax": {
            "type": "number",
            "minimum": 0.001,
            "maximum": 100,
            "default": 1
          },
          "offset": {
            "type": "number",
            "minimum": -1000,
            "maximum": 1000,
            "default": 0
          },
          "tileSize": {
            "type": "number",
            "minimum": 16,
            "maximum": 2048,
            "default": 128
          },
          "mask": {
            "type": "object",
            "properties": {
              "channel": {
                "type": "string",
                "enum": [
                  "height",
                  "slope",
                  "wear",
                  "deposit",
                  "flow"
                ]
              },
              "min": {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              },
              "max": {
                "type": "number",
                "minimum": -10000,
                "maximum": 10000
              }
            },
            "required": [
              "channel",
              "min",
              "max"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "assetId",
          "count"
        ],
        "additionalProperties": false
      },
      "maxItems": 32
    }
  },
  "required": [
    "version",
    "name",
    "actors",
    "terrain",
    "environment",
    "logic"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#",
  "x-runtime-validation": "parseDocument also validates IDs, references, CAD recipes, assets and keyframe consistency."
}