pub struct ExtractedEffects<'a> {
pub presets: Vec<(AnimationPreset, PresetConfig)>,
pub keyframe_animations: Vec<Animation>,
pub keyframes_loop: bool,
pub wiggles: Vec<&'a WiggleConfig>,
pub orbits: Vec<&'a OrbitConfig>,
pub motion_paths: Vec<&'a MotionPathConfig>,
pub glow: Option<&'a GlowConfig>,
pub motion_blur: Option<f32>,
pub char_animation: Option<ResolvedCharAnimation>,
}Expand description
Extracted and categorized animation effects from an AnimationEffect slice.
Fields§
§presets: Vec<(AnimationPreset, PresetConfig)>§keyframe_animations: Vec<Animation>Every keyframes/tilt_in effect’s animations, in the order their
source effects appear in style.animation (constat #5: this used to
be split into two buckets — routed purely by whether the effect’s
delay happened to be nonzero — resolved and merged separately,
which made “sum vs last-wins” on a shared property depend on that
unrelated field. Now there is one bucket, resolved in one
resolve_animations call, so the composition rule is always
“last effect in the array wins on a shared property” — a CSS-cascade
rule, independent of delay).
keyframes_loop: boolTrue when any contributing keyframes/tilt_in effect requested
"loop": true (constat #7). Applied uniformly to the whole
keyframe_animations bucket — see the doc comment on
resolve_props_for_effects for the same caveat presets already have
(multiple effects with different loop settings on the same property
is an unsupported edge case, not new to this fix).
wiggles: Vec<&'a WiggleConfig>§orbits: Vec<&'a OrbitConfig>§motion_paths: Vec<&'a MotionPathConfig>Every motion_path effect, resolved by apply_motion_paths into
translate_x/translate_y (and, when orient is set,
rotation) — the same additive-into-props treatment orbits
already gets, and for the same reason: multiple path effects on one
node compose by simple vector addition, not last-wins.
glow: Option<&'a GlowConfig>§motion_blur: Option<f32>§char_animation: Option<ResolvedCharAnimation>Auto Trait Implementations§
impl<'a> Freeze for ExtractedEffects<'a>
impl<'a> RefUnwindSafe for ExtractedEffects<'a>
impl<'a> Send for ExtractedEffects<'a>
impl<'a> Sync for ExtractedEffects<'a>
impl<'a> Unpin for ExtractedEffects<'a>
impl<'a> UnsafeUnpin for ExtractedEffects<'a>
impl<'a> UnwindSafe for ExtractedEffects<'a>
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> 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