pub struct ParticleEmitter {
pub position: [f32; 3],
pub emit_rate: f32,
pub emit_accumulator: f32,
pub initial_velocity: [f32; 3],
pub velocity_spread: f32,
pub lifetime_min: f32,
pub lifetime_max: f32,
pub mass: f32,
pub active: bool,
}Expand description
Emits new particles into a ParticleBuffer over time.
Fields§
§position: [f32; 3]World-space spawn origin.
emit_rate: f32Target emission rate in particles per second.
emit_accumulator: f32Fractional particle accumulator (sub-frame carry).
initial_velocity: [f32; 3]Base initial velocity of emitted particles.
velocity_spread: f32Cone half-angle (radians) for random velocity spread.
lifetime_min: f32Minimum particle lifetime in seconds.
lifetime_max: f32Maximum particle lifetime in seconds.
mass: f32Mass assigned to emitted particles.
active: boolWhether this emitter is currently active.
Implementations§
Auto Trait Implementations§
impl Freeze for ParticleEmitter
impl RefUnwindSafe for ParticleEmitter
impl Send for ParticleEmitter
impl Sync for ParticleEmitter
impl Unpin for ParticleEmitter
impl UnsafeUnpin for ParticleEmitter
impl UnwindSafe for ParticleEmitter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more