UNPKG

react-native-reanimated

Version:

More powerful alternative to Animated library for React Native.

29 lines (28 loc) • 749 B
'use strict'; // Those are the easings that can be implemented using Bezier curves. // Others should be done as CSS animations export const WebEasings = { linear: [0, 0, 1, 1], ease: [0.42, 0, 1, 1], quad: [0.11, 0, 0.5, 0], cubic: [0.32, 0, 0.67, 0], sin: [0.12, 0, 0.39, 0], circle: [0.55, 0, 1, 0.45], exp: [0.7, 0, 0.84, 0] }; export function getEasingByName(easingName) { return `cubic-bezier(${WebEasings[easingName].toString()})`; } export function maybeGetBezierEasing(easing) { if (typeof easing === 'string') { return null; } if (!('factory' in easing)) { return null; } if (!easing.bezier) { return null; } return `cubic-bezier(${easing.bezier.join(', ')})`; } //# sourceMappingURL=Easing.js.map