InteractiveBurningFlameEffect
struct · ferroui-base · v0.5.0
struct InteractiveBurningFlameEffect
The burning flame as an interactive effect class (Effector's
BurningFlameShaderEffect, the burn-away button): a press ignites the
flame where it is (the height clamped to 0.18..0.92 of the host) at full
strength, a drag while pressed moves the ignition, and after the release
the flame burns down over 2.6 seconds; the phase of its waves and its
strength advance on the frames of the animation clock
(advance). It takes handled events: the host of the
burn-away button is a button, whose own handler handles the press. Its
value is a BurningFlameShaderEffect.
Members
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<InteractiveBurningFlameEffect>
Returns a strong reference to this object.
new
fn new() -> Ref<Self>
A new effect with the default value.
with_value
fn with_value(value: BurningFlameShaderEffect) -> Ref<Self>
A new effect with value.
value
fn value(self: &Self) -> BurningFlameShaderEffect
The current value of the effect: what its next snapshot is.
set_value
fn set_value(self: &Self, value: BurningFlameShaderEffect)
Replaces the value of the effect; a different value invalidates the effect.
update
fn update(self: &Self, f: impl FnOnce(&mut BurningFlameShaderEffect) -> ())
Changes the value of the effect with f; a change invalidates
the effect, so its host takes a new snapshot. No borrow is
held while the effect raises invalidated.
advance
fn advance(self: &Self, seconds: f64) -> bool
Advances the flame by seconds (what each frame of the animation
clock does): its phase, and its strength up while pressed and down
after; whether it still burns.
is_animating
fn is_animating(self: &Self) -> bool
Whether the frames of the animation clock run.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeFerroObjectImplExtClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyErasedDestructorIntoEitherDerefUpcast<T>Upcast<InteractiveBurningFlameEffect>StaticTypeObjectTypeSubclassable<T>FerroObjectImplCustomEffectClassIEffectInputHandler
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.