diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2026-08-20 23:20:21 -0700 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2026-08-20 23:20:21 -0700 |
| commit | 533da47f2cc03a8b60a7c6c0bb5a938a7e523a03 (patch) | |
| tree | e4709c9d56954c0a9b2bd3e21f64c036490ed070 /src/sim/particle_sim/particle.rs | |
| parent | 29575e8592f5d6d566abb0ce9beaf794fb98a4e4 (diff) | |
particles
Diffstat (limited to 'src/sim/particle_sim/particle.rs')
| -rw-r--r-- | src/sim/particle_sim/particle.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/sim/particle_sim/particle.rs b/src/sim/particle_sim/particle.rs new file mode 100644 index 0000000..cc7dd28 --- /dev/null +++ b/src/sim/particle_sim/particle.rs @@ -0,0 +1,21 @@ +use glam::Vec2; + +use crate::sim::cell::materials::MaterialId; + +pub struct Particle { + pub position: Vec2, + pub velocity: Vec2, + pub material: MaterialId, + pub life: f32, +} + +impl Particle { + pub fn new(position: Vec2, velocity: Vec2, material: MaterialId, life: f32) -> Self { + Particle { + position, + velocity, + material, + life, + } + } +} |
