pub struct Transition {
pub id: u64,
pub right: u64,
pub kind: TransitionKind,
pub duration: f64,
pub color: [u8; 4],
pub direction: u8,
pub ease: Ease,
pub edge: TransitionEdge,
}Expand description
A transition on a cut or a clip edge. For Cut it is centred on the cut between right and its
left neighbour, spanning [right.start - duration/2, right.start + duration/2); both clips are
extended virtually into that window (the engine clamps source times). For In / Out, right
is the single clip it belongs to and the window is its first/last duration seconds.
Audio tracks use CrossFade (a gain crossfade / fade).
Fields§
§id: u64§right: u64The clip on the right side of the cut (Cut), or the clip the edge transition belongs to.
kind: TransitionKind§duration: f64§color: [u8; 4]§direction: u80 = left, 1 = right, 2 = up, 3 = down (Push / Wipe).
ease: Ease§edge: TransitionEdgeImplementations§
Source§impl Transition
impl Transition
Sourcepub fn half(&self, left: &Clip, right: &Clip) -> f64
pub fn half(&self, left: &Clip, right: &Clip) -> f64
Half the transition length, clamped to the clips it joins: an over-long transition must not reach past either neighbour (it would hide the clips beside them).
Trait Implementations§
Source§impl Clone for Transition
impl Clone for Transition
Source§fn clone(&self) -> Transition
fn clone(&self) -> Transition
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Transition
impl Debug for Transition
Source§impl<'de> Deserialize<'de> for Transition
impl<'de> Deserialize<'de> for Transition
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Transition
impl PartialEq for Transition
Source§impl Serialize for Transition
impl Serialize for Transition
impl StructuralPartialEq for Transition
Auto Trait Implementations§
impl Freeze for Transition
impl RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnwindSafe for Transition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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