pub struct Particle {
pub frac_x: f32,
pub frac_y: f32,
pub life: u32,
pub text: String,
pub kind: ParticleKind,
pub drift_x: f32,
}Expand description
Position is stored as a fraction of the biscuit rect ([0.0, 1.0] on each
axis), matching Powerup. The renderer resolves these fractions
against the current biscuit rect every frame, so particles travel with
the biscuit when the terminal resizes or the user zooms.
Fields§
§frac_x: f32§frac_y: f32§life: u32§text: String§kind: ParticleKind§drift_x: f32Per-tick horizontal drift in fraction-of-biscuit units. Set at spawn
from a small uniform so co-spawned particles separate as they rise
instead of stacking into garbage like ++1++++1.
Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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