pathIn.js 612 B

123456789101112131415161718
  1. import { effectTiming } from './utils';
  2. /**
  3. * Transform mark from transparent to solid.
  4. */
  5. export const PathIn = (options) => {
  6. return (from, to, value, coordinate, defaults) => {
  7. var _a, _b;
  8. const [shape] = from;
  9. const length = ((_b = (_a = shape).getTotalLength) === null || _b === void 0 ? void 0 : _b.call(_a)) || 0;
  10. const keyframes = [
  11. { lineDash: [0, length] },
  12. { lineDash: [length, 0] },
  13. ];
  14. return shape.animate(keyframes, effectTiming(defaults, value, options));
  15. };
  16. };
  17. PathIn.props = {};
  18. //# sourceMappingURL=pathIn.js.map