pub struct ColorCurve {
pub stops: Arc<[(f32, [f32; 4])]>,
pub easing: Easing,
}Expand description
Nonuniform premultiplied color keyframes, evaluated without accumulated state.
Fields§
§stops: Arc<[(f32, [f32; 4])]>Normalized times and finite premultiplied colors.
easing: EasingInterpolation easing.
Implementations§
Source§impl ColorCurve
impl ColorCurve
Trait Implementations§
Source§impl Clone for ColorCurve
impl Clone for ColorCurve
Source§impl ParticleModifier for ColorCurve
impl ParticleModifier for ColorCurve
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 !RefUnwindSafe for ColorCurve
impl !UnwindSafe for ColorCurve
impl Forget for ColorCurve
impl Freeze for ColorCurve
impl Send for ColorCurve
impl Sync for ColorCurve
impl Unpin for ColorCurve
impl UnsafeUnpin for ColorCurve
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