1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 23:30:04 -04:00

Easing functions (#4630)

This adds most of the "standard" easing functions from
https://easings.net/ to `emath::easing`, and adds helpers in `egui` for
using them.

In particular there is now `ctx.animate_bool_with_easing` and
`ctx.animate_bool_responsive`, that uses a cubic easing function.

All animations in egui now uses cubic ease-out, for a more responsive
feeling (fast at the start, slower towards the end).
This commit is contained in:
Emil Ernerfeldt
2024-06-06 13:09:52 +02:00
committed by GitHub
parent 3d632cd333
commit 29b12e1760
9 changed files with 307 additions and 28 deletions

View File

@@ -26,6 +26,7 @@ use std::ops::{Add, Div, Mul, RangeInclusive, Sub};
// ----------------------------------------------------------------------------
pub mod align;
pub mod easing;
mod history;
mod numeric;
mod ordered_float;