react-native-redash
Version:
Utility library for React Native Reanimated
17 lines (16 loc) • 740 B
TypeScript
import type { Animation } from "react-native-reanimated";
import Animated from "react-native-reanimated";
export declare const withPause: (_nextAnimation: any, paused: Animated.SharedValue<boolean>) => number;
export interface PhysicsAnimation extends Animation<PhysicsAnimation> {
velocity: number;
current: number;
}
/**
* @summary Add a bouncing behavior to a physics-based animation.
* An animation is defined as being physics-based if it contains a velocity in its state.
* @example
// will bounce if the animations hits the position 0 or 100
withBouncing(withDecay({ velocity }), 0, 100)
* @worklet
*/
export declare const withBouncing: (_nextAnimation: any, lowerBound: number, upperBound: number) => number;