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/keyframe_base.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_bezier_handle::KeyframeBezierHandle;
5use crate::schema::helpers::int_boolean::BoolInt;
6use serde::{Deserialize, Serialize};
7
8/// A Keyframes specifies the value at a specific time and the interpolation
9/// function to reach the next keyframe.
10#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
11pub struct KeyframeBase {
12 /// Time
13 #[serde(rename = "t")]
14 pub time: f64,
15 /// Hold
16 #[serde(rename = "h")]
17 #[serde(skip_serializing_if = "Option::is_none")]
18 pub hold: Option<BoolInt>,
19 /// In tangent of the keyframe.
20 /// Easing tangent going into the next keyframe.
21 #[serde(rename = "i")]
22 #[serde(skip_serializing_if = "Option::is_none")]
23 pub in_tangent: Option<KeyframeBezierHandle>,
24 /// Out tangent of the keyframe.
25 /// Easing tangent leaving the current keyframe.
26 #[serde(rename = "o")]
27 #[serde(skip_serializing_if = "Option::is_none")]
28 pub out_tangent: Option<KeyframeBezierHandle>,
29}