BurningFlameShaderEffect
struct · ferroui-base · v0.5.0
struct BurningFlameShaderEffect
A flame that burns the content (Effector's BurningFlameShaderEffect,
the burn-away button): from the ignition point (ignition-x,
ignition-y, normalized, clamped to 0..1) a plume rises to flame-height
of the area (clamped to 0.18..0.95), its waves moved by flame-phase
(radians, a period of 10 pi), as strong as burn-amount (0 to 1) plus a
little while pressed; the content under it is moved by up to distortion
device independent pixels (clamped to 0..18), coloured from ember-color
to core-color where it is hot, lit by glow-strength (0..1) and darkened
by smoke (smoke-strength, 0..0.8). The moved content is sampled clamped
to the area and composed over the content masked by it, so the top edge
keeps its content and nothing burns beyond the coverage of the content.
burning-flame(burn-amount=0.8, flame-phase=1.2, ignition-x=0.5, ignition-y=0.68). A content-sampling shader effect with a sample radius
of 21; without burning and not pressed (the default and the neutral
value) the content is unchanged. InteractiveBurningFlameEffect ignites
it where the pointer is pressed and lets it burn down after the release.
Members
ignition_xignition_yburn_amountflame_phaseis_pressedflame_heightdistortionglow_strengthsmoke_strengthcore_colorember_colorSAMPLE_RADIUSPHASE_PERIOD
ignition_x
ignition_x: f64
The horizontal position of the ignition, 0 (left) to 1 (right) (default 0.5).
ignition_y
ignition_y: f64
The vertical position of the ignition, 0 (top) to 1 (bottom) (default 0.68).
burn_amount
burn_amount: f64
How strongly it burns, 0 to 1 (default 0).
flame_phase
flame_phase: f64
The phase of the waves of the flame, in radians (default 0).
is_pressed
is_pressed: bool
Whether the pointer is pressed (default false).
flame_height
flame_height: f64
How far up the flame reaches, a fraction of the height (default 0.72).
distortion
distortion: f64
How far the flame moves the content, in device independent pixels (default 8).
glow_strength
glow_strength: f64
How brightly the flame lights the content, 0 to 1 (default 0.58).
smoke_strength
smoke_strength: f64
How much smoke darkens the content, 0 to 0.8 (default 0.24).
core_color
core_color: crate::media::Color
The colour of the hot core (default #FFD36B).
ember_color
ember_color: crate::media::Color
The colour of the embers (default #FF5B1F).
SAMPLE_RADIUS
const SAMPLE_RADIUS: f64
How far the program moves the content at most, in device independent pixels: the length of the largest move sideways (the largest distortion, 18) and up (7.5 times 1.25), rounded up (#580).
PHASE_PERIOD
const PHASE_PERIOD: f64
The period of the phase: 10 pi, a whole number of periods of each wave of the flame (5.8, 7.4 and 9.6 are 29, 37 and 48 fifths).
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.