Skip to content

Commit 91c55cc

Browse files
committed
some doc comments
1 parent 158bf28 commit 91c55cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/bevy_gltf/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,31 @@ pub struct GltfPrimitive {
7070
pub material: Option<Handle<StandardMaterial>>,
7171
}
7272

73+
/// Part of a [`GltfNodeAnimation`], interpolation method for an animation.
7374
#[derive(Clone, Debug)]
7475
pub enum GltfAnimationInterpolation {
7576
Linear,
7677
Step,
7778
CubicSpline,
7879
}
7980

81+
/// How a property of a gLTF node should be animated. The property and its value can be found
82+
/// through the [`GltfNodeAnimationKeyframes`] attribute.
8083
#[derive(Clone, Debug)]
8184
pub struct GltfNodeAnimation {
8285
pub keyframe_timestamps: Vec<f32>,
8386
pub keyframes: GltfNodeAnimationKeyframes,
8487
pub interpolation: GltfAnimationInterpolation,
8588
}
8689

90+
/// A gLTF animation, listing how each node (by its index) that is part of it should be animated.
8791
#[derive(Default, Clone, TypeUuid, Debug)]
8892
#[uuid = "d81b7179-0448-4eb0-89fe-c067222725bf"]
8993
pub struct GltfAnimation {
9094
pub node_animations: HashMap<usize, Vec<GltfNodeAnimation>>,
9195
}
9296

97+
/// Key frames of an animation.
9398
#[derive(Clone, Debug)]
9499
pub enum GltfNodeAnimationKeyframes {
95100
Rotation(Vec<Vec4>),
@@ -107,6 +112,7 @@ impl Default for GltfNodeAnimation {
107112
}
108113
}
109114

115+
/// A gLTF node that is part of an animation, with its index.
110116
#[derive(Component, Debug, Clone, Reflect, Default)]
111117
#[reflect(Component)]
112118
pub struct GltfAnimatedNode {

0 commit comments

Comments
 (0)