Sign in

    mizchi/css/animation does not have a README file

    AnimatableKeyframe

    pub(all) struct AnimatableKeyframe {
    offset : Double
    value : AnimatableValue
    easing :
    Easing

    }

    One typed keyframe: an offset in [0, 1], the computed value at that offset, and the easing governing interpolation to the next keyframe.

    AnimatableKeyframe::new

    fn AnimatableKeyframe::new(offset : Double, value : AnimatableValue) -> AnimatableKeyframe

    AnimatableKeyframe::with_easing

    fn AnimatableKeyframe::with_easing(offset : Double, value : AnimatableValue, easing :
    Easing
    ) -> AnimatableKeyframe

    AnimatableKeyframeEffect

    pub(all) struct AnimatableKeyframeEffect {
    keyframes : Array[AnimatableKeyframe]
    timing : EffectTiming
    }

    A typed keyframe effect: keyframes (sorted by offset) plus timing. Mirrors NumericKeyframeEffect but interpolates AnimatableValue computed values.

    AnimatableKeyframeEffect::new

    Build a typed keyframe effect. Returns None if there are no keyframes. Keyframes are assumed to be sorted by non-decreasing offset.

    AnimatableKeyframeEffect::sample

    fn AnimatableKeyframeEffect::sample(self : AnimatableKeyframeEffect, local_time : Double) -> AnimatableValue?

    Sample the computed value at local_time (ms on the effect's local timeline). Returns None when the timing model produces no active value (e.g. a non-filled before/after phase).

    AnimatableKeyframeEffect::sample_progress

    fn AnimatableKeyframeEffect::sample_progress(self : AnimatableKeyframeEffect, progress : Double) -> AnimatableValue

    Sample the computed value at normalized progress progress in [0, 1] within one iteration. Values before the first / after the last keyframe clamp to the endpoint value.

    AnimatableValue

    pub(all) enum AnimatableValue {
    Number(Double)
    Length(Double)
    Percent(Double)
    Color(
    Color
    )
    Transform(
    Transform
    )
    Discrete(String)
    } derive(Eq)

    A computed value that can take part in animation interpolation. Anything not representable here (or interpolated between mismatched kinds) animates discretely (a 50% jump).

    AnimationPhase

    pub(all) enum AnimationPhase {
    Before
    Active
    After
    } derive(Eq,
    Debug
    )

    ColorSpace

    pub(all) enum ColorSpace {
    Srgb
    Oklab
    Oklch
    Lab
    Lch
    } derive(Eq,
    Debug
    )

    Color space used for <color> interpolation.

    CompositeOperation

    pub(all) enum CompositeOperation {
    Replace
    Add
    Accumulate
    } derive(Eq,
    Debug
    )

    ComputedEffectTiming

    pub(all) struct ComputedEffectTiming {
    phase : AnimationPhase
    active_duration : Double
    end_time : Double
    local_time : Double
    active_time : Double?
    progress : Double?
    current_iteration : Int?
    directed_progress : Double?
    transformed_progress : Double?
    } derive(Eq,
    Debug
    )

    EffectTiming

    pub(all) struct EffectTiming {
    delay : Double
    end_delay : Double
    fill : FillMode
    iteration_start : Double
    iterations : Double
    duration : Double
    direction : PlaybackDirection
    easing :
    Easing

    } derive(Eq,
    Debug
    )

    EffectTiming::active_duration

    fn EffectTiming::active_duration(self : EffectTiming) -> Double

    EffectTiming::at

    fn EffectTiming::at(self : EffectTiming, local_time : Double) -> ComputedEffectTiming

    EffectTiming::end_time

    fn EffectTiming::end_time(self : EffectTiming) -> Double

    EffectTiming::new

    fn EffectTiming::new(duration : Double) -> EffectTiming

    FillMode

    pub(all) enum FillMode {
    None
    Forwards
    Backwards
    Both
    Auto
    } derive(Eq,
    Debug
    )

    impl Show for FillMode

    IterationCompositeOperation

    pub(all) enum IterationCompositeOperation {
    Replace
    Accumulate
    } derive(Eq,
    Debug
    )

    NumericKeyframe

    pub(all) struct NumericKeyframe {
    offset : Double
    value : Double
    easing :
    Easing

    composite : CompositeOperation?
    } derive(Eq,
    Debug
    )

    NumericKeyframe::new

    fn NumericKeyframe::new(offset : Double, value : Double) -> NumericKeyframe

    NumericKeyframe::with_composite

    fn NumericKeyframe::with_composite(offset : Double, value : Double, easing :
    Easing
    , composite : CompositeOperation) -> NumericKeyframe

    NumericKeyframe::with_easing

    fn NumericKeyframe::with_easing(offset : Double, value : Double, easing :
    Easing
    ) -> NumericKeyframe

    NumericKeyframeEffect

    pub(all) struct NumericKeyframeEffect {
    keyframes : Array[NumericKeyframe]
    timing : EffectTiming
    composite : CompositeOperation
    iteration_composite : IterationCompositeOperation
    } derive(Eq,
    Debug
    )

    NumericKeyframeEffect::new

    NumericKeyframeEffect::sample

    fn NumericKeyframeEffect::sample(self : NumericKeyframeEffect, local_time : Double) -> Double?

    NumericKeyframeEffect::sample_progress

    fn NumericKeyframeEffect::sample_progress(self : NumericKeyframeEffect, progress : Double) -> Double

    NumericKeyframeEffect::sample_progress_with_underlying

    fn NumericKeyframeEffect::sample_progress_with_underlying(self : NumericKeyframeEffect, progress : Double, underlying_value : Double, current_iteration : Int) -> Double

    NumericKeyframeEffect::sample_with_underlying

    fn NumericKeyframeEffect::sample_with_underlying(self : NumericKeyframeEffect, local_time : Double, underlying_value : Double) -> Double?

    NumericKeyframeEffect::with_composite

    fn NumericKeyframeEffect::with_composite(keyframes : Array[NumericKeyframe], timing : EffectTiming, composite : CompositeOperation, iteration_composite : IterationCompositeOperation) -> NumericKeyframeEffect?

    PlaybackDirection

    pub(all) enum PlaybackDirection {
    Normal
    Reverse
    Alternate
    AlternateReverse
    } derive(Eq,
    Debug
    )

    interpolate

    fn interpolate(from : AnimatableValue, to : AnimatableValue, t : Double) -> AnimatableValue

    Interpolate between two computed values at eased progress t in [0, 1]. Matching numeric kinds interpolate linearly; colors interpolate in sRGB; any mismatched or non-interpolable pair animates discretely (jumps at 0.5).

    interpolate_color_in

    Interpolate two colors in the given color space. Rectangular spaces (srgb, oklab, lab) interpolate channels linearly; polar spaces (oklch, lch) interpolate lightness/chroma linearly and hue along the shortest arc. Alpha is always interpolated linearly.

    interpolate_color_oklab

    Interpolate two colors in the Oklab color space (CSS Color 4 default for <color> interpolation). Alpha is interpolated linearly in [0, 1].

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io