Skip to main content

ExtractedEffects

Struct ExtractedEffects 

Source
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: bool

True 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.