pub struct ParticleBurst { /* private fields */ }Expand description
A tiny particle burst — circles fired outward from a point that fall under
gravity and fade out. Deterministic given the same seed, so a test can pin
it. Advance with ParticleBurst::update, render with
ParticleBurst::paint.
Implementations§
Source§impl ParticleBurst
impl ParticleBurst
Sourcepub fn new(origin: Pos2, count: usize, color: Color32, seed: u64) -> Self
pub fn new(origin: Pos2, count: usize, color: Color32, seed: u64) -> Self
Fire count particles from origin outward in a ring, with speeds
jittered by seed (deterministic — no RNG crate).
Sourcepub fn update(&mut self, dt: f32)
pub fn update(&mut self, dt: f32)
Advance every particle by dt seconds (integrate velocity + gravity).
Trait Implementations§
Source§impl Clone for ParticleBurst
impl Clone for ParticleBurst
Source§fn clone(&self) -> ParticleBurst
fn clone(&self) -> ParticleBurst
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParticleBurst
impl RefUnwindSafe for ParticleBurst
impl Send for ParticleBurst
impl Sync for ParticleBurst
impl Unpin for ParticleBurst
impl UnsafeUnpin for ParticleBurst
impl UnwindSafe for ParticleBurst
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