Skip to main content

Anim

Struct Anim 

Source
pub struct Anim {
Show 17 fields pub shape: usize, pub effect: String, pub start: f64, pub duration: f64, pub repeat: i64, pub yoyo: bool, pub ease: Option<String>, pub path: Option<usize>, pub color: Option<String>, pub out: bool, pub from: Option<String>, pub morph: Option<usize>, pub type_word: bool, pub scramble_chars: Option<String>, pub wiggles: Option<i64>, pub draw_from: Option<f64>, pub draw_to: Option<f64>,
}
Expand description

A resolved animation entry. shape indexes into Drawing::shapes; the SVG backend gives that shape the id s{shape} so the player can target it.

Fields§

§shape: usize§effect: String§start: f64

Absolute start time in seconds.

§duration: f64§repeat: i64

GSAP repeat: -1 loops forever, 0 plays once.

§yoyo: bool

GSAP yoyo: alternate direction each repeat.

§ease: Option<String>

GSAP easing name overriding the per-effect default, if given.

§path: Option<usize>

For the move effect: index of the shape whose geometry to follow. The SVG backend gives it the id s{path}, the MotionPath target.

§color: Option<String>

For the highlight effect: the CSS target colour (to <colour>).

§out: bool

Play as an exit (reverse) rather than an entrance.

§from: Option<String>

For the slide effect: the direction it enters from ("left"/"right"/"up"/"down").

§morph: Option<usize>

For the morph effect: index of the shape whose geometry to morph into. The SVG backend gives it the id s{morph}, the MorphSVG target.

§type_word: bool

For the type effect: split the label by whole words (by word) rather than by character. The SVG backend wraps each unit in a .rpic-ch tspan the player staggers.

§scramble_chars: Option<String>

For the scramble effect: a custom scramble charset (by "01"); None uses the plugin’s upperCase. Present in the manifest only when set.

§wiggles: Option<i64>

For the wiggle effect: the oscillation count (wiggles <n>); None lets the player default it. Present in the manifest only when set.

§draw_from: Option<f64>

For the draw effect: reveal only the [from,to] sub-segment of the stroke, as fractions in [0,1] (draw from 40% to 60%). Each rides the manifest only when set; absent means the segment’s natural endpoint.

§draw_to: Option<f64>

Trait Implementations§

Source§

impl Clone for Anim

Source§

fn clone(&self) -> Anim

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Anim

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Anim

Source§

fn eq(&self, other: &Anim) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Anim

Auto Trait Implementations§

§

impl Freeze for Anim

§

impl RefUnwindSafe for Anim

§

impl Send for Anim

§

impl Sync for Anim

§

impl Unpin for Anim

§

impl UnsafeUnpin for Anim

§

impl UnwindSafe for Anim

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.