diff --git a/schema/properties/position-property.json b/schema/properties/position-property.json index da56639..2826b9d 100644 --- a/schema/properties/position-property.json +++ b/schema/properties/position-property.json @@ -5,39 +5,61 @@ "description": "An animatable property to represent a position in space", "oneOf": [ { - "$comment": "Not animated", - "properties": { - "a": { - "title": "Animated", - "description": "Whether the property is animated", - "$ref": "#/$defs/values/int-boolean", - "const": 0 + "oneOf": [ + { + "$comment": "Not animated", + "properties": { + "a": { + "title": "Animated", + "description": "Whether the property is animated", + "$ref": "#/$defs/values/int-boolean", + "const": 0 + }, + "k": { + "title": "Static value", + "$ref": "#/$defs/values/vector" + } + } }, - "k": { - "title": "Static value", - "$ref": "#/$defs/values/vector" + { + "$comment": "Animated", + "properties": { + "a": { + "title": "Animated", + "description": "Whether the property is animated", + "$ref": "#/$defs/values/int-boolean", + "const": 1 + }, + "k": { + "type": "array", + "title": "Keyframes", + "description": "Array of keyframes", + "items": { + "$ref": "#/$defs/properties/position-keyframe" + } + } + } } - } + ], + "required": ["a", "k"] }, { - "$comment": "Animated", + "$comment": "Separate XY", "properties": { - "a": { - "title": "Animated", - "description": "Whether the property is animated", - "$ref": "#/$defs/values/int-boolean", - "const": 1 + "s": { + "title": "Separate", + "description": "Whether the position has seperate xy values", + "type": "boolean", + "const": true }, - "k": { - "type": "array", - "title": "Keyframes", - "description": "Array of keyframes", - "items": { - "$ref": "#/$defs/properties/position-keyframe" - } + "x": { + "$ref": "#/$defs/properties/scalar-property" + }, + "y": { + "$ref": "#/$defs/properties/scalar-property" } - } + }, + "required": ["s", "x", "y"] } - ], - "required": ["a", "k"] + ] }