Skip to main content

Transition

Struct Transition 

Source
pub struct Transition {
Show 25 fields pub transition_type: TransitionType, pub corner: TransitionCorner, pub cell: f32, pub seed: u32, pub order: PixelDissolveOrder, pub direction: TransitionDirection, pub aberration: f32, pub strength: f32, pub origin: Option<ZoomBlurOrigin>, pub shape: IrisShape, pub aspect: f32, pub fill: Option<String>, pub hold: f32, pub ring: Option<IrisRing>, pub reverse: bool, pub silhouette: Option<MaskShape>, pub from_scale: f32, pub to_scale: f32, pub lobes: u32, pub wobble: f32, pub feather: f32, pub band_color: Option<String>, pub duration: f64, pub easing: EasingType, pub background: PanBackground,
}

Fields§

§transition_type: TransitionType§corner: TransitionCorner

Which corner a corner_reveal grows from. Ignored by every other type.

§cell: f32

Cell edge in px for pixel_dissolve. Ignored by every other type.

§seed: u32

pixel_dissolve and blob only: pixel_dissolve’s stable scatter selector, or the stable lobe-wobble selector blob grows its silhouette from. Two transitions with the same seed (and, for blob, the same lobes/wobble) reproduce the same shape.

§order: PixelDissolveOrder

pixel_dissolve only: which cells turn first.

§direction: TransitionDirection

Which way a chromatic_wipe or whip travels. Ignored by every other type — the wipe_*/slide family encodes its direction in the type name.

§aberration: f32

chromatic_wipe only: how far the red and cyan channels split at the peak of the wipe, as a multiple of the tuned default. 0 removes the colour flash and leaves a plain fast slide; 2 doubles it.

§strength: f32

zoom_blur and whip only: how far the streak reaches — radially from origin for zoom_blur, along direction for whip. 0 collapses the streak pass entirely, leaving a plain zoom or a plain slide with no smear. Ignored by every other transition type.

§origin: Option<ZoomBlurOrigin>

zoom_blur, iris, mask and blob only: for zoom_blur, the centre the streaks radiate from; for the other three, the mask’s centre — in mask’s case, the point its silhouette’s own bounding-box centre grows from. Ignored by every other transition type. Frame pixels, like zoom_blur’s, not a 0..1 fraction.

§shape: IrisShape

iris only: the mask’s silhouette. Ignored by every other type.

§aspect: f32

iris pill only: width-to-height ratio of the stadium as it grows. Ignored by circle and by every other transition type.

§fill: Option<String>

iris only: a flat colour the mask fills with instead of revealing the next scene directly. Once the colour covers the whole frame, the next scene fades in under it. Absent reveals the next scene straight away. Ignored by every other transition type.

§hold: f32

iris only, and only meaningful with fill set: seconds the solid colour holds once it covers the whole frame, before the next scene fades in. Has no effect without fill.

§ring: Option<IrisRing>

iris only: a coloured ring traced along the mask’s moving edge. Ignored by every other transition type.

§reverse: bool

iris only: the mask closes onto origin instead of opening from it — the outgoing scene shrinks to a point rather than the incoming one (or fill) growing to cover the frame. Ignored by every other transition type.

§silhouette: Option<MaskShape>

mask only: the arbitrary silhouette it scales up from origin — polygon or path, the same kind vocabulary as style.clip-path. Required for mask; ignored by every other type (blob grows its own procedural silhouette instead, from lobes/wobble/seed).

§from_scale: f32

mask only: silhouette’s scale factor at progress: 0, relative to its own bounding-box size. 0 is a true point; small positive values (the default) start it as a barely-visible speck rather than exactly nothing, which is fine since progress <= 0.0 always short-circuits to the untouched outgoing frame regardless of this value. Ignored by every other transition type.

§to_scale: f32

mask only: silhouette’s scale factor at progress: 1. Large enough to guarantee full-frame coverage is the author’s responsibility — unlike iris, an arbitrary silhouette’s covering radius cannot be solved for automatically. Ignored by every other transition type.

§lobes: u32

blob only: how many lobes its procedural organic silhouette grows. Ignored by every other transition type.

§wobble: f32

blob only: how far each lobe’s radius wanders from a perfect circle, as a fraction of it — 0 degenerates to a circle (a slow iris by another name), values approaching 1 pinch some lobes almost to the centre. Ignored by every other transition type.

§feather: f32

wipe_*, mask and blob only: width, in px, of the soft gradient edge instead of a hard cut. 0 (the default) is a hard edge — the wipe’s clip-rect boundary, or the mask/blob’s clip-path boundary, with no blur pass at all. Ignored by every other transition type.

§band_color: Option<String>

wipe_*, mask and blob only, and only visible when feather is greater than 0: a colour that tints the feathered edge itself, peaking exactly on the boundary and fading to nothing at both sides of the feather band — a coloured front that sweeps across ahead of the incoming scene. Absent leaves the feather a plain alpha blend. Ignored by every other transition type, and by these three when feather is 0 (a hard edge has no band to tint).

§duration: f64§easing: EasingType§background: PanBackground

How the background behaves during a camera_pan. Ignored by every other transition type, which composite two finished frames and have no separate background layer to move.

Trait Implementations§

Source§

impl Clone for Transition

Source§

fn clone(&self) -> Self

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 Transition

Source§

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

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

impl<'de> Deserialize<'de> for Transition

Source§

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 From<&Transition> for TransitionOptions

Source§

fn from(t: &Transition) -> Self

Converts to this type from the input type.
Source§

impl JsonSchema for Transition

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for Transition

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.