{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.stfform.at/stf.instance.armature.schema.json",
	"title": "STF Armature Instance",
	"description": "Represents an instance of an armature. Analogous to a Blender Object with Armature, Unity Prefab/GameObject, Godot Skeleton3D.",
	"allOf": [{ "$ref": "https://schema.stfform.at/stf.schema.json#/$defs/stf_instance_resource" }],
	"properties": {
		"type": {
			"const": "stf.instance.armature"
		},
		"armature": {
			"type": "integer",
			"minimum": 0,
			"description": "Index of an ID in the `referenced_resources` array. The referenced resource must import into an armature."
		},
		"pose": {
			"type": "object",
			"patternProperties": {
				".+": {
					"type": "array",
					"prefixItems": [
						{
							"type": "array",
							"items": {
								"type": "number"
							},
							"minItems": 3,
							"maxItems": 3,
							"description": "Translation (XYZ)"
						},
						{
							"type": "array",
							"items": {
								"type": "number"
							},
							"minItems": 4,
							"maxItems": 4,
							"description": "Quaternion rotation (XYZW)"
						},
						{
							"type": "array",
							"items": {
								"type": "number"
							},
							"minItems": 3,
							"maxItems": 3,
							"description": "Scale (XYZ)"
						}
					],
					"minItems": 3,
					"maxItems": 3,
					"items": false,
					"unevaluatedItems": false,
					"default": [[0, 0, 0], [0, 0, 0, 1], [1, 1, 1]],
					"description": "Translation - Rotation - Scale"
				}
			},
			"minProperties": 0,
			"additionalProperties": false,
			"description": "The posed TRS (translation, rotation, scale) for bones (by resource-id) on the instantiated armature"
		},
		"added_components": {
			"type": "object",
			"patternProperties": {
				".+": {
					"type": "array",
					"items": {
						"type": "integer",
						"minimum": 0,
						"description": "Index of an ID in the `referenced_resources` array. The referenced resource must be a component that can be placed on the respective bone."
					}
				}
			},
			"minProperties": 0,
			"additionalProperties": false,
			"description": "Components added to instantiated bones. (Bone-ID -> Component-ID)"
		},
		"modified_components": {
			"type": "object",
			"patternProperties": {
				".+": {
					"type": "object",
					"patternProperties": {
						".+": {
							"description": "The modified values of the existing component."
						}
					},
					"minProperties": 0,
					"additionalProperties": false
				}
			},
			"minProperties": 0,
			"additionalProperties": false,
			"description": "Modified values for existing components on the instantiated bones. (Bone-ID -> Component-ID)"
		}
	},
	"required": [
		"type",
		"armature"
	],
	"additionalProperties": false
}