hanabi_effect_graph 0.1.0

Serializable authoring graph and runtime bake pipeline for bevy_hanabi effects
Documentation
//! The three modifier lists of a `bevy_hanabi` effect.

/// Which of the three modifier lists a modifier lives in.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
pub enum ModifierGroup {
    Init,
    Update,
    Render,
}

impl ModifierGroup {
    pub fn label(self) -> &'static str {
        match self {
            ModifierGroup::Init => "Init",
            ModifierGroup::Update => "Update",
            ModifierGroup::Render => "Render",
        }
    }

    /// Lowercase tag for this group (`init` / `update` / `render`).
    ///
    /// Used in hanabi's baked shader path
    /// (`hanabi/{asset}_{init|update|render}_{hash}.wgsl`) and as a stable key
    /// for per-group UI state.
    pub fn suffix(self) -> &'static str {
        match self {
            ModifierGroup::Init => "init",
            ModifierGroup::Update => "update",
            ModifierGroup::Render => "render",
        }
    }
}