animejs 4.2.1 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/bundles/anime.esm.js +12 -8
  2. package/dist/bundles/anime.esm.min.js +2 -2
  3. package/dist/bundles/anime.umd.js +12 -8
  4. package/dist/bundles/anime.umd.min.js +2 -2
  5. package/dist/modules/animatable/animatable.cjs +1 -1
  6. package/dist/modules/animatable/animatable.js +1 -1
  7. package/dist/modules/animatable/index.cjs +1 -1
  8. package/dist/modules/animatable/index.js +1 -1
  9. package/dist/modules/animation/additive.cjs +1 -1
  10. package/dist/modules/animation/additive.js +1 -1
  11. package/dist/modules/animation/animation.cjs +1 -1
  12. package/dist/modules/animation/animation.js +1 -1
  13. package/dist/modules/animation/composition.cjs +1 -1
  14. package/dist/modules/animation/composition.js +1 -1
  15. package/dist/modules/animation/index.cjs +1 -1
  16. package/dist/modules/animation/index.js +1 -1
  17. package/dist/modules/core/clock.cjs +1 -1
  18. package/dist/modules/core/clock.js +1 -1
  19. package/dist/modules/core/colors.cjs +1 -1
  20. package/dist/modules/core/colors.js +1 -1
  21. package/dist/modules/core/consts.cjs +1 -1
  22. package/dist/modules/core/consts.js +1 -1
  23. package/dist/modules/core/globals.cjs +2 -2
  24. package/dist/modules/core/globals.js +2 -2
  25. package/dist/modules/core/helpers.cjs +1 -1
  26. package/dist/modules/core/helpers.js +1 -1
  27. package/dist/modules/core/render.cjs +1 -1
  28. package/dist/modules/core/render.js +1 -1
  29. package/dist/modules/core/styles.cjs +1 -1
  30. package/dist/modules/core/styles.js +1 -1
  31. package/dist/modules/core/targets.cjs +1 -1
  32. package/dist/modules/core/targets.js +1 -1
  33. package/dist/modules/core/transforms.cjs +1 -1
  34. package/dist/modules/core/transforms.js +1 -1
  35. package/dist/modules/core/units.cjs +1 -1
  36. package/dist/modules/core/units.js +1 -1
  37. package/dist/modules/core/values.cjs +1 -1
  38. package/dist/modules/core/values.js +1 -1
  39. package/dist/modules/draggable/draggable.cjs +1 -1
  40. package/dist/modules/draggable/draggable.js +1 -1
  41. package/dist/modules/draggable/index.cjs +1 -1
  42. package/dist/modules/draggable/index.js +1 -1
  43. package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
  44. package/dist/modules/easings/cubic-bezier/index.js +1 -1
  45. package/dist/modules/easings/eases/index.cjs +1 -1
  46. package/dist/modules/easings/eases/index.js +1 -1
  47. package/dist/modules/easings/eases/parser.cjs +1 -1
  48. package/dist/modules/easings/eases/parser.js +1 -1
  49. package/dist/modules/easings/index.cjs +1 -1
  50. package/dist/modules/easings/index.js +1 -1
  51. package/dist/modules/easings/irregular/index.cjs +1 -1
  52. package/dist/modules/easings/irregular/index.js +1 -1
  53. package/dist/modules/easings/linear/index.cjs +1 -1
  54. package/dist/modules/easings/linear/index.js +1 -1
  55. package/dist/modules/easings/none.cjs +1 -1
  56. package/dist/modules/easings/none.js +1 -1
  57. package/dist/modules/easings/spring/index.cjs +1 -1
  58. package/dist/modules/easings/spring/index.js +1 -1
  59. package/dist/modules/easings/steps/index.cjs +1 -1
  60. package/dist/modules/easings/steps/index.js +1 -1
  61. package/dist/modules/engine/engine.cjs +1 -1
  62. package/dist/modules/engine/engine.js +1 -1
  63. package/dist/modules/engine/index.cjs +1 -1
  64. package/dist/modules/engine/index.js +1 -1
  65. package/dist/modules/events/index.cjs +1 -1
  66. package/dist/modules/events/index.js +1 -1
  67. package/dist/modules/events/scroll.cjs +1 -1
  68. package/dist/modules/events/scroll.js +1 -1
  69. package/dist/modules/index.cjs +1 -1
  70. package/dist/modules/index.js +1 -1
  71. package/dist/modules/scope/index.cjs +1 -1
  72. package/dist/modules/scope/index.js +1 -1
  73. package/dist/modules/scope/scope.cjs +1 -1
  74. package/dist/modules/scope/scope.js +1 -1
  75. package/dist/modules/svg/drawable.cjs +1 -1
  76. package/dist/modules/svg/drawable.js +1 -1
  77. package/dist/modules/svg/helpers.cjs +1 -1
  78. package/dist/modules/svg/helpers.js +1 -1
  79. package/dist/modules/svg/index.cjs +1 -1
  80. package/dist/modules/svg/index.js +1 -1
  81. package/dist/modules/svg/morphto.cjs +1 -1
  82. package/dist/modules/svg/morphto.js +1 -1
  83. package/dist/modules/svg/motionpath.cjs +11 -7
  84. package/dist/modules/svg/motionpath.js +11 -7
  85. package/dist/modules/text/index.cjs +1 -1
  86. package/dist/modules/text/index.js +1 -1
  87. package/dist/modules/text/split.cjs +1 -1
  88. package/dist/modules/text/split.js +1 -1
  89. package/dist/modules/timeline/index.cjs +1 -1
  90. package/dist/modules/timeline/index.js +1 -1
  91. package/dist/modules/timeline/position.cjs +1 -1
  92. package/dist/modules/timeline/position.js +1 -1
  93. package/dist/modules/timeline/timeline.cjs +1 -1
  94. package/dist/modules/timeline/timeline.js +1 -1
  95. package/dist/modules/timer/index.cjs +1 -1
  96. package/dist/modules/timer/index.js +1 -1
  97. package/dist/modules/timer/timer.cjs +1 -1
  98. package/dist/modules/timer/timer.js +1 -1
  99. package/dist/modules/utils/chainable.cjs +1 -1
  100. package/dist/modules/utils/chainable.js +1 -1
  101. package/dist/modules/utils/index.cjs +1 -1
  102. package/dist/modules/utils/index.js +1 -1
  103. package/dist/modules/utils/number.cjs +1 -1
  104. package/dist/modules/utils/number.js +1 -1
  105. package/dist/modules/utils/random.cjs +1 -1
  106. package/dist/modules/utils/random.js +1 -1
  107. package/dist/modules/utils/stagger.cjs +1 -1
  108. package/dist/modules/utils/stagger.js +1 -1
  109. package/dist/modules/utils/target.cjs +1 -1
  110. package/dist/modules/utils/target.js +1 -1
  111. package/dist/modules/utils/time.cjs +1 -1
  112. package/dist/modules/utils/time.js +1 -1
  113. package/dist/modules/waapi/composition.cjs +1 -1
  114. package/dist/modules/waapi/composition.js +1 -1
  115. package/dist/modules/waapi/index.cjs +1 -1
  116. package/dist/modules/waapi/index.js +1 -1
  117. package/dist/modules/waapi/waapi.cjs +1 -1
  118. package/dist/modules/waapi/waapi.js +1 -1
  119. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -65,7 +65,7 @@ const globals = {
65
65
  tickThreshold: 200,
66
66
  };
67
67
 
68
- const globalVersions = { version: '4.2.1', engine: null };
68
+ const globalVersions = { version: '4.2.2', engine: null };
69
69
 
70
70
  if (consts.isBrowser) {
71
71
  if (!consts.win.AnimeJS) consts.win.AnimeJS = [];
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -63,7 +63,7 @@ const globals = {
63
63
  tickThreshold: 200,
64
64
  };
65
65
 
66
- const globalVersions = { version: '4.2.1', engine: null };
66
+ const globalVersions = { version: '4.2.2', engine: null };
67
67
 
68
68
  if (isBrowser) {
69
69
  if (!win.AnimeJS) win.AnimeJS = [];
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - draggable - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - draggable - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - draggable - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - draggable - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - engine - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - engine - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - engine - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - engine - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - events - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - events - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - events - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - events - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - scope - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - scope - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - scope - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - scope - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - svg - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - svg - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - svg - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - svg - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - svg - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - svg - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - svg - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - svg - ESM
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - svg - CJS
3
- * @version v4.2.1
3
+ * @version v4.2.2
4
4
  * @license MIT
5
5
  * @copyright 2025 - Julian Garnier
6
6
  */
@@ -26,12 +26,15 @@ var helpers = require('./helpers.cjs');
26
26
  * @param {SVGGeometryElement} $path
27
27
  * @param {Number} totalLength
28
28
  * @param {Number} progress
29
- * @param {Number}lookup
29
+ * @param {Number} lookup
30
+ * @param {Boolean} shouldClamp
30
31
  * @return {DOMPoint}
31
32
  */
32
- const getPathPoint = ($path, totalLength, progress, lookup = 0) => {
33
+ const getPathPoint = ($path, totalLength, progress, lookup, shouldClamp) => {
33
34
  const point = progress + lookup;
34
- const pointOnPath = (point % totalLength + totalLength) % totalLength;
35
+ const pointOnPath = shouldClamp
36
+ ? Math.max(0, Math.min(point, totalLength)) // Clamp between 0 and totalLength
37
+ : (point % totalLength + totalLength) % totalLength; // Wrap around
35
38
  return $path.getPointAtLength(pointOnPath);
36
39
  };
37
40
 
@@ -46,6 +49,7 @@ const getPathProgess = ($path, pathProperty, offset = 0) => {
46
49
  const totalLength = +($path.getTotalLength());
47
50
  const inSvg = $el[consts.isSvgSymbol];
48
51
  const ctm = $path.getCTM();
52
+ const shouldClamp = offset === 0;
49
53
  /** @type {TweenObjectValue} */
50
54
  return {
51
55
  from: 0,
@@ -55,11 +59,11 @@ const getPathProgess = ($path, pathProperty, offset = 0) => {
55
59
  const offsetLength = offset * totalLength;
56
60
  const newProgress = progress + offsetLength;
57
61
  if (pathProperty === 'a') {
58
- const p0 = getPathPoint($path, totalLength, newProgress, -1);
59
- const p1 = getPathPoint($path, totalLength, newProgress, 1);
62
+ const p0 = getPathPoint($path, totalLength, newProgress, -1, shouldClamp);
63
+ const p1 = getPathPoint($path, totalLength, newProgress, 1, shouldClamp);
60
64
  return helpers$1.atan2(p1.y - p0.y, p1.x - p0.x) * 180 / helpers$1.PI;
61
65
  } else {
62
- const p = getPathPoint($path, totalLength, newProgress, 0);
66
+ const p = getPathPoint($path, totalLength, newProgress, 0, shouldClamp);
63
67
  return pathProperty === 'x' ?
64
68
  inSvg || !ctm ? p.x : p.x * ctm.a + p.y * ctm.c + ctm.e :
65
69
  inSvg || !ctm ? p.y : p.x * ctm.b + p.y * ctm.d + ctm.f