Gravitational Mouse Attraction

11.22.2023
by
Web Bae

Let's explore the mouse interaction seen in the footer of magnetism.fr! It's a fun and simple physics simulation involving the forces of gravity and gravitational attraction between the red circle and the user's mouse position anytime the mouse is moved. I think adding physics to your web pages can bring a lot of fun and joy to a website and p5.js combined with Webflow makes that pretty easy!

DEMO/CLONE
CODE
TUTORIAL

See the Pen Splide Slider by learyjk (@learyjk) on CodePen.