ScrollMagic icon indicating copy to clipboard operation
ScrollMagic copied to clipboard

How to throttle scrollmagic?

Open Alfrex92 opened this issue 7 years ago • 3 comments

Hi, I have a question how can I throttle or debounce scroll magic?

The event trigger many times.

Alfrex92 avatar Jan 30 '18 00:01 Alfrex92

You can set refreshInterval on the controller: http://scrollmagic.io/docs/ScrollMagic.Controller.html#constructor

oherst avatar Feb 15 '18 12:02 oherst

Hi @oherst - how would this work? Would I do var controller = new ScrollMagic.Controller({refreshInterval: 200}); on the controller to add a 200ms throttle? I'm relatively new to JS and scroll magic.

EmilyChews avatar May 22 '18 14:05 EmilyChews

Finally! This is the only link to 'refreshInterval' docs I've found that works! Docs seem a bit messed up? Searching for 'refreshInterval' returns nothing. Googling 'scrollmagic refreshInterval' brings up a link, but then 'refreshInterval' is nowhere on the page

BB-000 avatar Oct 14 '20 10:10 BB-000