From cd88930e92ed5aa4c299c74e1f9b6f4998e2c307 Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Mon, 8 Jul 2024 13:08:15 -0400 Subject: [PATCH] Minor keyframe clarifications (#57) * Minor keyframe clarifications Must be in ascending frame order First/last keyframe values are held to start/end of the animation. * Keyframes can't have the same `t` value --- docs/specs/properties.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/specs/properties.md b/docs/specs/properties.md index 31c7450..bbc47b7 100644 --- a/docs/specs/properties.md +++ b/docs/specs/properties.md @@ -15,9 +15,13 @@ Their structure depends on whether it's animated or not: {schema_object:properties/base-keyframe} +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. +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. +

Keyframe Easing

Keyframe easing handles are objects with `x` and `y` attributes, which are numbers within 0 and 1.