mirror of
https://github.com/wez/wezterm.git
synced 2024-12-28 07:55:03 +03:00
Add Constant
easing function
refs: https://github.com/wez/wezterm/issues/1738
This commit is contained in:
parent
8eb497fa19
commit
1c605f7bf1
@ -9,6 +9,7 @@ pub enum EasingFunction {
|
||||
EaseIn,
|
||||
EaseInOut,
|
||||
EaseOut,
|
||||
Constant,
|
||||
}
|
||||
impl_lua_conversion!(EasingFunction);
|
||||
|
||||
@ -22,6 +23,7 @@ impl EasingFunction {
|
||||
}
|
||||
|
||||
match self {
|
||||
Self::Constant => 0.,
|
||||
Self::Linear => cubic_bezier(0., 0., 1.0, 1.0, position),
|
||||
Self::CubicBezier(a, b, c, d) => cubic_bezier(*a, *b, *c, *d, position),
|
||||
Self::Ease => cubic_bezier(0.25, 0.1, 0.25, 1.0, position),
|
||||
|
@ -11,6 +11,13 @@ utilization.
|
||||
If you are running with a CPU renderer (eg: you have [front_end](front_end.md)
|
||||
= `"Software"`, or your system doesn't have a GPU), then setting `animation_fps
|
||||
= 1` is recommended, as doing so will disable easing effects and use
|
||||
transitions.
|
||||
transitions:
|
||||
|
||||
```lua
|
||||
return {
|
||||
animation_fps = 1,
|
||||
cursor_blink_ease_in = "Constant",
|
||||
cursor_blink_ease_out = "Constant",
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -27,6 +27,7 @@ The following easing functions are supported:
|
||||
* `EaseInOut` - The fade starts slowly, speeds up, and then slows down towards the end.
|
||||
* `EaseOut` - The fade starts abruptly, and then progressively slows down towards the end.
|
||||
* `{CubicBezier={0.0, 0.0, 0.58, 1.0}}` - an arbitrary cubic bezier with the specified parameters.
|
||||
* `Constant` - Evaluates as 0 regardless of time. Useful to implement a step transition at the end of the duration. (*Since: nightly builds only*)
|
||||
|
||||
The following configuration enables a low intensity visual bell that takes a total of 300ms to "flash" the screen:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user