diff --git a/fading-rects/FadingRects.cpp b/fading-rects/FadingRects.cpp index baf347e..c70255b 100644 --- a/fading-rects/FadingRects.cpp +++ b/fading-rects/FadingRects.cpp @@ -15,6 +15,7 @@ #include const int default_frames_per_rect {10}; +const int fade_time {5}; // seconds enum class FadingState { fadein, @@ -111,7 +112,7 @@ void FadingRects::update() { rect.cur_alpha = 0.0; rect.state = FadingState::fadein; rect.sustain_frame = 0; - rect.delta = rect.alpha / (5 * fps()); + rect.delta = rect.alpha / (fade_time * fps()); rect.line_width = random_between(1.0, 20.0); rect.x = rr.x; rect.y = rr.y;