Skip to content

Commit

Permalink
gfd
Browse files Browse the repository at this point in the history
  • Loading branch information
merwaaan committed Aug 27, 2024
1 parent 4aeab78 commit 0d896a1
Showing 1 changed file with 4 additions and 29 deletions.
33 changes: 4 additions & 29 deletions src/animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ impl Default for AnimationDirection {
/// ```
/// # use bevy_spritesheet_animation::prelude::*;
/// # let mut library = SpritesheetLibrary::new();
///
/// let some_clip = Clip::from_frames([1, 2, 3])
/// .with_duration(AnimationDuration::PerRepetition(2000))
/// .with_easing(Easing::In(EasingVariety::Quadratic));
/// .with_duration(AnimationDuration::PerRepetition(2000));
///
/// let some_clip_id = library.register_clip(some_clip);
///
Expand All @@ -95,13 +93,14 @@ impl Default for AnimationDirection {
/// let another_clip_id = library.register_clip(another_clip);
///
/// let mut animation = Animation::from_clips([some_clip_id, another_clip_id])
/// .with_repetitions(AnimationRepeat::Times(5));
/// .with_repetitions(AnimationRepeat::Loop)
/// .with_easing(Easing::In(EasingVariety::Quadratic));
///
/// let animation_id = library.register_animation(animation);
/// ```
#[derive(Debug, Clone)]
pub struct Animation {
/// The IDs of the [Clip]s that compose this animation
/// The IDs of the [Clip](crate::prelude::Clip)s that compose this animation
clip_ids: Vec<ClipId>,

/// The optional duration of this animation
Expand Down Expand Up @@ -135,30 +134,6 @@ impl Animation {
}
}

/// Adds a new clip to the animation.
///
/// # Arguments
///
/// `clip_id` - the ID of the clip to add to the animation
///
/// # Example
///
/// ```
/// # use bevy_spritesheet_animation::prelude::*;
/// # let mut library = SpritesheetLibrary::new();
/// let clip = Clip::from_frames([3, 4, 5]);
///
/// let clip_id = library.register_clip(clip);
///
/// let animation = Animation::from_clip(clip_id);
///
/// let animation_id = library.register_animation(animation);
/// ```
// pub fn add_clip(&mut self, clip_id: ClipId) -> &mut Self {
// self.clip_ids.push(clip_id);
// self
// }
//TODO
pub fn clip_ids(&self) -> &[ClipId] {
&self.clip_ids
}
Expand Down

0 comments on commit 0d896a1

Please sign in to comment.