euv-core 0.49.4

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Emitter configuration descriptor for spawning 3D bursts in `NiagaraSystem3D`.
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct NiagaraEmitterConfig3D {
    /// World-space emission origin in meters.
    #[get(type(copy))]
    pub(crate) origin: Vec3,
    /// Base initial velocity vector in meters/sec.
    #[get(type(copy))]
    pub(crate) base_velocity: Vec3,
    /// Random isotropic velocity spread magnitude in meters/sec.
    #[get(type(copy))]
    pub(crate) velocity_spread: f32,
    /// Minimum particle lifetime in seconds.
    #[get(type(copy))]
    pub(crate) min_lifetime: f32,
    /// Maximum particle lifetime in seconds.
    #[get(type(copy))]
    pub(crate) max_lifetime: f32,
    /// Initial world-space billboard radius in meters.
    #[get(type(copy))]
    pub(crate) start_size_m: f32,
    /// Terminal world-space billboard radius in meters.
    #[get(type(copy))]
    pub(crate) end_size_m: f32,
    /// Starting sRGB color and opacity.
    #[get(type(copy))]
    pub(crate) start_color: Color,
    /// Terminal sRGB color and opacity.
    #[get(type(copy))]
    pub(crate) end_color: Color,
    /// Linear aerodynamic drag coefficient per second.
    #[get(type(copy))]
    pub(crate) drag: f32,
    /// Curl-noise 3D turbulence acceleration amplitude in m/s^2.
    #[get(type(copy))]
    pub(crate) turbulence: f32,
    /// Ground-plane bounce restitution factor in `[0.0, 0.95]`.
    #[get(type(copy))]
    pub(crate) restitution: f32,
    /// Additive HDR emissive boost multiplier for neon sparks and exhaust flames.
    #[get(type(copy))]
    pub(crate) emissive_boost: f32,
}

/// UE5 Niagara-class zero-allocation Structure-of-Arrays 3D SIMD particle system with curl-noise turbulence, floor bounce, and depth-tested billboard rendering.
#[derive(Clone, Data, Debug)]
pub struct NiagaraSystem3D {
    /// Maximum concurrent 3D particles stored in pre-allocated SoA lanes.
    #[get(type(copy))]
    pub(crate) capacity: usize,
    /// Number of currently live particles packed contiguously in `0..active_count`.
    #[get(type(copy))]
    pub(crate) active_count: usize,
    /// Global gravity vector in `m/s^2` (default `(0, -9.81, 0)`).
    #[get(type(copy))]
    pub(crate) gravity: Vec3,
    /// Elapsed simulation time in seconds driving continuous 3D curl-noise phase.
    #[get(type(copy))]
    pub(crate) sim_time_secs: f32,
    /// Ring cursor used when recycling oldest slots at full capacity.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) ring_cursor: usize,
    /// Deterministic PRNG state word.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) rng_state: u64,
    /// Particle world X coordinates.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) pos_x: Vec<f32>,
    /// Particle world Y coordinates.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) pos_y: Vec<f32>,
    /// Particle world Z coordinates.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) pos_z: Vec<f32>,
    /// Particle velocity X components.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) vel_x: Vec<f32>,
    /// Particle velocity Y components.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) vel_y: Vec<f32>,
    /// Particle velocity Z components.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) vel_z: Vec<f32>,
    /// Elapsed particle age in seconds.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) age: Vec<f32>,
    /// Total particle lifetime in seconds.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) lifetime: Vec<f32>,
    /// Initial billboard radius in meters.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) start_size: Vec<f32>,
    /// Terminal billboard radius in meters.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) end_size: Vec<f32>,
    /// Aerodynamic drag per particle.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) drag: Vec<f32>,
    /// Turbulence amplitude per particle.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) turbulence: Vec<f32>,
    /// Bounce restitution per particle.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) restitution: Vec<f32>,
    /// Additive emissive boost per particle.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) emissive_boost: Vec<f32>,
    /// Starting particle color.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) start_color: Vec<Color>,
    /// Terminal particle color.
    #[get(skip)]
    #[get_mut(skip)]
    #[set(skip)]
    pub(crate) end_color: Vec<Color>,
}