Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 71505c7

Browse files
committed
feat(easing): use easing function in notify
1 parent d8f460c commit 71505c7

File tree

3 files changed

+523
-7
lines changed

3 files changed

+523
-7
lines changed

docs/api/notify.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,59 @@ noti.notify_max_width = 40
4747
noti.timeout = 3000
4848
noti.notify('This is a simple notification!')
4949
```
50+
51+
The lua notify api also supports [easing](https://github.com/EmmanuelOga/easing) function:
52+
53+
```lua
54+
local noti = require('spacevim.api').import('notify')
55+
noti.notify_max_width = 40
56+
noti.timeout = 3000
57+
noti.notify(
58+
'This is a simple notification!',
59+
{ easing = { fps = 60, time = 300, func = 'linear' } }
60+
)
61+
```
62+
63+
available functions:
64+
65+
- linear
66+
- inQuad
67+
- outQuad
68+
- inOutQuad
69+
- outInQuad
70+
- inCubic
71+
- outCubic
72+
- inOutCubic
73+
- outInCubic
74+
- inQuart
75+
- outQuart
76+
- inOutQuart
77+
- outInQuart
78+
- inQuint
79+
- outQuint
80+
- inOutQuint
81+
- outInQuint
82+
- inSine
83+
- outSine
84+
- inOutSine
85+
- outInSine
86+
- inExpo
87+
- outExpo
88+
- inOutExpo
89+
- outInExpo
90+
- inCirc
91+
- outCirc
92+
- inOutCirc
93+
- outInCirc
94+
- inElastic
95+
- outElastic
96+
- inOutElastic
97+
- outInElastic
98+
- inBack
99+
- outBack
100+
- inOutBack
101+
- outInBack
102+
- inBounce
103+
- outBounce
104+
- inOutBounce
105+
- outInBounce

0 commit comments

Comments
 (0)