pub struct BurstConfig {
pub delay: f64,
pub duration: f64,
pub count: u32,
pub length: f32,
pub gap: f32,
pub width: f32,
pub color: String,
pub seed: u32,
pub jitter: f32,
}Expand description
Configuration for the burst animation effect: a ring of short strokes
that shoot outward from just off the node’s own box edge and then retract,
the splash of ink a pill or a badge throws when it pops in.
Nothing about the node itself is touched — the strokes are painted over it,
outside its box, and take no layout space. Outside
[delay, delay + duration) the effect contributes nothing at all.
The stroke is drawn by a head and a tail that each cross the stroke’s track
once: the head runs out over the first half of the window, the tail follows
over the second. Both ends of the window therefore have a zero-length
stroke — the burst is invisible at delay and at delay + duration
without ever being a fade that merely gets small.
Fields§
§delay: f64Delay before the strokes start shooting out (seconds).
duration: f64Full out-and-back duration (seconds). The head reaches the far end of its track at the halfway point.
count: u32Number of strokes in the ring (default 8, clamped 1..=64).
length: f32Length of each stroke’s track, in px, measured outward from gap
(default 40).
gap: f32Distance in px between the node’s box edge and the near end of every stroke’s track (default 12). The box is never overdrawn.
width: f32Stroke width in px (default 4).
color: StringStroke colour (hex string, default “#FFB020”).
seed: u32Seed for the per-stroke angle, length and phase jitter.
jitter: f32How far each stroke may stray from its even share of the ring, as a
fraction of the spacing between two strokes (default 0.2). 0 gives a
perfectly regular ring; 1 lets a stroke reach its neighbour’s slot.
It also scales the per-stroke length and phase jitter.
Trait Implementations§
Source§impl Clone for BurstConfig
impl Clone for BurstConfig
Source§impl Debug for BurstConfig
impl Debug for BurstConfig
Source§impl<'de> Deserialize<'de> for BurstConfig
impl<'de> Deserialize<'de> for BurstConfig
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>,
Source§impl JsonSchema for BurstConfig
impl JsonSchema for BurstConfig
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for BurstConfig
impl PartialEq for BurstConfig
Source§impl Serialize for BurstConfig
impl Serialize for BurstConfig
impl StructuralPartialEq for BurstConfig
Auto Trait Implementations§
impl Freeze for BurstConfig
impl RefUnwindSafe for BurstConfig
impl Send for BurstConfig
impl Sync for BurstConfig
impl Unpin for BurstConfig
impl UnsafeUnpin for BurstConfig
impl UnwindSafe for BurstConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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