Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
simbleau committed Feb 1, 2024
1 parent ba69179 commit 2ffe4b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/playback_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ use std::ops::Range;

#[derive(PartialEq, Component, Clone, Debug, Reflect)]
#[reflect(Component)]
/// Add this component to a `VelloAssetBundle` entity to adjust playback settings.
/// Playback settings which adjust the playback of a vello asset.
///
/// You can add this component directly to a `VelloAssetBundle` entity to adjust playback settings.
pub struct PlaybackSettings {
pub autoplay: bool,
pub direction: AnimationDirection,
Expand All @@ -26,13 +28,15 @@ impl Default for PlaybackSettings {
}
}

/// The direction to play the segments of a lottie animation.
#[derive(PartialEq, Component, Default, Clone, Copy, Debug, Reflect)]
pub enum AnimationDirection {
#[default]
Normal = 1,
Reverse = -1,
}

/// How often to loop.
#[derive(PartialEq, Component, Default, Clone, Copy, Debug, Reflect)]
pub enum AnimationLoopBehavior {
None,
Expand All @@ -41,6 +45,7 @@ pub enum AnimationLoopBehavior {
Loop,
}

/// Play mode. When set to bounce, every other loop switches animation direction.
#[derive(PartialEq, Component, Default, Clone, Copy, Debug, Reflect)]
pub enum AnimationPlayMode {
#[default]
Expand Down

0 comments on commit 2ffe4b3

Please sign in to comment.