|
17 | 17 | // Imported just for the side effect of getting the `types` it exports into |
18 | 18 | // the type system during compile time. |
19 | 19 | import {NormTimeDef} from '../types/date'; |
| 20 | +import {once} from '../types/function'; |
20 | 21 |
|
21 | 22 | /** |
22 | 23 | * A CurveDef is a function that returns a normtime value (0 to 1) for another |
@@ -250,25 +251,17 @@ export const Curves = { |
250 | 251 | return n; |
251 | 252 | }, |
252 | 253 |
|
253 | | - /** |
254 | | - * ease |
255 | | - */ |
256 | | - EASE: bezierCurve(0.25, 0.1, 0.25, 1.0), |
| 254 | + /** ease */ |
| 255 | + EASE: once(bezierCurve)(0.25, 0.1, 0.25, 1.0), |
257 | 256 |
|
258 | | - /** |
259 | | - * ease-in: slow out, fast in |
260 | | - */ |
261 | | - EASE_IN: bezierCurve(0.42, 0.0, 1.0, 1.0), |
| 257 | + /** ease-in: slow out, fast in */ |
| 258 | + EASE_IN: once(bezierCurve)(0.42, 0.0, 1.0, 1.0), |
262 | 259 |
|
263 | | - /** |
264 | | - * ease-out: fast out, slow in |
265 | | - */ |
266 | | - EASE_OUT: bezierCurve(0.0, 0.0, 0.58, 1.0), |
| 260 | + /** ease-out: fast out, slow in */ |
| 261 | + EASE_OUT: once(bezierCurve)(0.0, 0.0, 0.58, 1.0), |
267 | 262 |
|
268 | | - /** |
269 | | - * ease-in-out |
270 | | - */ |
271 | | - EASE_IN_OUT: bezierCurve(0.42, 0.0, 0.58, 1.0), |
| 263 | + /** ease-in-out */ |
| 264 | + EASE_IN_OUT: once(bezierCurve)(0.42, 0.0, 0.58, 1.0), |
272 | 265 | }; |
273 | 266 |
|
274 | 267 | /** |
|
0 commit comments