FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AnimationBuilder

    struct · ferroui-view · v0.5.0

    struct AnimationBuilder
    

    An animation being built: key frames of property values at cues, and its duration, iterations, easing and fill mode.

    animation(ms(600))
        .key_frame(0.0, |frame| frame.set(Visual::opacity_property(), 0.0))
        .key_frame(1.0, |frame| frame.set(Visual::opacity_property(), 1.0))
        .fill_mode(FillMode::Forward)
    

    View source

    Members

    key_frame

    fn key_frame(self: Self, cue: f64, frame: impl FnOnce(KeyFrameBuilder) -> KeyFrameBuilder) -> Self
    

    Adds a key frame at cue (0.0 the start, 1.0 the end).

    Source

    iterations

    fn iterations(self: Self, count: IterationCount) -> Self
    

    How often it runs.

    Source

    easing

    fn easing(self: Self, easing: impl Into<Easing>) -> Self
    

    Its easing.

    Source

    fill_mode

    fn fill_mode(self: Self, fill_mode: FillMode) -> Self
    

    Whether the values of its ends are kept before and after it runs.

    Source

    delay

    fn delay(self: Self, delay: Duration) -> Self
    

    Its delay.

    Source

    build

    fn build(self: Self) -> Ref<Animation>
    

    The animation.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.