feat: Calculate animation curve by time points rather than passed frames

This commit is contained in:
DreamMaoMao
2025-11-04 11:31:04 +08:00
parent 70eb70ef0d
commit b39ab429f5
6 changed files with 76 additions and 84 deletions

View File

@@ -231,8 +231,7 @@ struct dwl_animation {
bool tagouting;
bool begin_fade_in;
bool tag_from_rule;
unsigned int total_frames;
unsigned int passed_frames;
unsigned int time_started;
unsigned int duration;
struct wlr_box initial;
struct wlr_box current;
@@ -244,8 +243,8 @@ struct dwl_opacity_animation {
float current_opacity;
float target_opacity;
float initial_opacity;
unsigned int total_frames;
unsigned int passed_frames;
unsigned int time_started;
unsigned int duration;
float current_border_color[4];
float target_border_color[4];
float initial_border_color[4];