tawasuyu/llimphi
Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.
⎇ main
shared/foreign-lottie/src/schema/animated_properties/shape_keyframe.rs
Historia
Quién tocó qué
crudo
1// Copyright 2024 the Velato Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4use super::keyframe_base::KeyframeBase;
5use crate::schema::helpers::bezier::Bezier;
6use serde::{Deserialize, Serialize};
7
8/// Keyframe holding Bezier objects
9#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
10pub struct ShapeKeyframe {
11 #[serde(flatten)]
12 pub base: KeyframeBase,
13 /// Starting point of this keyframe. This is required for all keyframes, except the last keyframe.
14 /// The last keyframe may omit this value, in which case the previous keyframe's "e" is used (or "s")
15 /// if not present.
16 #[serde(rename = "s")]
17 #[serde(skip_serializing_if = "Option::is_none")]
18 pub start: Option<Vec<Bezier>>,
19 /// Ending point of this keyframe. Each keyframe may store it's own end, to allow for non-continuous animations.
20 /// This means the ending point of one frame is not guaranteed to match the starting point of the next.
21 /// This is always optional, and never required.
22 #[serde(rename = "e")]
23 #[serde(skip_serializing_if = "Option::is_none")]
24 pub end: Option<Vec<Bezier>>,
25}