Skip to main content

Crate ferroui_designer_animation

Crate ferroui_designer_animation 

Source
Expand description

Renderer-independent animation authoring. Times are seconds; colors are unpremultiplied sRGB. Samples can be applied to a live preview without modifying authored XAML, and recording adds keyframes rather than baking transient preview values into document attributes.

Structs§

AnimationCodecRegistry
AnimationError
AnimationImport
AnimationProgram
AnimationPrograms
BehaviorModel
CompiledTimeline
Immutable validated timeline for the render loop. Recompile after an authored edit.
ImportOptions
Runtime properties are typed. Hosts should supply hints for custom properties and the live underlying values of tracks whose endpoints are omitted. Without an underlying value, strict import rejects an implicit endpoint rather than silently changing animation behavior.
Keyframe
Player
Clock-free playback controller. The host supplies measured elapsed time, making seeks and tests independent of frame rate. No timer/thread is created by this crate.
Sample
StateSetter
StateTransition
Timeline
Track
VisualState
VisualStateGroup

Enums§

AnimationValue
Typed values preserve the difference between a point and a two-component thickness. Colors use normalized [0,1] sRGB channels. Interpolation converts RGB to linear light, matching FerroUI’s ColorAnimator; alpha stays linear.
BehaviorAction
BehaviorTrigger
Easing
Cubic Bezier easings invert the X polynomial; evaluating Y at progress directly is incorrect. Named curves are FerroUI’s animation-wide easing names. Per-keyframe easing must be Linear or CubicBezier to serialize as a native KeySpline without changing semantics.
FillMode
PlaybackBehavior
Native visibility policy. Explicit timeline seeks are independent of visibility; a stateful player uses this policy when advancing its clock.
PlaybackDirection
RelativeUnit
Repeat
ValueKind

Traits§

AnimationCodec
A custom codec owns the complete payload it recognizes. encode receives the original source, allowing a plugin to retain custom animator configuration while changing keyframes. An unsuccessful decode never changes the document or removes the opaque program.

Functions§

animation_fragment
Extract a standalone XML subtree with its inherited namespace declarations intact.
native_fragment
Qualify generated native markup using the source’s namespace prefix, without rewriting it.
rekey_copied_programs
Allocate fresh persistent animation keys in a copied subtree. Ordinary renames must not call this: keys intentionally survive named-reference and source formatting changes.
resolve_state_target
Resolve an authored state target without crossing a template name-scope boundary.
rewrite_design_metadata
Update designer metadata after a scope-aware source rename/copy. Real named references must be changed by the language service first; this updates only encoded state targets. Source must be a standalone XML subtree including its inherited namespace declarations.
state_value

Type Aliases§

Result