pub struct AnimatedLight {
pub base_color: Color,
pub base_intensity: f32,
pub position: Vec3,
pub radius: f32,
pub pattern: AnimationPattern,
pub enabled: bool,
pub time_offset: f32,
pub elapsed: f32,
pub speed: f32,
pub looping: bool,
}Expand description
A wrapper around any light type that applies an animation pattern.
Fields§
§base_color: Color§base_intensity: f32§position: Vec3§radius: f32§pattern: AnimationPattern§enabled: bool§time_offset: f32§elapsed: f32§speed: f32The speed multiplier for animation playback.
looping: boolWhether to loop or stop at end.
Implementations§
Source§impl AnimatedLight
impl AnimatedLight
pub fn new(position: Vec3, color: Color, pattern: AnimationPattern) -> Self
Sourcepub fn current_intensity(&self) -> f32
pub fn current_intensity(&self) -> f32
Get the current effective intensity.
Sourcepub fn current_color(&self) -> Color
pub fn current_color(&self) -> Color
Get the current effective color.
Sourcepub fn irradiance_at(&self, point: Vec3) -> Color
pub fn irradiance_at(&self, point: Vec3) -> Color
Compute irradiance at a point.
Trait Implementations§
Source§impl Clone for AnimatedLight
impl Clone for AnimatedLight
Source§fn clone(&self) -> AnimatedLight
fn clone(&self) -> AnimatedLight
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnimatedLight
impl Debug for AnimatedLight
Auto Trait Implementations§
impl Freeze for AnimatedLight
impl RefUnwindSafe for AnimatedLight
impl Send for AnimatedLight
impl Sync for AnimatedLight
impl Unpin for AnimatedLight
impl UnsafeUnpin for AnimatedLight
impl UnwindSafe for AnimatedLight
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