Struct macroquad_particles::EmitterConfig [−][src]
Fields
local_coords: bool
If false - particles spawns at position supplied to .draw(), but afterwards lives in current camera coordinate system. If false particles use coordinate system originated to the emitter draw position
emission_shape: EmissionShape
Particles will be emitted inside that region.
one_shot: bool
If true only one emission cycle occurs. May be re-emitted by .emit() call.
lifetime: f32
Lifespan of individual particle.
lifetime_randomness: f32
Particle lifetime randomness ratio. Each particle will spawned with “lifetime = lifetime - lifetime * rand::gen_range(0.0, lifetime_randomness)”.
explosiveness: f32
0..1 value, how rapidly particles in emission cycle are emitted. With 0 particles will be emitted with equal gap. With 1 all the particles will be emitted at the beginning of the cycle.
amount: u32
Amount of particles emitted in one emission cycle.
shape: ParticleShape
Shape of each individual particle mesh.
emitting: bool
Particles are emitting when “emitting” is true. If its a “one-shot” emitter, emitting will switch to false after active emission cycle.
initial_direction: Vec2
Unit vector specifying emission direction.
initial_direction_spread: f32
Angle from 0 to “2 * Pi” for random fluctuation for direction vector.
initial_velocity: f32
Initial speed for each emitted particle. Direction of the initial speed vector is affected by “direction” and “spread”
initial_velocity_randomness: f32
Initial velocity randomness ratio. Each particle will spawned with “initial_velocity = initial_velocity - initial_velocity * rand::gen_range(0.0, initial_velocity_randomness)”.
linear_accel: f32
Velocity acceleration applied to each particle in the direction of motion.
size: f32
Each particle is a “size x size” square.
size_randomness: f32
Each particle will spawned with “size = size - size * rand::gen_range(0.0, size_randomness)”.
size_curve: Option<Curve>
If curve is present in each moment of particle lifetime size would be multiplied by the value from the curve
blend_mode: BlendMode
Particles rendering mode.
colors_curve: ColorCurve
How particles should change base color along the lifetime.
gravity: Vec2
Gravity applied to each individual particle.
texture: Option<Texture2D>
Particle texture. If none particles going to be white squares.
atlas: Option<AtlasConfig>
For animated texture specify spritesheet layout. If none the whole texture will be used.
material: Option<ParticleMaterial>
Custom material used to shade each particle.
post_processing: Option<PostProcessing>
If none particles will be rendered directly to the screen. If not none all the particles will be rendered to a rectangle and than this rectangle will be rendered to the screen. This will allows some effects affecting particles as a whole. NOTE: this is not really implemented and now Some will just make hardcoded downscaling
Trait Implementations
impl Clone for EmitterConfig
[src]
fn clone(&self) -> EmitterConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for EmitterConfig
[src]
impl Default for EmitterConfig
[src]
fn default() -> EmitterConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for EmitterConfig
impl Send for EmitterConfig
impl Sync for EmitterConfig
impl Unpin for EmitterConfig
impl UnwindSafe for EmitterConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,