{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.stfform.at/stfexp.light.schema.json",
	"title": "3d Light",
	"description": "A real-time rendering friendly light-source. It can represent pointlights, directional lights & spotlights.",
	"stfImplementations": {
		"blender": {
			"representingType": "bpy.types.Object with bpy.types.Light",
			"link": "https://codeberg.org/stf_format/stf_blender/src/branch/master/stfblender/stf_resources/stfexp/stfexp_light.py"
		},
		"godot": {
			"representingType": "Light3D",
			"link": "https://codeberg.org/stf_format/stf_godot/src/branch/master/addons/stf_godot/resources/stfexp/STFEXP_Light.gd"
		},
		"unity": {
			"representingType": "Light",
			"link": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Runtime/Resources/Resources_STFEXP/STFEXP_Light.cs",
			"extra_links": {
				"Default Processor": "https://codeberg.org/stf_format/stf_unity/src/branch/master/Runtime/Processors/Processors_STFEXP/STFEXP_Light_Processor.cs"
			}
		}
	},
	"allOf": [{ "$ref": "https://schema.stfform.at/stf.schema.json#/$defs/stf_instance_resource" }],
	"properties": {
		"type": {
			"const": "stfexp.light"
		},
		"light_type": {
			"enum": ["point", "directional", "spot"]
		},
		"brightness": {
			"type": "number",
			"minimum": 0
		},
		"color": {
			"type": "array",
			"items": {
				"type": "number"
			},
			"minItems": 3,
			"maxItems": 3
		},
		"temperature": {
			"type": "number",
			"minimum": 0,
			"description": "If set, the color will be used as the tint"
		},
		"shadow": {
			"type": "boolean",
			"default": true,
			"description": "Whether this light casts shadows"
		},
		"range": {
			"type": "number",
			"minimum": 0,
			"description": "The range of `point` or `spot` type lights."
		},
		"spot_angle": {
			"type": "number",
			"minimum": 0,
			"description": "The angle of the light cone for `spot` type lights"
		}
	},
	"required": [
		"type",
		"light_type",
		"brightness",
		"color"
	],
	"additionalProperties": false
}