pub struct ShadowParams {
pub base: f32,
pub grow: f32,
pub alpha: f32,
pub fade: f32,
pub soft: f32,
}Expand description
Tunable mapping for cast_shadow: how a blob/contact shadow’s size and
opacity change with the caster’s height above the surface. Defaults give the
natural look — small/dark/sharp when the caster touches down, growing larger,
fainter and softer as it rises. Pass a negative fade to invert the opacity
ramp (fainter when close, more opaque when far).
Fields§
§base: f32Radius (px) when the caster sits on the surface (height 0).
grow: f32Extra radius per unit of height — the shadow grows as the caster rises.
alpha: f32Opacity at height 0 (0..1) — darkest/sharpest when touching the surface.
fade: f32Opacity lost per unit of height — the shadow fades as the caster rises.
soft: f32Edge softness 0..1 at height 0 — feathering also widens with height.
Trait Implementations§
Source§impl Clone for ShadowParams
impl Clone for ShadowParams
Source§fn clone(&self) -> ShadowParams
fn clone(&self) -> ShadowParams
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 moreimpl Copy for ShadowParams
Auto Trait Implementations§
impl Freeze for ShadowParams
impl RefUnwindSafe for ShadowParams
impl Send for ShadowParams
impl Sync for ShadowParams
impl Unpin for ShadowParams
impl UnsafeUnpin for ShadowParams
impl UnwindSafe for ShadowParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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