setScrollPercent ignores scrolling "in progress" (i.e. the one that has been called but not finished), which doesn't allow us to have accurate results when we want to run them whenever we want.
In my scenario, it's possible that I configured two viewports with "autoplay" in a row. So when a user encounters the first viewport with autoplay, it invokes setScrollPercent to autoplay through this viewport to the next one. However, the next one is also configured as an autoplay, and it invokes setScrollPercent as well, which ends up in a collision and not accurate scroll position in the end.
setScrollPercent
ignores scrolling "in progress" (i.e. the one that has been called but not finished), which doesn't allow us to have accurate results when we want to run them whenever we want.In my scenario, it's possible that I configured two viewports with "autoplay" in a row. So when a user encounters the first viewport with autoplay, it invokes
setScrollPercent
to autoplay through this viewport to the next one. However, the next one is also configured as an autoplay, and it invokessetScrollPercent
as well, which ends up in a collision and not accurate scroll position in the end.