pub struct ColorOverLifetime {
pub stops: Arc<[[f32; 4]]>,
}Expand description
Piecewise-linear linear-premultiplied RGBA over normalized lifetime.
Fields§
§stops: Arc<[[f32; 4]]>Evenly spaced color stops, one to 256.
Implementations§
Source§impl ColorOverLifetime
impl ColorOverLifetime
Sourcepub fn curve(self, easing: Easing) -> ColorCurve
pub fn curve(self, easing: Easing) -> ColorCurve
Converts equally spaced stops to an explicit time/easing curve.
Trait Implementations§
Source§impl Clone for ColorOverLifetime
impl Clone for ColorOverLifetime
Source§impl Debug for ColorOverLifetime
impl Debug for ColorOverLifetime
Source§impl ParticleModifier for ColorOverLifetime
impl ParticleModifier for ColorOverLifetime
Source§fn apply(
&self,
particle: &mut Particle,
_: f32,
_: Time,
_: &mut Random,
) -> Result<(), ValidationError>
fn apply( &self, particle: &mut Particle, _: f32, _: Time, _: &mut Random, ) -> Result<(), ValidationError>
Updates one live particle; index and canonical age remain engine-owned.
Source§fn resets_color(&self) -> bool
fn resets_color(&self) -> bool
Requests birth-color restoration before the ordered modifier chain.
Multiplicative lifetime energy curves use this to avoid frame-count accumulation.
Source§fn apply_event(
&self,
particle: &mut Particle,
step_seconds: f32,
time: Time,
random: &mut Random,
) -> Result<bool, ValidationError>
fn apply_event( &self, particle: &mut Particle, step_seconds: f32, time: Time, random: &mut Random, ) -> Result<bool, ValidationError>
Optional predicted-step collision response, preserving the original callback API.
Auto Trait Implementations§
impl Forget for ColorOverLifetime
impl Freeze for ColorOverLifetime
impl Move for ColorOverLifetime
impl RefUnwindSafe for ColorOverLifetime
impl Send for ColorOverLifetime
impl Sync for ColorOverLifetime
impl Unpin for ColorOverLifetime
impl UnsafeUnpin for ColorOverLifetime
impl UnwindSafe for ColorOverLifetime
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