Skip to main content

ParticleEmitter2

Struct ParticleEmitter2 

Source
pub struct ParticleEmitter2 { /* private fields */ }
Expand description

Particle emitter version 2 (sprite-based)

More advanced particle system that uses sprite textures. Supports various particle shapes, blending modes, and animation over the particle lifetime. Used for fire, smoke, magic effects, etc.

Implementations§

Source§

impl ParticleEmitter2

Source

pub fn new() -> Self

§Panics

Panics if the native allocation fails.

Source

pub fn node(&self) -> Ref<'_, Node>

Base node data Borrows the field in place — no copy, no allocation.

Source

pub fn node_mut(&mut self) -> RefMut<'_, Node>

Source

pub fn speed(&self) -> f32

Particle speed

Source

pub fn set_speed(&mut self, value: f32)

Source

pub fn variation(&self) -> f32

Speed variation (randomness)

Source

pub fn set_variation(&mut self, value: f32)

Source

pub fn latitude(&self) -> f32

Emission cone latitude

Source

pub fn set_latitude(&mut self, value: f32)

Source

pub fn gravity(&self) -> f32

Gravity acceleration

Source

pub fn set_gravity(&mut self, value: f32)

Source

pub fn lifespan(&self) -> f32

Particle lifetime in seconds

Source

pub fn set_lifespan(&mut self, value: f32)

Source

pub fn emission_rate(&self) -> f32

Particles per second

Source

pub fn set_emission_rate(&mut self, value: f32)

Source

pub fn length(&self) -> f32

Particle length (for tail effect)

Source

pub fn set_length(&mut self, value: f32)

Source

pub fn width(&self) -> f32

Particle width

Source

pub fn set_width(&mut self, value: f32)

Source

pub fn filter_mode(&self) -> u32

Blending mode

Source

pub fn set_filter_mode(&mut self, value: u32)

Source

pub fn rows(&self) -> u32

Texture atlas rows

Source

pub fn set_rows(&mut self, value: u32)

Source

pub fn columns(&self) -> u32

Texture atlas columns

Source

pub fn set_columns(&mut self, value: u32)

Source

pub fn head_or_tail(&self) -> u32

Head/tail flags

Source

pub fn set_head_or_tail(&mut self, value: u32)

Source

pub fn tail_length(&self) -> f32

Tail particle length

Source

pub fn set_tail_length(&mut self, value: f32)

Source

pub fn time(&self) -> f32

Middle time for segment animation

Source

pub fn set_time(&mut self, value: f32)

Source

pub fn segment_color_len() -> usize

Color at start/middle/end

Source

pub fn segment_color(&self, index: usize) -> Vector3f

Source

pub fn segment_alpha_len() -> usize

Alpha at start/middle/end

Source

pub fn segment_alpha(&self, index: usize) -> u8

Source

pub fn set_segment_alpha(&mut self, index: usize, value: u8)

Source

pub fn segment_scaling_len() -> usize

Scale at start/middle/end

Source

pub fn segment_scaling(&self, index: usize) -> f32

Source

pub fn set_segment_scaling(&mut self, index: usize, value: f32)

Source

pub fn head_interval_len() -> usize

Head lifetime intervals

Source

pub fn head_interval(&self, index: usize) -> u32

Source

pub fn set_head_interval(&mut self, index: usize, value: u32)

Source

pub fn head_decay_interval_len() -> usize

Head decay intervals

Source

pub fn head_decay_interval(&self, index: usize) -> u32

Source

pub fn set_head_decay_interval(&mut self, index: usize, value: u32)

Source

pub fn tail_interval_len() -> usize

Tail lifetime intervals

Source

pub fn tail_interval(&self, index: usize) -> u32

Source

pub fn set_tail_interval(&mut self, index: usize, value: u32)

Source

pub fn tail_decay_interval_len() -> usize

Tail decay intervals

Source

pub fn tail_decay_interval(&self, index: usize) -> u32

Source

pub fn set_tail_decay_interval(&mut self, index: usize, value: u32)

Source

pub fn texture_id(&self) -> u32

Texture index

Source

pub fn set_texture_id(&mut self, value: u32)

Source

pub fn squirt(&self) -> u32

Squirt flag (burst mode)

Source

pub fn set_squirt(&mut self, value: u32)

Source

pub fn priority_plane(&self) -> i32

Rendering priority; signed

Source

pub fn set_priority_plane(&mut self, value: i32)

Source

pub fn replaceable_id(&self) -> u32

Replaceable texture ID

Source

pub fn set_replaceable_id(&mut self, value: u32)

Source

pub fn speed_tracks(&self) -> Ref<'_, TrackF32>

Speed animation Borrows the field in place — no copy, no allocation.

Source

pub fn speed_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn variation_tracks(&self) -> Ref<'_, TrackF32>

Variation animation Borrows the field in place — no copy, no allocation.

Source

pub fn variation_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn latitude_tracks(&self) -> Ref<'_, TrackF32>

Latitude animation Borrows the field in place — no copy, no allocation.

Source

pub fn latitude_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn gravity_tracks(&self) -> Ref<'_, TrackF32>

Gravity animation Borrows the field in place — no copy, no allocation.

Source

pub fn gravity_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn emission_rate_tracks(&self) -> Ref<'_, TrackF32>

Emission rate animation Borrows the field in place — no copy, no allocation.

Source

pub fn emission_rate_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn length_tracks(&self) -> Ref<'_, TrackF32>

Length animation Borrows the field in place — no copy, no allocation.

Source

pub fn length_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn width_tracks(&self) -> Ref<'_, TrackF32>

Width animation Borrows the field in place — no copy, no allocation.

Source

pub fn width_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Source

pub fn visibility_tracks(&self) -> Ref<'_, TrackF32>

Visibility animation Borrows the field in place — no copy, no allocation.

Source

pub fn visibility_tracks_mut(&mut self) -> RefMut<'_, TrackF32>

Trait Implementations§

Source§

impl Debug for ParticleEmitter2

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ParticleEmitter2

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for ParticleEmitter2

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Send for ParticleEmitter2

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.