pub enum AnimationEffect {
Show 56 variants
FadeIn(AnimationTiming),
FadeInUp(AnimationTiming),
FadeInDown(AnimationTiming),
FadeInLeft(AnimationTiming),
FadeInRight(AnimationTiming),
SlideInLeft(AnimationTiming),
SlideInRight(AnimationTiming),
SlideInUp(AnimationTiming),
SlideInDown(AnimationTiming),
ScaleIn(AnimationTiming),
BounceIn(AnimationTiming),
BlurIn(AnimationTiming),
RotateIn(AnimationTiming),
ElasticIn(AnimationTiming),
PopIn(AnimationTiming),
FadeOut(AnimationTiming),
FadeOutUp(AnimationTiming),
FadeOutDown(AnimationTiming),
SlideOutLeft(AnimationTiming),
SlideOutRight(AnimationTiming),
SlideOutUp(AnimationTiming),
SlideOutDown(AnimationTiming),
ScaleOut(AnimationTiming),
BounceOut(AnimationTiming),
BlurOut(AnimationTiming),
RotateOut(AnimationTiming),
Pulse(AnimationTiming),
Float(AnimationTiming),
Shake(AnimationTiming),
Spin(AnimationTiming),
FlipInX(AnimationTiming),
FlipInY(AnimationTiming),
FlipOutX(AnimationTiming),
FlipOutY(AnimationTiming),
TiltIn(TiltInConfig),
DrawIn(AnimationTiming),
StrokeReveal(AnimationTiming),
Typewriter(AnimationTiming),
WipeLeft(AnimationTiming),
WipeRight(AnimationTiming),
Float3d(AnimationTiming),
CharScaleIn(CharAnimationTiming),
CharFadeIn(CharAnimationTiming),
CharWave(CharAnimationTiming),
CharBounce(CharAnimationTiming),
CharRotateIn(CharAnimationTiming),
CharSlideUp(CharAnimationTiming),
CharBlurIn(CharAnimationTiming),
Glow(GlowConfig),
Shimmer(ShimmerConfig),
Wiggle(WiggleConfig),
Orbit(OrbitConfig),
Keyframes(KeyframesConfig),
MotionBlur(MotionBlurConfig),
Trail(TrailConfig),
MotionPath(MotionPathConfig),
}Expand description
A single animation effect. Discriminated by "type" in JSON.
Each preset name is a valid type, plus special types: glow, wiggle, keyframes, motion_blur.
Examples:
{ "name": "fade_in_up", "delay": 0.3, "duration": 0.6 }
{ "name": "glow", "color": "#F68F2B", "radius": 16, "intensity": 1.2 }
{ "name": "wiggle", "property": "translate_y", "amplitude": 5, "frequency": 2 }Variants§
FadeIn(AnimationTiming)
FadeInUp(AnimationTiming)
FadeInDown(AnimationTiming)
FadeInLeft(AnimationTiming)
FadeInRight(AnimationTiming)
SlideInLeft(AnimationTiming)
SlideInRight(AnimationTiming)
SlideInUp(AnimationTiming)
SlideInDown(AnimationTiming)
ScaleIn(AnimationTiming)
BounceIn(AnimationTiming)
BlurIn(AnimationTiming)
RotateIn(AnimationTiming)
ElasticIn(AnimationTiming)
PopIn(AnimationTiming)
Scale up from nothing with a back-out overshoot, then a short elastic
pulse before settling — the notification-badge arrival, where the
second beat is what draws the eye after the first has placed the
element. AnimationTiming.overshoot sets the pulse amplitude
(default 0.18 = 118%); 0 reduces it to a plain back-out scale-in.
FadeOut(AnimationTiming)
FadeOutUp(AnimationTiming)
FadeOutDown(AnimationTiming)
SlideOutLeft(AnimationTiming)
SlideOutRight(AnimationTiming)
SlideOutUp(AnimationTiming)
SlideOutDown(AnimationTiming)
ScaleOut(AnimationTiming)
BounceOut(AnimationTiming)
BlurOut(AnimationTiming)
RotateOut(AnimationTiming)
Pulse(AnimationTiming)
Float(AnimationTiming)
Shake(AnimationTiming)
Spin(AnimationTiming)
FlipInX(AnimationTiming)
FlipInY(AnimationTiming)
FlipOutX(AnimationTiming)
FlipOutY(AnimationTiming)
TiltIn(TiltInConfig)
DrawIn(AnimationTiming)
StrokeReveal(AnimationTiming)
Typewriter(AnimationTiming)
WipeLeft(AnimationTiming)
WipeRight(AnimationTiming)
Float3d(AnimationTiming)
CharScaleIn(CharAnimationTiming)
CharFadeIn(CharAnimationTiming)
CharWave(CharAnimationTiming)
CharBounce(CharAnimationTiming)
CharRotateIn(CharAnimationTiming)
CharSlideUp(CharAnimationTiming)
CharBlurIn(CharAnimationTiming)
Each word (or char) arrives blurred and settles sharp, combined with
a slight upward translate and an opacity ramp — one continuous
per-unit animation driven by the same progress value, not three
independently-timed effects. CharAnimationTiming.blur sets the
starting blur sigma in px (default
engine::animator::DEFAULT_CHAR_BLUR_SIGMA, tuned for 100px+ display
type).
Resolved through engine::animator::extract_effects →
ResolvedCharAnimation like its five siblings, so it picks up
container-level stagger shifting and timeline-embedded copies. (It
used to be read directly off style.animation inside
rustmotion_components::text::Text::paint and therefore missed both.)
Glow(GlowConfig)
Shimmer(ShimmerConfig)
A band of light sweeping across the element’s own painted pixels.
See ShimmerConfig.
Wiggle(WiggleConfig)
Orbit(OrbitConfig)
Keyframes(KeyframesConfig)
MotionBlur(MotionBlurConfig)
Trail(TrailConfig)
Temporal trail effect: paints copies of the component at prior times with decaying opacity, creating a persistence-of-vision ghost trail.
MotionPath(MotionPathConfig)
Move the component along an SVG path, and — when orient is set —
rotate it to face the path’s tangent direction. See
MotionPathConfig’s doc comment for the path syntax, the
coordinate space path points are interpreted in, and how degenerate
paths (empty, single-point, zero-length) are handled.
Implementations§
Source§impl AnimationEffect
impl AnimationEffect
Sourcepub fn shift_delay(&mut self, by: f64)
pub fn shift_delay(&mut self, by: f64)
Shift the effect’s start delay by by seconds. Used by timeline
steps, whose animations run relative to the step’s at. Continuous
effects without a delay concept (glow, wiggle, orbit, motion blur)
are unaffected.
Sourcepub fn as_preset(&self) -> Option<(AnimationPreset, &AnimationTiming)>
pub fn as_preset(&self) -> Option<(AnimationPreset, &AnimationTiming)>
If this is a preset variant, return the corresponding AnimationPreset and timing.
Trait Implementations§
Source§impl Clone for AnimationEffect
impl Clone for AnimationEffect
Source§fn clone(&self) -> AnimationEffect
fn clone(&self) -> AnimationEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnimationEffect
impl Debug for AnimationEffect
Source§impl<'de> Deserialize<'de> for AnimationEffect
impl<'de> Deserialize<'de> for AnimationEffect
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for AnimationEffect
impl JsonSchema for AnimationEffect
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for AnimationEffect
impl PartialEq for AnimationEffect
Source§impl Serialize for AnimationEffect
impl Serialize for AnimationEffect
impl StructuralPartialEq for AnimationEffect
Auto Trait Implementations§
impl Freeze for AnimationEffect
impl RefUnwindSafe for AnimationEffect
impl Send for AnimationEffect
impl Sync for AnimationEffect
impl Unpin for AnimationEffect
impl UnsafeUnpin for AnimationEffect
impl UnwindSafe for AnimationEffect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more