pub struct Temperature {
pub curve: ParticleCurve,
}Expand description
Deterministic blackbody approximation, 1000..=40000 Kelvin, decoded to linear RGB. As a modifier it replaces the particle’s RGB with the premultiplied blackbody color, discarding any earlier hue; alpha is unchanged.
Fields§
§curve: ParticleCurveKelvin over normalized lifetime.
Implementations§
Source§impl Temperature
impl Temperature
Sourcepub fn new(curve: ParticleCurve) -> Self
pub fn new(curve: ParticleCurve) -> Self
Creates a color-temperature curve.
Trait Implementations§
Source§impl Clone for Temperature
impl Clone for Temperature
Source§impl ParticleModifier for Temperature
impl ParticleModifier for Temperature
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 Temperature
impl !UnwindSafe for Temperature
impl Forget for Temperature
impl Freeze for Temperature
impl Move for Temperature
impl Send for Temperature
impl Sync for Temperature
impl Unpin for Temperature
impl UnsafeUnpin for Temperature
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