mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Public access for AnimationClip.duration (#4615)
# Objective - Small change that better facilitates custom animation systems ## Solution - Added a public access function to `bevy::animation::AnimationClip`, making duration publicly readable ---
This commit is contained in:
parent
328c26d02c
commit
8e03634457
1 changed files with 5 additions and 0 deletions
|
@ -73,6 +73,11 @@ impl AnimationClip {
|
|||
&self.curves
|
||||
}
|
||||
|
||||
/// Duration of the clip, represented in seconds
|
||||
pub fn duration(&self) -> &f32 {
|
||||
&self.duration
|
||||
}
|
||||
|
||||
/// Add a [`VariableCurve`] to an [`EntityPath`].
|
||||
pub fn add_curve_to_path(&mut self, path: EntityPath, curve: VariableCurve) {
|
||||
// Update the duration of the animation by this curve duration if it's longer
|
||||
|
|
Loading…
Reference in a new issue