Documentation menuDocumentation
Lagrangian documentation
Animation with real physics: springs that keep their momentum when interrupted, throws with friction onto snap points, and a small 2D world with gravity, collisions and rolling. About 7 kB.
Try the live demoStart
Guides
- SpringsConfigure springs by feel or by physics, read velocity, and use the maths directly.
- Drag and throwDraggable elements with velocity, friction, bounds, rubber-banding and snap points.
- The worldGravity, collisions, friction, rolling, springs and grabbing for round bodies.
- Equations of motionStep your own physics with RK4, e.g. a double pendulum from its Lagrangian.
- ReactHooks for springs, dragging and the world, without re-rendering on every frame.
- Reduced motionWhat happens when users ask their system for less motion.