From a4535d878a9d092ce999b9fbe26a68c7046a1b9b Mon Sep 17 00:00:00 2001 From: Matt Kleinschafer Date: Tue, 23 Apr 2024 11:30:55 +1000 Subject: [PATCH] Fix up some field accessors in the animations module --- modules/graphics/src/animations.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/graphics/src/animations.rs b/modules/graphics/src/animations.rs index 424385ab..815078bc 100644 --- a/modules/graphics/src/animations.rs +++ b/modules/graphics/src/animations.rs @@ -18,11 +18,11 @@ pub struct AnimationTree { /// A single animation state in an animation tree. pub struct AnimationState { - name: StringName, - clip: AnimationClip, - transitions: Vec>, - time_elapsed: TimeSpan, - speed: f32, + pub name: StringName, + pub clip: AnimationClip, + pub transitions: Vec>, + pub time_elapsed: TimeSpan, + pub speed: f32, } /// A condition that must be met for a transition to occur. @@ -30,15 +30,15 @@ type Condition = Box, &T) -> bool>; /// A transition between two animation states. pub struct AnimationTransition { - target: StringName, - condition: Condition, + pub target: StringName, + pub condition: Condition, } /// A single clip of animation data. #[derive(Default)] pub struct AnimationClip { - duration: TimeSpan, - tracks: Vec, + pub duration: TimeSpan, + pub tracks: Vec, } /// A single track of animation data. @@ -58,8 +58,8 @@ pub type AnimationTrackData = Vec>; #[derive(Clone, Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct AnimationKeyFrame { - time: f32, - value: T, + pub time: f32, + pub value: T, } impl AnimationTree {