Skip to content

Commit

Permalink
make back animation way faster
Browse files Browse the repository at this point in the history
it had a slow annoying delay

Link: damus-io/notedeck#595
  • Loading branch information
jb55 committed Dec 18, 2024
1 parent 92d5a22 commit 8a0508e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion egui-nav/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ impl<'a, Route: Clone> Nav<'a, Route> {
}

fn springy(offset: f32) -> f32 {
((offset.abs().powf(1.2) - 1.0) * 0.1).max(0.5)
(offset.abs() * 0.6).max(0.2)
}

fn spring_animate(offset: f32, target: f32, left: bool) -> Option<f32> {
Expand Down

0 comments on commit 8a0508e

Please sign in to comment.