Skip to main content

EffectPreset

Trait EffectPreset 

Source
pub trait EffectPreset {
    // Required methods
    fn name(&self) -> &'static str;
    fn build_emitters(&self) -> Vec<EmitterConfig>;
    fn duration(&self) -> Option<f32>;
}
Expand description

Common interface for all VFX presets.

Required Methods§

Source

fn name(&self) -> &'static str

Human-readable name.

Source

fn build_emitters(&self) -> Vec<EmitterConfig>

Build all emitter configs needed for this effect.

Source

fn duration(&self) -> Option<f32>

Suggested total duration in seconds; None = infinite/looping.

Implementors§