pub struct Particle {Show 16 fields
pub position: Vec2,
pub velocity: Vec2,
pub acceleration: Vec2,
pub color: Color,
pub color_start: Color,
pub color_end: Color,
pub size: f32,
pub size_start: f32,
pub size_end: f32,
pub rotation: f32,
pub rotation_speed: f32,
pub age: f32,
pub lifetime: f32,
pub alive: bool,
pub alpha_easing: Easing,
pub size_easing: Easing,
}Expand description
A single particle with all its properties.
Fields§
§position: Vec2Current position.
velocity: Vec2Current velocity.
acceleration: Vec2Acceleration applied each frame.
color: ColorCurrent color.
color_start: ColorStart color (for interpolation).
color_end: ColorEnd color (for interpolation).
size: f32Current size.
size_start: f32Start size.
size_end: f32End size.
rotation: f32Current rotation (radians).
rotation_speed: f32Rotation speed (radians/sec).
age: f32Time lived so far (seconds).
lifetime: f32Maximum lifetime (seconds).
alive: boolWhether this particle is alive.
alpha_easing: EasingAlpha easing.
size_easing: EasingSize easing.
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