pub(crate) struct ActiveAnimation {
element_id: String,
spec: AnimationSpec,
keyframes: Keyframes,
start_ms: f32,
done: bool,
paused_elapsed_ms: Option<f32>,
started: bool,
}Expand description
1要素のアニメーション(@keyframes)進行状態。
Fields§
§element_id: String§spec: AnimationSpec§keyframes: Keyframes§start_ms: f32§done: bool完了済みか(fill が none のとき値を出さなくなる)。
paused_elapsed_ms: Option<f32>play_state:paused の間だけ Some(経過ms) を保持し、その値で経過時間を凍結する
(start_ms はそのままにしておき、再開時に「凍結していた経過時間ぶんだけ現在時刻から
巻き戻す」形で start_ms を前進させ、一時停止した分だけシームレスに再開する)。
started: boolanimation-delayが経過し実際に最初のキーフレームの適用が始まったか
(animationstartイベントを1回だけ発火するためのガード)。
Trait Implementations§
Source§impl Clone for ActiveAnimation
impl Clone for ActiveAnimation
Source§fn clone(&self) -> ActiveAnimation
fn clone(&self) -> ActiveAnimation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ActiveAnimation
impl RefUnwindSafe for ActiveAnimation
impl Send for ActiveAnimation
impl Sync for ActiveAnimation
impl Unpin for ActiveAnimation
impl UnsafeUnpin for ActiveAnimation
impl UnwindSafe for ActiveAnimation
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
Mutably borrows from an owned value. Read more