pub(crate) fn process(
        &mut self,
        delta_time: Scalar,
        owner: &WidgetId,
        message_sender: &MessageSender,
    ) {
        if delta_time > 0.0 {
            if self.looped && self.time > self.duration {
                self.time = 0.0;
            }
            let old_time = self.time;
            self.time += delta_time;
            for phase in self.sheet.values_mut() {
                phase.cached_time = (self.time - phase.start).min(phase.duration).max(0.0);
                phase.cached_progress = if phase.duration > 0.0 {
                    phase.cached_time / phase.duration
                } else {
                    0.0
                };
            }
            for (time, message) in &self.messages {
                if *time >= old_time && *time < self.time {
                    message_sender.write(owner.to_owned(), AnimationMessage(message.to_owned()));
                }
            }
        }
    }
/// Processes the animations, updating the values of each animation baed on the progressed time
Processes the animations, updating the values of each animation baed on the progressed time
Processes the animations updating the values of each animation baed on the progressed time
pub(crate) fn process(
        &mut self,
        delta_time: Scalar,
        owner: &WidgetId,
        message_sender: &MessageSender,
    ) {
        if delta_time > 0.0 {
            if self.looped && self.time > self.duration {
                self.time = 0.0;
            }
            let old_time = self.time;
            self.time += delta_time;
            for phase in self.sheet.values_mut() {
                phase.cached_time = (self.time - phase.start).min(phase.duration).max(0.0);
                phase.cached_progress = if phase.duration > 0.0 {
                    phase.cached_time / phase.duration
                } else {
                    0.0
                };
            }
            for (time, message) in &self.messages {
                if *time >= old_time && *time < self.time {
                    message_sender.write(owner.to_owned(), AnimationMessage(message.to_owned()));
                }
            }
        }
    }
pub ( crate ) fn process ( & mut self , delta_time : Scalar , owner : & WidgetId , message_sender : & MessageSender , ) { if delta_time > 0.0 { if self . looped && self . time > self . duration { self . time = 0.0 ; } let old_time = self . time ; self . time += delta_time ; for phase in self . sheet . values_mut ( ) { phase . cached_time = ( self . time - phase . start ) . min ( phase . duration ) . max ( 0.0 ) ; phase . cached_progress = if phase . duration > 0.0 { phase . cached_time / phase . duration } else { 0.0 } ; } for ( time , message ) in & self . messages { if * time >= old_time && * time < self . time { message_sender . write ( owner . to_owned ( ) , AnimationMessage ( message . to_owned ( ) ) ) ; } } } }
Processes the animations, updating the values of each animation baed on the progressed time
Processes the animations updating the values of each animation baed on the progressed time
&mut self
delta_time
Scalar
owner
&WidgetId
message_sender
&MessageSender
&mut self
delta_time
Scalar
owner
&WidgetId
message_sender
&MessageSender