How to Trigger Interaction on Mouse Cursor Shake (Velocity)

Hello everyone! I have a fun idea for a client project. I’m trying to mimic the mouse-move interactions found on the site The site seems to be tracking the velocity of the mouse so that when the threshold is passed, it triggers a crazy animation. I’d like to use the same concept to create trigger an interaction within webflow (think a champagne bottle is shaked, it pops!). Here are some references. It appears the site is using a combination of tween.js, paper.js, traer.js, and jiggler.js. I’m not a code guy so I’m not really sure where to start but I would gladly take any advice and try my best to learn!


My Site: