#[repr(C)]pub struct Particle {
pub position: [f32; 2],
pub velocity: [f32; 2],
pub color: [f32; 4],
pub size: f32,
pub rotation: f32,
pub age: f32,
pub lifetime: f32,
pub index: u64,
pub custom: [f32; 4],
}Expand description
72-byte particle record; colors are finite linear-premultiplied RGBA.
Fields§
§position: [f32; 2]Local center in design coordinates.
velocity: [f32; 2]Units per second.
color: [f32; 4]Linear-premultiplied RGBA, not encoded bytes.
size: f32Nonnegative style size multiplier.
rotation: f32Clockwise radians.
age: f32Canonical seconds since birth, owned by the simulation.
lifetime: f32Positive lifetime seconds, half-open at death.
index: u64Stable nonrecycled emission index.
custom: [f32; 4]User-owned values retained by snapshots.
Trait Implementations§
impl Copy for Particle
impl StructuralPartialEq for Particle
Auto Trait Implementations§
impl Forget for Particle
impl Freeze for Particle
impl Move 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