Skip to main content

Module animation

Module animation 

Source
Expand description

Code-built animation & timing: construct Storyboards, the common animation classes (DoubleAnimation / ColorAnimation / ThicknessAnimation / PointAnimation), their key-frame variants, and the easing-function family from Rust, then run them off the View clock.

Each handle here owns a freshly-created Noesis object holding a single +1 reference, released on Drop via noesis_base_component_release, the same idiom as crate::brushes. Adding an animation to a Storyboard, or a key frame / easing function to its parent, makes Noesis take its own reference, so the Rust builder handle may be dropped after wiring.

§Running an animation

Animations advance off the view’s TimeManager, which is pumped by View::update. Build the element tree, create a View, then either:

Then pump view.update(t) for increasing t across the duration and read the animated value back through Noesis (e.g. FrameworkElement::get_f32).

Structs§

BeginStoryboard
A BeginStoryboard trigger action: begins a Storyboard with a chosen HandoffBehavior when the owning trigger fires. Useful inside a trigger’s action list; code-driven Storyboard::begin covers the rest.
BooleanAnimationUsingKeyFrames
Animates a bool property through discrete key frames (a bool can’t be interpolated, so only discrete frames exist).
ColorAnimation
Interpolates a Color property linearly between From and To. Colors are [r, g, b, a], each 0..=1.
ColorAnimationBuilder
Fluent builder for a ColorAnimation. Sets the color from/to/by plus the common timeline knobs (duration, begin time, auto-reverse, repeat, fill behavior, speed) and an easing function, then builds the animation.
ColorAnimationUsingKeyFrames
Animates a Color property through a sequence of color key frames.
DoubleAnimation
Interpolates a float property linearly between From and To over the duration.
DoubleAnimationBuilder
Fluent builder for a DoubleAnimation. Sets the value from/to/by plus the common timeline knobs (duration, begin time, auto-reverse, repeat, fill behavior, speed) and an easing function, then builds the animation.
DoubleAnimationUsingKeyFrames
Animates a float property through a sequence of discrete / linear / eased key frames.
EasingFunction
An easing function applied to a From/To animation or an easing key frame.
Int16Animation
Interpolates an int16 property between From and To (Noesis rounds the interpolated value).
Int16AnimationBuilder
Fluent builder for a Int16Animation. Sets the value from/to/by plus the common timeline knobs (duration, begin time, auto-reverse, repeat, fill behavior, speed) and an easing function, then builds the animation.
Int16AnimationUsingKeyFrames
Animates an int16 property through discrete / linear / eased / splined key frames.
Int32Animation
Interpolates an int32 property between From and To.
Int32AnimationBuilder
Fluent builder for a Int32Animation. Sets the value from/to/by plus the common timeline knobs (duration, begin time, auto-reverse, repeat, fill behavior, speed) and an easing function, then builds the animation.
Int32AnimationUsingKeyFrames
Animates an int32 property through discrete / linear / eased / splined key frames.
Int64Animation
Interpolates an int64 property between From and To.
Int64AnimationBuilder
Fluent builder for a Int64Animation. Sets the value from/to/by plus the common timeline knobs (duration, begin time, auto-reverse, repeat, fill behavior, speed) and an easing function, then builds the animation.
Int64AnimationUsingKeyFrames
Animates an int64 property through discrete / linear / eased / splined key frames.
KeySpline
The two cubic-Bezier control points (each in the unit square) that shape a spline key frame’s progress curve. Used with KeyFrameKind::Spline via KeyFrameInterp::Spline.
MatrixAnimationUsingKeyFrames
Animates a Matrix (MatrixTransform) property through discrete key frames. A matrix is not componentwise interpolated, so only discrete frames exist. Matrices are [m00, m01, m10, m11, m20, m21].
ObjectAnimationUsingKeyFrames
Animates an Object (arbitrary BaseComponent) property through discrete key frames. Objects can’t be interpolated, so only discrete frames exist.
OwnedComponent
An owned Noesis::BaseComponent handle handed back from an ObjectAnimationUsingKeyFrames key-frame value read.
ParallelTimeline
A code-built, nestable timeline group whose children (any Timeline, including animations or nested ParallelTimelines) run in parallel off the group’s clock. Shares the Timeline knobs (duration, repeat, auto-reverse, …) with every animation type.
PointAnimation
Interpolates a Point property ((x, y)).
PointAnimationBuilder
Fluent builder for a PointAnimation. Sets the point from/to/by plus the common timeline knobs (duration, begin time, auto-reverse, repeat, fill behavior, speed) and an easing function, then builds the animation.
PointAnimationUsingKeyFrames
Animates a Point property ((x, y)) through discrete / linear / eased / splined key frames.
RectAnimation
Interpolates a Rect property between From and To. Rects are [x, y, width, height].
RectAnimationBuilder
Fluent builder for a RectAnimation. Sets the rect from/to/by plus the common timeline knobs (duration, begin time, auto-reverse, repeat, fill behavior, speed) and an easing function, then builds the animation.
RectAnimationUsingKeyFrames
Animates a Rect property through discrete / linear / eased / splined key frames.
SizeAnimation
Interpolates a Size property between From and To. Sizes are [width, height].
SizeAnimationBuilder
Fluent builder for a SizeAnimation. Sets the size from/to/by plus the common timeline knobs (duration, begin time, auto-reverse, repeat, fill behavior, speed) and an easing function, then builds the animation.
SizeAnimationUsingKeyFrames
Animates a Size property through discrete / linear / eased / splined key frames.
Storyboard
A container timeline that targets and runs its child animations.
StringAnimationUsingKeyFrames
Animates a String property through discrete key frames (a string can’t be interpolated, so only discrete frames exist).
ThicknessAnimation
Interpolates a Thickness property ([left, top, right, bottom]).
ThicknessAnimationBuilder
Fluent builder for a ThicknessAnimation. Sets the thickness from/to/by plus the common timeline knobs (duration, begin time, auto-reverse, repeat, fill behavior, speed) and an easing function, then builds the animation.
ThicknessAnimationUsingKeyFrames
Animates a Thickness property ([left, top, right, bottom]) through discrete / linear / eased / splined key frames.

Enums§

EasingKind
The concrete easing curve. Ordinals match the kind switch in cpp/noesis_animation.cpp.
EasingMode
How an easing function interpolates over the animation’s progress. Ordinals match Noesis::EasingMode.
FillBehavior
How a timeline behaves once it reaches the end of its active period. Ordinals match Noesis::FillBehavior.
HandoffBehavior
How a newly-started animation interacts with one already running on the same property. Ordinals match Noesis::HandoffBehavior.
KeyFrameInterp
The interpolation aid passed alongside a key frame: an EasingFunction for KeyFrameKind::Easing, a KeySpline for KeyFrameKind::Spline, or nothing for discrete / linear frames.
KeyFrameKind
The interpolation method of a single key frame. Ordinals match the kind switch in cpp/noesis_animation.cpp.

Traits§

Animation
An animation timeline that can target a property and be run via a Storyboard or directly with begin_on.
AsComponent
A handle that exposes its borrowed Noesis::BaseComponent*. Implemented by every owning wrapper in this module, letting any of them be used as an ObjectAnimationUsingKeyFrames key-frame value.
Timeline
Common Timeline knobs shared by every animation type (duration, repeat, auto-reverse, …). Implemented through the object’s raw Timeline*.