gltf_json/extensions/
animation.rs

1use gltf_derive::Validate;
2use serde_derive::{Deserialize, Serialize};
3#[cfg(feature = "extensions")]
4use serde_json::{Map, Value};
5
6/// A keyframe animation.
7#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)]
8pub struct Animation {
9    #[cfg(feature = "extensions")]
10    #[serde(default, flatten)]
11    pub others: Map<String, Value>,
12}
13
14/// Targets an animation's sampler at a node's property.
15#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)]
16pub struct Channel {}
17
18/// The index of the node and TRS property that an animation channel targets.
19#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)]
20pub struct Target {}
21
22/// Defines a keyframe graph but not its target.
23#[derive(Clone, Debug, Default, Deserialize, Serialize, Validate)]
24pub struct Sampler {}