pathIn.js 749 B

12345678910111213141516171819202122
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.PathIn = void 0;
  4. const utils_1 = require("./utils");
  5. /**
  6. * Transform mark from transparent to solid.
  7. */
  8. const PathIn = (options) => {
  9. return (from, to, value, coordinate, defaults) => {
  10. var _a, _b;
  11. const [shape] = from;
  12. const length = ((_b = (_a = shape).getTotalLength) === null || _b === void 0 ? void 0 : _b.call(_a)) || 0;
  13. const keyframes = [
  14. { lineDash: [0, length] },
  15. { lineDash: [length, 0] },
  16. ];
  17. return shape.animate(keyframes, (0, utils_1.effectTiming)(defaults, value, options));
  18. };
  19. };
  20. exports.PathIn = PathIn;
  21. exports.PathIn.props = {};
  22. //# sourceMappingURL=pathIn.js.map