bevy_feronia 0.8.2

Foliage/grass scattering tools and wind simulation shaders/materials that prioritize visual fidelity/artistic freedom, a declarative api and modularity.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::prelude::*;
use bevy_ecs::prelude::*;

#[cfg(feature = "trace")]
use tracing::debug;

pub fn scatter_layer<T>(trigger: On<Scatter<T>>, mut cmd: Commands)
where
    T: ScatterMaterial,
{
    let layer_entity = trigger.entity;

    #[cfg(feature = "trace")]
    debug!("Scattering Layer: {layer_entity}");

    cmd.entity(layer_entity)
        .insert(ScatterRequest::<T>::new(layer_entity, layer_entity, None));
}