pub struct Particles {
pub start_positions: Vec<Vec3>,
pub start_velocities: Vec<Vec3>,
pub texture_transforms: Option<Vec<Mat3>>,
pub colors: Option<Vec<Srgba>>,
}
Expand description
Used for defining the attributes for each particle in a ParticleSystem, for example its starting position and velocity.
Each list of attributes must contain the same number of elements as the number of particles.
Fields§
§start_positions: Vec<Vec3>
Initial positions of each particle in world coordinates.
start_velocities: Vec<Vec3>
Initial velocities of each particle defined in the world coordinate system.
texture_transforms: Option<Vec<Mat3>>
The texture transform applied to the uv coordinates of each particle.
colors: Option<Vec<Srgba>>
A custom color for each particle.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Particles
impl RefUnwindSafe for Particles
impl Send for Particles
impl Sync for Particles
impl Unpin for Particles
impl UnwindSafe for Particles
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