pub struct Particle {
pub source: Entity,
pub age: f32,
pub lifetime: f32,
pub velocity: [f32; 3],
pub size: f32,
pub color: [f32; 3],
}Expand description
Fields§
§source: EntityBack-reference to the emitter entity that produced this particle.
age: f32Time elapsed since spawn (seconds). Aged each tick by the system.
lifetime: f32Total lifetime (seconds). When age >= lifetime, the particle is
despawned.
velocity: [f32; 3]Initial linear velocity (units/second). Consumed by the renderer or downstream movement systems.
size: f32Particle size (renderer-specific units).
color: [f32; 3]Particle color (linear RGB [0, 1]).
Trait Implementations§
impl Component for Particle
impl Copy for Particle
impl StructuralPartialEq for Particle
Auto Trait Implementations§
impl Freeze for Particle
impl RefUnwindSafe for Particle
impl Send for Particle
impl Sync for Particle
impl Unpin for Particle
impl UnsafeUnpin for Particle
impl UnwindSafe for Particle
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