pub struct ShimmerConfig {
pub delay: f64,
pub duration: f64,
pub color: String,
pub width: f32,
pub intensity: f32,
pub angle: f32,
pub repeat: bool,
}Expand description
A band of light sweeping across the element, restricted to the pixels the element actually painted.
That restriction is the whole point: painted over the element’s box, a
sheen reads as a rectangle sliding past. Painted over the element’s own
alpha, it reads as light catching the glyphs (or the icon, or the chart
bars) themselves. See engine::paint_pass, which composites it with
BlendMode::SrcATop inside the node’s own layer.
Fields§
§delay: f64Delay before the sweep starts (seconds).
duration: f64How long one sweep takes (seconds).
color: StringColour of the band (hex).
width: f32Band width as a fraction of the distance it sweeps (0.35 = a band covering roughly a third of the element at any instant). Wider reads as a soft wash, narrower as a hard glint.
intensity: f32Peak opacity of the band (0..1).
angle: f32Lean of the band in degrees. 0 is an upright band sweeping
left-to-right; the default 20 tilts it, which is what makes it read
as a reflection rather than a wipe. The band always travels
perpendicular to itself, so this angles the travel too.
repeat: boolRepeat the sweep for the rest of the scene.
Trait Implementations§
Source§impl Clone for ShimmerConfig
impl Clone for ShimmerConfig
Source§fn clone(&self) -> ShimmerConfig
fn clone(&self) -> ShimmerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShimmerConfig
impl Debug for ShimmerConfig
Source§impl<'de> Deserialize<'de> for ShimmerConfig
impl<'de> Deserialize<'de> for ShimmerConfig
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 ShimmerConfig
impl JsonSchema for ShimmerConfig
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 ShimmerConfig
impl PartialEq for ShimmerConfig
Source§impl Serialize for ShimmerConfig
impl Serialize for ShimmerConfig
impl StructuralPartialEq for ShimmerConfig
Auto Trait Implementations§
impl Freeze for ShimmerConfig
impl RefUnwindSafe for ShimmerConfig
impl Send for ShimmerConfig
impl Sync for ShimmerConfig
impl Unpin for ShimmerConfig
impl UnsafeUnpin for ShimmerConfig
impl UnwindSafe for ShimmerConfig
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