{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.stfform.at/stfexp.animation_blendtree.schema.json",
	"title": "Animation Blendtree",
	"description": "Place animations on 1d or 2d coordinates.",
	"stfImplementations": {
		"blender": {
			"representingType": "STFEXP_Animation_Blendtree",
			"link": "https://codeberg.org/stf_format/stf_blender/src/branch/master/stfblender/stf_resources/stf/stf_image/stf_image.py"
		},
		"unity": {
			"representingType": "BlendTree",
			"link": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Runtime/Resources/Resources_STFEXP/STFEXP_AnimationBlendtree.cs",
			"extra_links": {
				"Default Processor": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Editor/Processors/Processors_STFEXP/STFEXP_AnimationBlendtree_Processor.cs"
			}
		}
	},
	"allOf": [{ "$ref": "https://schema.stfform.at/stf.schema.json#/$defs/stf_data_resource" }],
	"properties": {
		"type": {
			"const": "stfexp.animation_blendtree"
		},
		"blendtree_type": {
			"enum": ["1d", "2d"]
		},
		"animations": {
			"type": "array",
			"items": {
				"type": "object",
				"title": "Animation Mapping",
				"properties": {
					"position": {
						"type": ["number", "array"],
						"minItems": 2,
						"maxItems": 2,
						"description": "A single float for `1d` blendtrees or an array of two floats for `2d` blendtrees.",
						"examples": [0.14, [0.3, 0.7]]
					},
					"animation": {
						"$ref": "https://schema.stfform.at/stf.schema.json#resource_ref",
						"description": "Resource reference. The resource must import into an animation."
					}
				},
				"required": [
					"position",
					"animation"
				]
			},
			"stfExpand": true
		}
	},
	"required": [
		"type",
		"blendtree_type",
		"animations"
	],
	"additionalProperties": false
}