animejs 4.4.0 → 4.4.1

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 (126) hide show
  1. package/README.md +2 -2
  2. package/dist/bundles/anime.esm.js +31 -61
  3. package/dist/bundles/anime.esm.min.js +2 -2
  4. package/dist/bundles/anime.umd.js +31 -61
  5. package/dist/bundles/anime.umd.min.js +2 -2
  6. package/dist/modules/animatable/animatable.cjs +1 -1
  7. package/dist/modules/animatable/animatable.js +1 -1
  8. package/dist/modules/animatable/index.cjs +1 -1
  9. package/dist/modules/animatable/index.js +1 -1
  10. package/dist/modules/animation/additive.cjs +1 -1
  11. package/dist/modules/animation/additive.js +1 -1
  12. package/dist/modules/animation/animation.cjs +1 -1
  13. package/dist/modules/animation/animation.js +1 -1
  14. package/dist/modules/animation/composition.cjs +1 -1
  15. package/dist/modules/animation/composition.js +1 -1
  16. package/dist/modules/animation/index.cjs +1 -1
  17. package/dist/modules/animation/index.js +1 -1
  18. package/dist/modules/core/clock.cjs +1 -1
  19. package/dist/modules/core/clock.js +1 -1
  20. package/dist/modules/core/colors.cjs +1 -1
  21. package/dist/modules/core/colors.js +1 -1
  22. package/dist/modules/core/consts.cjs +1 -1
  23. package/dist/modules/core/consts.js +1 -1
  24. package/dist/modules/core/globals.cjs +2 -2
  25. package/dist/modules/core/globals.js +2 -2
  26. package/dist/modules/core/helpers.cjs +1 -1
  27. package/dist/modules/core/helpers.js +1 -1
  28. package/dist/modules/core/render.cjs +30 -60
  29. package/dist/modules/core/render.js +32 -62
  30. package/dist/modules/core/styles.cjs +1 -1
  31. package/dist/modules/core/styles.js +1 -1
  32. package/dist/modules/core/targets.cjs +1 -1
  33. package/dist/modules/core/targets.js +1 -1
  34. package/dist/modules/core/transforms.cjs +1 -1
  35. package/dist/modules/core/transforms.js +1 -1
  36. package/dist/modules/core/units.cjs +1 -1
  37. package/dist/modules/core/units.js +1 -1
  38. package/dist/modules/core/values.cjs +1 -1
  39. package/dist/modules/core/values.js +1 -1
  40. package/dist/modules/draggable/draggable.cjs +1 -1
  41. package/dist/modules/draggable/draggable.js +1 -1
  42. package/dist/modules/draggable/index.cjs +1 -1
  43. package/dist/modules/draggable/index.js +1 -1
  44. package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
  45. package/dist/modules/easings/cubic-bezier/index.js +1 -1
  46. package/dist/modules/easings/eases/index.cjs +1 -1
  47. package/dist/modules/easings/eases/index.js +1 -1
  48. package/dist/modules/easings/eases/parser.cjs +1 -1
  49. package/dist/modules/easings/eases/parser.js +1 -1
  50. package/dist/modules/easings/index.cjs +1 -1
  51. package/dist/modules/easings/index.js +1 -1
  52. package/dist/modules/easings/irregular/index.cjs +1 -1
  53. package/dist/modules/easings/irregular/index.js +1 -1
  54. package/dist/modules/easings/linear/index.cjs +1 -1
  55. package/dist/modules/easings/linear/index.js +1 -1
  56. package/dist/modules/easings/none.cjs +1 -1
  57. package/dist/modules/easings/none.js +1 -1
  58. package/dist/modules/easings/spring/index.cjs +1 -1
  59. package/dist/modules/easings/spring/index.js +1 -1
  60. package/dist/modules/easings/steps/index.cjs +1 -1
  61. package/dist/modules/easings/steps/index.js +1 -1
  62. package/dist/modules/engine/engine.cjs +1 -1
  63. package/dist/modules/engine/engine.js +1 -1
  64. package/dist/modules/engine/index.cjs +1 -1
  65. package/dist/modules/engine/index.js +1 -1
  66. package/dist/modules/events/index.cjs +1 -1
  67. package/dist/modules/events/index.js +1 -1
  68. package/dist/modules/events/scroll.cjs +1 -1
  69. package/dist/modules/events/scroll.js +1 -1
  70. package/dist/modules/index.cjs +1 -1
  71. package/dist/modules/index.js +1 -1
  72. package/dist/modules/layout/index.cjs +1 -1
  73. package/dist/modules/layout/index.js +1 -1
  74. package/dist/modules/layout/layout.cjs +1 -1
  75. package/dist/modules/layout/layout.js +1 -1
  76. package/dist/modules/scope/index.cjs +1 -1
  77. package/dist/modules/scope/index.js +1 -1
  78. package/dist/modules/scope/scope.cjs +1 -1
  79. package/dist/modules/scope/scope.js +1 -1
  80. package/dist/modules/svg/drawable.cjs +1 -1
  81. package/dist/modules/svg/drawable.js +1 -1
  82. package/dist/modules/svg/helpers.cjs +1 -1
  83. package/dist/modules/svg/helpers.js +1 -1
  84. package/dist/modules/svg/index.cjs +1 -1
  85. package/dist/modules/svg/index.js +1 -1
  86. package/dist/modules/svg/morphto.cjs +1 -1
  87. package/dist/modules/svg/morphto.js +1 -1
  88. package/dist/modules/svg/motionpath.cjs +1 -1
  89. package/dist/modules/svg/motionpath.js +1 -1
  90. package/dist/modules/text/index.cjs +1 -1
  91. package/dist/modules/text/index.js +1 -1
  92. package/dist/modules/text/scramble.cjs +1 -1
  93. package/dist/modules/text/scramble.js +1 -1
  94. package/dist/modules/text/split.cjs +1 -1
  95. package/dist/modules/text/split.js +1 -1
  96. package/dist/modules/timeline/index.cjs +1 -1
  97. package/dist/modules/timeline/index.js +1 -1
  98. package/dist/modules/timeline/position.cjs +1 -1
  99. package/dist/modules/timeline/position.js +1 -1
  100. package/dist/modules/timeline/timeline.cjs +1 -1
  101. package/dist/modules/timeline/timeline.js +1 -1
  102. package/dist/modules/timer/index.cjs +1 -1
  103. package/dist/modules/timer/index.js +1 -1
  104. package/dist/modules/timer/timer.cjs +1 -1
  105. package/dist/modules/timer/timer.js +1 -1
  106. package/dist/modules/utils/chainable.cjs +1 -1
  107. package/dist/modules/utils/chainable.js +1 -1
  108. package/dist/modules/utils/index.cjs +1 -1
  109. package/dist/modules/utils/index.js +1 -1
  110. package/dist/modules/utils/number.cjs +1 -1
  111. package/dist/modules/utils/number.js +1 -1
  112. package/dist/modules/utils/random.cjs +1 -1
  113. package/dist/modules/utils/random.js +1 -1
  114. package/dist/modules/utils/stagger.cjs +1 -1
  115. package/dist/modules/utils/stagger.js +1 -1
  116. package/dist/modules/utils/target.cjs +1 -1
  117. package/dist/modules/utils/target.js +1 -1
  118. package/dist/modules/utils/time.cjs +1 -1
  119. package/dist/modules/utils/time.js +1 -1
  120. package/dist/modules/waapi/composition.cjs +1 -1
  121. package/dist/modules/waapi/composition.js +1 -1
  122. package/dist/modules/waapi/index.cjs +1 -1
  123. package/dist/modules/waapi/index.js +1 -1
  124. package/dist/modules/waapi/waapi.cjs +1 -1
  125. package/dist/modules/waapi/waapi.js +1 -1
  126. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animatable - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animatable - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animatable - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animatable - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - animation - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -79,7 +79,7 @@ const globals = {
79
79
  editor: null,
80
80
  };
81
81
 
82
- const globalVersions = { version: '4.4.0', engine: null };
82
+ const globalVersions = { version: '4.4.1', engine: null };
83
83
 
84
84
  if (consts.isBrowser) {
85
85
  if (!consts.win.AnimeJS) consts.win.AnimeJS = [];
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -77,7 +77,7 @@ const globals = {
77
77
  editor: null,
78
78
  };
79
79
 
80
- const globalVersions = { version: '4.4.0', engine: null };
80
+ const globalVersions = { version: '4.4.1', engine: null };
81
81
 
82
82
  if (isBrowser) {
83
83
  if (!win.AnimeJS) win.AnimeJS = [];
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -291,50 +291,6 @@ const render = (tickable, time, muteCallbacks, internalRender, tickMode) => {
291
291
  return hasRendered;
292
292
  };
293
293
 
294
- // Shared context for extracted forEachChildren callbacks in tick()
295
- // Avoids closure allocation every frame
296
-
297
- let renderCtxChildrenTime = 0;
298
- let renderCtxTlFps = 0;
299
- let renderCtxTickTime = 0;
300
- let renderCtxTickMode = 0;
301
- let renderCtxMuteCallbacks = 0;
302
- let renderCtxInternalRender = 0;
303
- let renderCtxChildrenHasRendered = 0;
304
- let renderCtxChildrenHaveCompleted = true;
305
- let loopCtxIsRunningBackwards = false;
306
- let loopCtxIterationDuration = 0;
307
- let loopCtxMuteCallbacks = 0;
308
-
309
- /** @param {JSAnimation} child */
310
- const tickLoopChild = (child) => {
311
- if (!loopCtxIsRunningBackwards) {
312
- // Force an internal render to trigger the callbacks if the child has not completed on loop
313
- if (!child.completed && !child.backwards && child._currentTime < child.iterationDuration) {
314
- render(child, loopCtxIterationDuration, loopCtxMuteCallbacks, 1, consts.tickModes.FORCE);
315
- }
316
- // Reset their began and completed flags to allow retrigering callbacks on the next iteration
317
- child.began = false;
318
- child.completed = false;
319
- } else {
320
- const childDuration = child.duration;
321
- const childStartTime = child._offset + child._delay;
322
- const childEndTime = childStartTime + childDuration;
323
- // Triggers the onComplete callback on reverse for children on the edges of the timeline
324
- if (!loopCtxMuteCallbacks && childDuration <= consts.minValue && (!childStartTime || childEndTime === loopCtxIterationDuration)) {
325
- child.onComplete(child);
326
- }
327
- }
328
- };
329
-
330
- /** @param {JSAnimation} child */
331
- const tickRenderChild = (child) => {
332
- const childTime = helpers.round((renderCtxChildrenTime - child._offset) * child._speed, 12); // Rounding is needed when using seconds
333
- const childTickMode = child._fps < renderCtxTlFps ? child.requestTick(renderCtxTickTime) : renderCtxTickMode;
334
- renderCtxChildrenHasRendered += render(child, childTime, renderCtxMuteCallbacks, renderCtxInternalRender, childTickMode);
335
- if (!child.completed && renderCtxChildrenHaveCompleted) renderCtxChildrenHaveCompleted = false;
336
- };
337
-
338
294
  /**
339
295
  * @param {Tickable} tickable
340
296
  * @param {Number} time
@@ -351,28 +307,42 @@ const tick = (tickable, time, muteCallbacks, internalRender, tickMode) => {
351
307
  const tlIsRunningBackwards = tl.backwards;
352
308
  const tlChildrenTime = internalRender ? time : tl._iterationTime;
353
309
  const tlCildrenTickTime = helpers.now();
310
+
354
311
  let tlChildrenHasRendered = 0;
355
312
  let tlChildrenHaveCompleted = true;
313
+
356
314
  // If the timeline has looped forward, we need to manually triggers children skipped callbacks
357
315
  if (!internalRender && tl._currentIteration !== _currentIteration) {
358
316
  const tlIterationDuration = tl.iterationDuration;
359
- loopCtxIsRunningBackwards = tlIsRunningBackwards;
360
- loopCtxIterationDuration = tlIterationDuration;
361
- loopCtxMuteCallbacks = muteCallbacks;
362
- helpers.forEachChildren(tl, tickLoopChild);
317
+ helpers.forEachChildren(tl, (/** @type {JSAnimation} */child) => {
318
+ if (!tlIsRunningBackwards) {
319
+ // Force an internal render to trigger the callbacks if the child has not completed on loop
320
+ if (!child.completed && !child.backwards && child._currentTime < child.iterationDuration) {
321
+ render(child, tlIterationDuration, muteCallbacks, 1, consts.tickModes.FORCE);
322
+ }
323
+ // Reset their began and completed flags to allow retrigering callbacks on the next iteration
324
+ child.began = false;
325
+ child.completed = false;
326
+ } else {
327
+ const childDuration = child.duration;
328
+ const childStartTime = child._offset + child._delay;
329
+ const childEndTime = childStartTime + childDuration;
330
+ // Triggers the onComplete callback on reverse for children on the edges of the timeline
331
+ if (!muteCallbacks && childDuration <= consts.minValue && (!childStartTime || childEndTime === tlIterationDuration)) {
332
+ child.onComplete(child);
333
+ }
334
+ }
335
+ });
363
336
  if (!muteCallbacks) tl.onLoop(/** @type {CallbackArgument} */(tl));
364
337
  }
365
- renderCtxChildrenTime = tlChildrenTime;
366
- renderCtxTlFps = tl._fps;
367
- renderCtxTickTime = tlCildrenTickTime;
368
- renderCtxTickMode = tickMode;
369
- renderCtxMuteCallbacks = muteCallbacks;
370
- renderCtxInternalRender = internalRender;
371
- renderCtxChildrenHasRendered = 0;
372
- renderCtxChildrenHaveCompleted = true;
373
- helpers.forEachChildren(tl, tickRenderChild, tlIsRunningBackwards);
374
- tlChildrenHasRendered = renderCtxChildrenHasRendered;
375
- tlChildrenHaveCompleted = renderCtxChildrenHaveCompleted;
338
+
339
+ helpers.forEachChildren(tl, (/** @type {JSAnimation} */child) => {
340
+ const childTime = helpers.round((tlChildrenTime - child._offset) * child._speed, 12); // Rounding is needed when using seconds
341
+ const childTickMode = child._fps < tl._fps ? child.requestTick(tlCildrenTickTime) : tickMode;
342
+ tlChildrenHasRendered += render(child, childTime, muteCallbacks, internalRender, childTickMode);
343
+ if (!child.completed && tlChildrenHaveCompleted) tlChildrenHaveCompleted = false;
344
+ }, tlIsRunningBackwards);
345
+
376
346
  // Renders on timeline are triggered by its children so it needs to be set after rendering the children
377
347
  if (!muteCallbacks && tlChildrenHasRendered) tl.onRender(/** @type {CallbackArgument} */(tl));
378
348
  // Triggers the timeline onComplete() once all chindren all completed and the current time has reached the end
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
7
7
 
8
8
  import { globals } from './globals.js';
9
- import { tickModes, valueTypes, compositionTypes, tweenTypes, transformsSymbol, minValue } from './consts.js';
10
- import { forEachChildren, clamp, round, lerp, now } from './helpers.js';
9
+ import { minValue, tickModes, valueTypes, compositionTypes, tweenTypes, transformsSymbol } from './consts.js';
10
+ import { forEachChildren, round, now, clamp, lerp } from './helpers.js';
11
11
  import { buildTransformString } from './transforms.js';
12
12
  import { composeColorValue, composeComplexValue } from './values.js';
13
13
 
@@ -289,50 +289,6 @@ const render = (tickable, time, muteCallbacks, internalRender, tickMode) => {
289
289
  return hasRendered;
290
290
  };
291
291
 
292
- // Shared context for extracted forEachChildren callbacks in tick()
293
- // Avoids closure allocation every frame
294
-
295
- let renderCtxChildrenTime = 0;
296
- let renderCtxTlFps = 0;
297
- let renderCtxTickTime = 0;
298
- let renderCtxTickMode = 0;
299
- let renderCtxMuteCallbacks = 0;
300
- let renderCtxInternalRender = 0;
301
- let renderCtxChildrenHasRendered = 0;
302
- let renderCtxChildrenHaveCompleted = true;
303
- let loopCtxIsRunningBackwards = false;
304
- let loopCtxIterationDuration = 0;
305
- let loopCtxMuteCallbacks = 0;
306
-
307
- /** @param {JSAnimation} child */
308
- const tickLoopChild = (child) => {
309
- if (!loopCtxIsRunningBackwards) {
310
- // Force an internal render to trigger the callbacks if the child has not completed on loop
311
- if (!child.completed && !child.backwards && child._currentTime < child.iterationDuration) {
312
- render(child, loopCtxIterationDuration, loopCtxMuteCallbacks, 1, tickModes.FORCE);
313
- }
314
- // Reset their began and completed flags to allow retrigering callbacks on the next iteration
315
- child.began = false;
316
- child.completed = false;
317
- } else {
318
- const childDuration = child.duration;
319
- const childStartTime = child._offset + child._delay;
320
- const childEndTime = childStartTime + childDuration;
321
- // Triggers the onComplete callback on reverse for children on the edges of the timeline
322
- if (!loopCtxMuteCallbacks && childDuration <= minValue && (!childStartTime || childEndTime === loopCtxIterationDuration)) {
323
- child.onComplete(child);
324
- }
325
- }
326
- };
327
-
328
- /** @param {JSAnimation} child */
329
- const tickRenderChild = (child) => {
330
- const childTime = round((renderCtxChildrenTime - child._offset) * child._speed, 12); // Rounding is needed when using seconds
331
- const childTickMode = child._fps < renderCtxTlFps ? child.requestTick(renderCtxTickTime) : renderCtxTickMode;
332
- renderCtxChildrenHasRendered += render(child, childTime, renderCtxMuteCallbacks, renderCtxInternalRender, childTickMode);
333
- if (!child.completed && renderCtxChildrenHaveCompleted) renderCtxChildrenHaveCompleted = false;
334
- };
335
-
336
292
  /**
337
293
  * @param {Tickable} tickable
338
294
  * @param {Number} time
@@ -349,28 +305,42 @@ const tick = (tickable, time, muteCallbacks, internalRender, tickMode) => {
349
305
  const tlIsRunningBackwards = tl.backwards;
350
306
  const tlChildrenTime = internalRender ? time : tl._iterationTime;
351
307
  const tlCildrenTickTime = now();
308
+
352
309
  let tlChildrenHasRendered = 0;
353
310
  let tlChildrenHaveCompleted = true;
311
+
354
312
  // If the timeline has looped forward, we need to manually triggers children skipped callbacks
355
313
  if (!internalRender && tl._currentIteration !== _currentIteration) {
356
314
  const tlIterationDuration = tl.iterationDuration;
357
- loopCtxIsRunningBackwards = tlIsRunningBackwards;
358
- loopCtxIterationDuration = tlIterationDuration;
359
- loopCtxMuteCallbacks = muteCallbacks;
360
- forEachChildren(tl, tickLoopChild);
315
+ forEachChildren(tl, (/** @type {JSAnimation} */child) => {
316
+ if (!tlIsRunningBackwards) {
317
+ // Force an internal render to trigger the callbacks if the child has not completed on loop
318
+ if (!child.completed && !child.backwards && child._currentTime < child.iterationDuration) {
319
+ render(child, tlIterationDuration, muteCallbacks, 1, tickModes.FORCE);
320
+ }
321
+ // Reset their began and completed flags to allow retrigering callbacks on the next iteration
322
+ child.began = false;
323
+ child.completed = false;
324
+ } else {
325
+ const childDuration = child.duration;
326
+ const childStartTime = child._offset + child._delay;
327
+ const childEndTime = childStartTime + childDuration;
328
+ // Triggers the onComplete callback on reverse for children on the edges of the timeline
329
+ if (!muteCallbacks && childDuration <= minValue && (!childStartTime || childEndTime === tlIterationDuration)) {
330
+ child.onComplete(child);
331
+ }
332
+ }
333
+ });
361
334
  if (!muteCallbacks) tl.onLoop(/** @type {CallbackArgument} */(tl));
362
335
  }
363
- renderCtxChildrenTime = tlChildrenTime;
364
- renderCtxTlFps = tl._fps;
365
- renderCtxTickTime = tlCildrenTickTime;
366
- renderCtxTickMode = tickMode;
367
- renderCtxMuteCallbacks = muteCallbacks;
368
- renderCtxInternalRender = internalRender;
369
- renderCtxChildrenHasRendered = 0;
370
- renderCtxChildrenHaveCompleted = true;
371
- forEachChildren(tl, tickRenderChild, tlIsRunningBackwards);
372
- tlChildrenHasRendered = renderCtxChildrenHasRendered;
373
- tlChildrenHaveCompleted = renderCtxChildrenHaveCompleted;
336
+
337
+ forEachChildren(tl, (/** @type {JSAnimation} */child) => {
338
+ const childTime = round((tlChildrenTime - child._offset) * child._speed, 12); // Rounding is needed when using seconds
339
+ const childTickMode = child._fps < tl._fps ? child.requestTick(tlCildrenTickTime) : tickMode;
340
+ tlChildrenHasRendered += render(child, childTime, muteCallbacks, internalRender, childTickMode);
341
+ if (!child.completed && tlChildrenHaveCompleted) tlChildrenHaveCompleted = false;
342
+ }, tlIsRunningBackwards);
343
+
374
344
  // Renders on timeline are triggered by its children so it needs to be set after rendering the children
375
345
  if (!muteCallbacks && tlChildrenHasRendered) tl.onRender(/** @type {CallbackArgument} */(tl));
376
346
  // Triggers the timeline onComplete() once all chindren all completed and the current time has reached the end
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - draggable - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - draggable - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - draggable - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - draggable - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - ESM
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - easings - CJS
3
- * @version v4.4.0
3
+ * @version v4.4.1
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */