// live demo
Cursor Physics
A spring-damped custom cursor with magnetic snap to anything tagged
data-magnet, plus a click ripple. Pure JavaScript —
no library, no canvas, just transform on two divs and
a hand-rolled spring integrator at requestAnimationFrame.
- Vanilla JS
- Spring physics
- requestAnimationFrame
- CSS transforms
The cursor stretches under acceleration, snaps to data-magnet elements, and emits a ripple on click.