javascriptgoogle-chromeeasing

What easing function does Google Chrome v8 use for scrollTo?


What easing function does Google Chrome v8 implement for

window.scrollTo({ x, y }, { behavior: "smooth" })

Solution

  • Google Chrome (V8) uses an EaseInOut animation with a delta-based duration over a cubic-bezier timing function (here is the implementation in Chrome, and here is an MIT-licensed implementation) parametrized with these arguments.