custom-easing.d.ts 1.6 KB

12345678910111213141516
  1. /**
  2. * ported from https://github.com/okikio/native/blob/master/packages/animate/src/custom-easing.ts
  3. */
  4. import type { TypeEasingFunction } from '@antv/g-lite';
  5. export declare const convertToDash: (str: string) => string;
  6. export type TypeColor = string | number | (string | number)[];
  7. export type TypeRGBAFunction = (color: TypeColor) => number[];
  8. /**
  9. * The default list of easing functions, do note this is different from {@link EASING}
  10. */
  11. type EasingFunctionType = 'steps' | 'step-start' | 'step-end' | 'linear' | 'cubic-bezier' | 'ease' | 'in' | 'out' | 'in-out' | 'out-in' | 'in-quad' | 'out-quad' | 'in-out-quad' | 'out-in-quad' | 'in-cubic' | 'out-cubic' | 'in-out-cubic' | 'out-in-cubic' | 'in-quart' | 'out-quart' | 'in-out-quart' | 'out-in-quart' | 'in-quint' | 'out-quint' | 'in-out-quint' | 'out-in-quint' | 'in-expo' | 'out-expo' | 'in-out-expo' | 'out-in-expo' | 'in-sine' | 'out-sine' | 'in-out-sine' | 'out-in-sine' | 'in-circ' | 'out-circ' | 'in-out-circ' | 'out-in-circ' | 'in-back' | 'out-back' | 'in-out-back' | 'out-in-back' | 'in-bounce' | 'out-bounce' | 'in-out-bounce' | 'out-in-bounce' | 'in-elastic' | 'out-elastic' | 'in-out-elastic' | 'out-in-elastic' | 'spring' | 'spring-in' | 'spring-out' | 'spring-in-out' | 'spring-out-in';
  12. export declare const EasingFunctions: Record<EasingFunctionType, TypeEasingFunction>;
  13. /** Re-maps a number from one range to another. Numbers outside the range are not clamped to 0 and 1, because out-of-range values are often intentional and useful. */
  14. export declare const getEasingFunction: (ease: string) => any;
  15. export {};
  16. //# sourceMappingURL=custom-easing.d.ts.map