{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.paint.gradient.schema.json",
  "title": "rig.paint.gradient",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "linear",
        "radial"
      ]
    },
    "stops": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "t",
          "rgba"
        ],
        "properties": {
          "t": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "rgba": {
            "$ref": "./_defs.schema.json#/$defs/rgba"
          }
        }
      }
    },
    "start": {
      "$ref": "./_defs.schema.json#/$defs/vec2"
    },
    "end": {
      "$ref": "./_defs.schema.json#/$defs/vec2"
    }
  },
  "required": [
    "kind",
    "stops"
  ]
}
