Skip to content

Commit

Permalink
WIP Seperate XY position properties
Browse files Browse the repository at this point in the history
  • Loading branch information
b-wils committed May 9, 2024
1 parent 76b5617 commit ca326ef
Showing 1 changed file with 49 additions and 27 deletions.
76 changes: 49 additions & 27 deletions schema/properties/position-property.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
]
}

0 comments on commit ca326ef

Please sign in to comment.