Redash
  • Redash
  • Animations
  • Coordinates
  • Math
  • Strings
  • Transitions
  • Vectors
  • Paths
  • Physics
  • Colors
Powered by GitBook
On this page

Was this helpful?

Physics

snapPoint()

const snapPoint = (value: number, velocity: number, points: ReadonlyArray<number>): number;

Select a point where the animation should snap to given the value of the gesture and it's velocity.

withSpring(snapPoint(translationX, velocityX, [0, width]))
PreviousPathsNextColors

Last updated 4 years ago

Was this helpful?