Open
Description
This is about the docs.
While I was trying to implement a particular transition in my site I've tried to implement a custom easing function. I've had difficulties because I could not figure out what my custom easing function was supposed to return based on the t
parameter. And also the meaning of the t
parameter is not totally clear. Although t
is probably a fraction of the point of time we're in within the transition as a value between 0 and 1.
Questions that come to my mind about the return value:
- What will Svelte do with that value?
- Does it need to be a value between 0 and 1?
- Can it return a value below 0? What will happen then?
- Can it return a value above 1? What will happen then?
- Does the value returned depend in any way on the value returned in the previous call? Maybe just the difference between the previous and the current value matters?
When looking at the API docs (e.g. in https://svelte.dev/docs#svelte_easing) I couldn't find anything.