Capítulo 248 de 411

Chapter 248: InertiaPlugin (Overview)

Core Idea

Animates a target to a natural stop based on momentum/velocity (a "throw" or "flick" feel), commonly paired with Draggable so a released drag continues decelerating realistically.

Code Examples

gsap.registerPlugin(InertiaPlugin);
gsap.to(obj, { inertia: { x: 500, y: -300 } });

Connects To

  • Draggable: the plugin InertiaPlugin most commonly pairs with for flick/throw releases.
  • InertiaPlugin.track(), VelocityTracker: for capturing velocity from something other than a Draggable.