PointerSpotlightShaderEffect
struct · ferroui-base · v0.5.0
struct PointerSpotlightShaderEffect
A light under the pointer, screened over the content (Effector's
PointerSpotlightShaderEffect): around (pointer-x, pointer-y) (the
normalized pointer, clamped to 0..1), fading with the square of the
distance to nothing at radius (a fraction of the area, clamped to
0.05..0.65), at the opacity strength while the pointer is over the host
or pressed, plus press-boost while pressed (each clamped to 0..1, the sum
to 1), times the colour.
pointer-spotlight(pointer-x=0.5, pointer-y=0.5, is-pointer-over=true, radius=0.24, strength=0.28, color=#FFD26B). An overlay shader effect with
the blend mode Screen, masked by the content (no light over transparent
content); without the pointer over the host (the default), or with no
strength and no boost (the neutral value), the content is unchanged.
InteractivePointerSpotlightEffect follows the pointer.
Members
pointer_x
pointer_x: f64
The horizontal position of the pointer, 0 (left) to 1 (right) (default 0.5).
pointer_y
pointer_y: f64
The vertical position of the pointer, 0 (top) to 1 (bottom) (default 0.5).
is_pointer_over
is_pointer_over: bool
Whether the pointer is over the host (default false).
is_pressed
is_pressed: bool
Whether the pointer is pressed (default false).
radius
radius: f64
Where the light ends, a fraction of the area (default 0.24).
strength
strength: f64
The opacity of the light at its centre while the pointer is over the host, 0 to 1 (default 0.28).
press_boost
press_boost: f64
The opacity added while pressed, 0 to 1 (default 0.42).
color
color: crate::media::Color
The colour of the light (default #FFD26B).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneDebugStructuralPartialEqPartialEqDefaultCustomEffect
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.