react/live.tsx
Tools · A camera move · MIT
- What it does
Client hooks for calm motion: useLoop (a requestAnimationFrame loop that hands your tick a delta and stops when nothing moves), useEased, useInView, useStillness for reduced motion, useReadout, and two pure steppers, spring(state, target, dt, stiffness, damping) and follow(current, target, dt, seconds). The steppers take dt, so the same motion can be driven by a frame time.
- Get it
const x = follow(current, target, dt, 0.28); spring(state, target, dt, 420, 26);
- Needs
React 18 or later
- License
MIT
- From