Skip to content

Commit

Permalink
Mark keyframe easing values as optional in schema (#67)
Browse files Browse the repository at this point in the history
* Mark keyframe easing values as optional in schema

Docs updated to specify when these are required

* Add back accidentally deleted section
  • Loading branch information
b-wils committed Jul 31, 2024
1 parent 944f29d commit f8ff9ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
7 changes: 5 additions & 2 deletions docs/specs/properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ Their structure depends on whether it's animated or not:

Keyframe arrays MUST be stored in order of strictly ascending `t` frame number. Two keyframes cannot have the same `t` value.

If `h` is present and it's 1, you don't need `i` and `o`, as the property will keep the same value
until the next keyframe.
All keyframes MUST have an `i` and `o` value, unless-

* It is the last keyframe in the sequence OR
* `h` is present and it's 1, as the property will keep the same value until the
next keyframe.

If the first keyframe occurs after the start of the animation, the initial property value will be from the first keyframe. Similarly if the last keyframe is before the end of the animation, the last keyframe value will be held until the end.

Expand Down
17 changes: 0 additions & 17 deletions schema/properties/base-keyframe.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,6 @@
"$ref": "#/$defs/properties/easing-handle"
}
}
},
{
"if": {
"oneOf": [
{
"properties": {
"h": { "const": 0 }
}
},
{
"not": {"required": ["h"]}
}
]
},
"then": {
"required": ["i", "o"]
}
}
],
"required": ["t"]
Expand Down

0 comments on commit f8ff9ba

Please sign in to comment.