Open teggno opened 3 years ago
There is a section discussing this in the tutorial.
The t value is 0 at the beginning of an intro or the end of an outro, and 1 at the end of an intro or beginning of an outro.
Thank you, @JAnken123. I still think it would be good to document this a little more thoroughly. Especially a the part about what to return from the function. A good place might be the API docs.
Maybe adding a link to this part of the docs would suffice? https://svelte.dev/docs#Custom_transition_functions
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
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 thet
parameter is not totally clear. Althought
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:
When looking at the API docs (e.g. in https://svelte.dev/docs#svelte_easing) I couldn't find anything.