animejs 4.4.0 → 4.5.0

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 (165) hide show
  1. package/README.md +4 -5
  2. package/dist/bundles/anime.esm.js +491 -272
  3. package/dist/bundles/anime.esm.min.js +2 -2
  4. package/dist/bundles/anime.umd.js +491 -272
  5. package/dist/bundles/anime.umd.min.js +2 -2
  6. package/dist/modules/adapters/index.cjs +14 -0
  7. package/dist/modules/adapters/index.d.ts +1 -0
  8. package/dist/modules/adapters/index.js +8 -0
  9. package/dist/modules/adapters/registry.cjs +149 -0
  10. package/dist/modules/adapters/registry.d.ts +65 -0
  11. package/dist/modules/adapters/registry.js +146 -0
  12. package/dist/modules/adapters/three/adapter.cjs +26 -0
  13. package/dist/modules/adapters/three/adapter.d.ts +15 -0
  14. package/dist/modules/adapters/three/adapter.js +24 -0
  15. package/dist/modules/adapters/three/helpers.cjs +297 -0
  16. package/dist/modules/adapters/three/helpers.d.ts +89 -0
  17. package/dist/modules/adapters/three/helpers.js +280 -0
  18. package/dist/modules/adapters/three/index.cjs +20 -0
  19. package/dist/modules/adapters/three/index.d.ts +2 -0
  20. package/dist/modules/adapters/three/index.js +12 -0
  21. package/dist/modules/adapters/three/instance.cjs +368 -0
  22. package/dist/modules/adapters/three/instance.d.ts +133 -0
  23. package/dist/modules/adapters/three/instance.js +365 -0
  24. package/dist/modules/adapters/three/object3d.cjs +214 -0
  25. package/dist/modules/adapters/three/object3d.d.ts +1 -0
  26. package/dist/modules/adapters/three/object3d.js +212 -0
  27. package/dist/modules/adapters/three/resolvers.cjs +105 -0
  28. package/dist/modules/adapters/three/resolvers.d.ts +1 -0
  29. package/dist/modules/adapters/three/resolvers.js +103 -0
  30. package/dist/modules/adapters/three/uniform.cjs +41 -0
  31. package/dist/modules/adapters/three/uniform.d.ts +1 -0
  32. package/dist/modules/adapters/three/uniform.js +39 -0
  33. package/dist/modules/animatable/animatable.cjs +2 -1
  34. package/dist/modules/animatable/animatable.d.ts +2 -1
  35. package/dist/modules/animatable/animatable.js +2 -1
  36. package/dist/modules/animatable/index.cjs +1 -1
  37. package/dist/modules/animatable/index.js +1 -1
  38. package/dist/modules/animation/additive.cjs +1 -1
  39. package/dist/modules/animation/additive.js +1 -1
  40. package/dist/modules/animation/animation.cjs +43 -16
  41. package/dist/modules/animation/animation.d.ts +5 -0
  42. package/dist/modules/animation/animation.js +45 -18
  43. package/dist/modules/animation/composition.cjs +38 -35
  44. package/dist/modules/animation/composition.js +38 -35
  45. package/dist/modules/animation/index.cjs +1 -1
  46. package/dist/modules/animation/index.js +1 -1
  47. package/dist/modules/core/clock.cjs +11 -15
  48. package/dist/modules/core/clock.d.ts +0 -2
  49. package/dist/modules/core/clock.js +11 -15
  50. package/dist/modules/core/colors.cjs +1 -1
  51. package/dist/modules/core/colors.js +1 -1
  52. package/dist/modules/core/consts.cjs +15 -1
  53. package/dist/modules/core/consts.d.ts +2 -0
  54. package/dist/modules/core/consts.js +14 -2
  55. package/dist/modules/core/globals.cjs +7 -4
  56. package/dist/modules/core/globals.d.ts +8 -2
  57. package/dist/modules/core/globals.js +8 -5
  58. package/dist/modules/core/helpers.cjs +2 -2
  59. package/dist/modules/core/helpers.js +3 -3
  60. package/dist/modules/core/render.cjs +93 -73
  61. package/dist/modules/core/render.js +96 -76
  62. package/dist/modules/core/styles.cjs +16 -2
  63. package/dist/modules/core/styles.js +16 -2
  64. package/dist/modules/core/targets.cjs +11 -13
  65. package/dist/modules/core/targets.js +11 -13
  66. package/dist/modules/core/transforms.cjs +1 -1
  67. package/dist/modules/core/transforms.js +1 -1
  68. package/dist/modules/core/units.cjs +1 -1
  69. package/dist/modules/core/units.js +1 -1
  70. package/dist/modules/core/values.cjs +73 -82
  71. package/dist/modules/core/values.d.ts +1 -2
  72. package/dist/modules/core/values.js +76 -84
  73. package/dist/modules/draggable/draggable.cjs +1 -1
  74. package/dist/modules/draggable/draggable.js +1 -1
  75. package/dist/modules/draggable/index.cjs +1 -1
  76. package/dist/modules/draggable/index.js +1 -1
  77. package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
  78. package/dist/modules/easings/cubic-bezier/index.js +1 -1
  79. package/dist/modules/easings/eases/index.cjs +1 -1
  80. package/dist/modules/easings/eases/index.js +1 -1
  81. package/dist/modules/easings/eases/parser.cjs +3 -3
  82. package/dist/modules/easings/eases/parser.d.ts +4 -5
  83. package/dist/modules/easings/eases/parser.js +3 -3
  84. package/dist/modules/easings/index.cjs +1 -1
  85. package/dist/modules/easings/index.js +1 -1
  86. package/dist/modules/easings/irregular/index.cjs +1 -1
  87. package/dist/modules/easings/irregular/index.js +1 -1
  88. package/dist/modules/easings/linear/index.cjs +1 -1
  89. package/dist/modules/easings/linear/index.js +1 -1
  90. package/dist/modules/easings/none.cjs +1 -1
  91. package/dist/modules/easings/none.js +1 -1
  92. package/dist/modules/easings/spring/index.cjs +1 -1
  93. package/dist/modules/easings/spring/index.js +1 -1
  94. package/dist/modules/easings/steps/index.cjs +1 -1
  95. package/dist/modules/easings/steps/index.js +1 -1
  96. package/dist/modules/engine/engine.cjs +4 -2
  97. package/dist/modules/engine/engine.js +4 -2
  98. package/dist/modules/engine/index.cjs +1 -1
  99. package/dist/modules/engine/index.js +1 -1
  100. package/dist/modules/events/index.cjs +1 -1
  101. package/dist/modules/events/index.js +1 -1
  102. package/dist/modules/events/scroll.cjs +3 -1
  103. package/dist/modules/events/scroll.js +3 -1
  104. package/dist/modules/index.cjs +1 -1
  105. package/dist/modules/index.js +1 -1
  106. package/dist/modules/layout/index.cjs +1 -1
  107. package/dist/modules/layout/index.js +1 -1
  108. package/dist/modules/layout/layout.cjs +1 -1
  109. package/dist/modules/layout/layout.js +1 -1
  110. package/dist/modules/scope/index.cjs +1 -1
  111. package/dist/modules/scope/index.js +1 -1
  112. package/dist/modules/scope/scope.cjs +1 -1
  113. package/dist/modules/scope/scope.js +1 -1
  114. package/dist/modules/svg/drawable.cjs +1 -1
  115. package/dist/modules/svg/drawable.js +1 -1
  116. package/dist/modules/svg/helpers.cjs +1 -1
  117. package/dist/modules/svg/helpers.js +1 -1
  118. package/dist/modules/svg/index.cjs +1 -1
  119. package/dist/modules/svg/index.js +1 -1
  120. package/dist/modules/svg/morphto.cjs +1 -1
  121. package/dist/modules/svg/morphto.js +1 -1
  122. package/dist/modules/svg/motionpath.cjs +1 -1
  123. package/dist/modules/svg/motionpath.js +1 -1
  124. package/dist/modules/text/index.cjs +1 -1
  125. package/dist/modules/text/index.js +1 -1
  126. package/dist/modules/text/scramble.cjs +12 -2
  127. package/dist/modules/text/scramble.d.ts +9 -1
  128. package/dist/modules/text/scramble.js +12 -2
  129. package/dist/modules/text/split.cjs +2 -1
  130. package/dist/modules/text/split.js +2 -1
  131. package/dist/modules/timeline/index.cjs +1 -1
  132. package/dist/modules/timeline/index.js +1 -1
  133. package/dist/modules/timeline/position.cjs +1 -1
  134. package/dist/modules/timeline/position.js +1 -1
  135. package/dist/modules/timeline/timeline.cjs +14 -5
  136. package/dist/modules/timeline/timeline.d.ts +3 -3
  137. package/dist/modules/timeline/timeline.js +14 -5
  138. package/dist/modules/timer/index.cjs +1 -1
  139. package/dist/modules/timer/index.js +1 -1
  140. package/dist/modules/timer/timer.cjs +1 -1
  141. package/dist/modules/timer/timer.js +1 -1
  142. package/dist/modules/types/index.d.ts +36 -11
  143. package/dist/modules/utils/chainable.cjs +1 -1
  144. package/dist/modules/utils/chainable.js +1 -1
  145. package/dist/modules/utils/index.cjs +1 -1
  146. package/dist/modules/utils/index.js +1 -1
  147. package/dist/modules/utils/number.cjs +1 -1
  148. package/dist/modules/utils/number.js +1 -1
  149. package/dist/modules/utils/random.cjs +4 -3
  150. package/dist/modules/utils/random.d.ts +1 -1
  151. package/dist/modules/utils/random.js +4 -3
  152. package/dist/modules/utils/stagger.cjs +67 -13
  153. package/dist/modules/utils/stagger.js +69 -15
  154. package/dist/modules/utils/target.cjs +4 -1
  155. package/dist/modules/utils/target.js +4 -1
  156. package/dist/modules/utils/time.cjs +6 -5
  157. package/dist/modules/utils/time.d.ts +1 -1
  158. package/dist/modules/utils/time.js +6 -5
  159. package/dist/modules/waapi/composition.cjs +1 -1
  160. package/dist/modules/waapi/composition.js +1 -1
  161. package/dist/modules/waapi/index.cjs +1 -1
  162. package/dist/modules/waapi/index.js +1 -1
  163. package/dist/modules/waapi/waapi.cjs +1 -1
  164. package/dist/modules/waapi/waapi.js +1 -1
  165. package/package.json +38 -5
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.5.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -36,8 +36,6 @@ class Clock {
36
36
  /** @type {Number} */
37
37
  this._lastTime = initTime;
38
38
  /** @type {Number} */
39
- this._scheduledTime = 0;
40
- /** @type {Number} */
41
39
  this._frameDuration = consts.K / consts.maxFps;
42
40
  /** @type {Number} */
43
41
  this._fps = consts.maxFps;
@@ -56,14 +54,12 @@ class Clock {
56
54
  }
57
55
 
58
56
  set fps(frameRate) {
59
- const previousFrameDuration = this._frameDuration;
60
57
  const fr = +frameRate;
61
58
  const fps = fr < consts.minValue ? consts.minValue : fr;
62
59
  const frameDuration = consts.K / fps;
63
60
  if (fps > globals.defaults.frameRate) globals.defaults.frameRate = fps;
64
61
  this._fps = fps;
65
62
  this._frameDuration = frameDuration;
66
- this._scheduledTime += frameDuration - previousFrameDuration;
67
63
  }
68
64
 
69
65
  get speed() {
@@ -80,17 +76,17 @@ class Clock {
80
76
  * @return {tickModes}
81
77
  */
82
78
  requestTick(time) {
83
- const scheduledTime = this._scheduledTime;
84
- this._lastTickTime = time;
85
- // If the current time is lower than the scheduled time
86
- // this means not enough time has passed to hit one frameDuration
87
- // so skip that frame
88
- if (time < scheduledTime) return consts.tickModes.NONE;
89
79
  const frameDuration = this._frameDuration;
90
- const frameDelta = time - scheduledTime;
91
- // Ensures that _scheduledTime progresses in steps of at least 1 frameDuration.
92
- // Skips ahead if the actual elapsed time is higher.
93
- this._scheduledTime += frameDelta < frameDuration ? frameDuration : frameDelta;
80
+ const elapsed = time - this._lastTickTime;
81
+ const scaled = frameDuration * .25;
82
+ const tolerance = scaled < 4 ? scaled : 4;
83
+ // Tolerance prevents dropping frames that arrive a bit early due to RAF jitter
84
+ // typically <= ~25% of frame duration and capped at 4ms so it doesn't dominate at high fps.
85
+ // e.g. at 60fps (frameDuration=16.667ms) a frame arriving after 15ms:
86
+ // - without tolerance: 15 < 16.667 -> skip
87
+ // - with tolerance: 15 + 4 >= 16.667 -> tick
88
+ if (elapsed + tolerance < frameDuration) return consts.tickModes.NONE;
89
+ this._lastTickTime = elapsed >= frameDuration ? time - (elapsed % frameDuration) : time;
94
90
  return consts.tickModes.AUTO;
95
91
  }
96
92
 
@@ -18,8 +18,6 @@ export class Clock {
18
18
  /** @type {Number} */
19
19
  _lastTime: number;
20
20
  /** @type {Number} */
21
- _scheduledTime: number;
22
- /** @type {Number} */
23
21
  _frameDuration: number;
24
22
  /** @type {Number} */
25
23
  _fps: number;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.5.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -34,8 +34,6 @@ class Clock {
34
34
  /** @type {Number} */
35
35
  this._lastTime = initTime;
36
36
  /** @type {Number} */
37
- this._scheduledTime = 0;
38
- /** @type {Number} */
39
37
  this._frameDuration = K / maxFps;
40
38
  /** @type {Number} */
41
39
  this._fps = maxFps;
@@ -54,14 +52,12 @@ class Clock {
54
52
  }
55
53
 
56
54
  set fps(frameRate) {
57
- const previousFrameDuration = this._frameDuration;
58
55
  const fr = +frameRate;
59
56
  const fps = fr < minValue ? minValue : fr;
60
57
  const frameDuration = K / fps;
61
58
  if (fps > defaults.frameRate) defaults.frameRate = fps;
62
59
  this._fps = fps;
63
60
  this._frameDuration = frameDuration;
64
- this._scheduledTime += frameDuration - previousFrameDuration;
65
61
  }
66
62
 
67
63
  get speed() {
@@ -78,17 +74,17 @@ class Clock {
78
74
  * @return {tickModes}
79
75
  */
80
76
  requestTick(time) {
81
- const scheduledTime = this._scheduledTime;
82
- this._lastTickTime = time;
83
- // If the current time is lower than the scheduled time
84
- // this means not enough time has passed to hit one frameDuration
85
- // so skip that frame
86
- if (time < scheduledTime) return tickModes.NONE;
87
77
  const frameDuration = this._frameDuration;
88
- const frameDelta = time - scheduledTime;
89
- // Ensures that _scheduledTime progresses in steps of at least 1 frameDuration.
90
- // Skips ahead if the actual elapsed time is higher.
91
- this._scheduledTime += frameDelta < frameDuration ? frameDuration : frameDelta;
78
+ const elapsed = time - this._lastTickTime;
79
+ const scaled = frameDuration * .25;
80
+ const tolerance = scaled < 4 ? scaled : 4;
81
+ // Tolerance prevents dropping frames that arrive a bit early due to RAF jitter
82
+ // typically <= ~25% of frame duration and capped at 4ms so it doesn't dominate at high fps.
83
+ // e.g. at 60fps (frameDuration=16.667ms) a frame arriving after 15ms:
84
+ // - without tolerance: 15 < 16.667 -> skip
85
+ // - with tolerance: 15 + 4 >= 16.667 -> tick
86
+ if (elapsed + tolerance < frameDuration) return tickModes.NONE;
87
+ this._lastTickTime = elapsed >= frameDuration ? time - (elapsed % frameDuration) : time;
92
88
  return tickModes.AUTO;
93
89
  }
94
90
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.5.0
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.5.0
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.5.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -73,6 +73,11 @@ const maxFps = 240;
73
73
  const emptyString = '';
74
74
  const cssVarPrefix = 'var(';
75
75
 
76
+ // Arrays
77
+
78
+ // Shared sentinel for tween slots that don't hold array data. Never mutated, only read; COMPLEX and COLOR tweens always replace the slot before writing.
79
+ const emptyArray = [];
80
+
76
81
  const shortTransforms = /*#__PURE__*/ (() => {
77
82
  const map = new Map();
78
83
  map.set('x', 'translateX');
@@ -106,6 +111,13 @@ const transformsFragmentStrings = /*#__PURE__*/ validTransforms.reduce((a, v) =>
106
111
  /** @return {void} */
107
112
  const noop = () => {};
108
113
 
114
+ /**
115
+ * @template T
116
+ * @param {T} v
117
+ * @return {T}
118
+ */
119
+ const noopModifier = v => v;
120
+
109
121
  // Regex
110
122
 
111
123
  const validRgbHslRgx = /\)\s*[-.\d]/;
@@ -128,6 +140,7 @@ exports.cssVarPrefix = cssVarPrefix;
128
140
  exports.cssVariableMatchRgx = cssVariableMatchRgx;
129
141
  exports.digitWithExponentRgx = digitWithExponentRgx;
130
142
  exports.doc = doc;
143
+ exports.emptyArray = emptyArray;
131
144
  exports.emptyString = emptyString;
132
145
  exports.hexTestRgx = hexTestRgx;
133
146
  exports.hslExecRgx = hslExecRgx;
@@ -141,6 +154,7 @@ exports.maxFps = maxFps;
141
154
  exports.maxValue = maxValue;
142
155
  exports.minValue = minValue;
143
156
  exports.noop = noop;
157
+ exports.noopModifier = noopModifier;
144
158
  exports.proxyTargetSymbol = proxyTargetSymbol;
145
159
  exports.relativeValuesExecRgx = relativeValuesExecRgx;
146
160
  exports.rgbExecRgx = rgbExecRgx;
@@ -43,10 +43,12 @@ export const K: 1000;
43
43
  export const maxFps: 240;
44
44
  export const emptyString: "";
45
45
  export const cssVarPrefix: "var(";
46
+ export const emptyArray: any[];
46
47
  export const shortTransforms: Map<any, any>;
47
48
  export const validTransforms: string[];
48
49
  export const transformsFragmentStrings: {};
49
50
  export function noop(): void;
51
+ export function noopModifier<T>(v: T): T;
50
52
  export const validRgbHslRgx: RegExp;
51
53
  export const hexTestRgx: RegExp;
52
54
  export const rgbExecRgx: RegExp;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.5.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -71,6 +71,11 @@ const maxFps = 240;
71
71
  const emptyString = '';
72
72
  const cssVarPrefix = 'var(';
73
73
 
74
+ // Arrays
75
+
76
+ // Shared sentinel for tween slots that don't hold array data. Never mutated, only read; COMPLEX and COLOR tweens always replace the slot before writing.
77
+ const emptyArray = [];
78
+
74
79
  const shortTransforms = /*#__PURE__*/ (() => {
75
80
  const map = new Map();
76
81
  map.set('x', 'translateX');
@@ -104,6 +109,13 @@ const transformsFragmentStrings = /*#__PURE__*/ validTransforms.reduce((a, v) =>
104
109
  /** @return {void} */
105
110
  const noop = () => {};
106
111
 
112
+ /**
113
+ * @template T
114
+ * @param {T} v
115
+ * @return {T}
116
+ */
117
+ const noopModifier = v => v;
118
+
107
119
  // Regex
108
120
 
109
121
  const validRgbHslRgx = /\)\s*[-.\d]/;
@@ -120,4 +132,4 @@ const lowerCaseRgx = /([a-z])([A-Z])/g;
120
132
  const relativeValuesExecRgx = /(\*=|\+=|-=)/;
121
133
  const cssVariableMatchRgx = /var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/;
122
134
 
123
- export { K, compositionTypes, cssVarPrefix, cssVariableMatchRgx, digitWithExponentRgx, doc, emptyString, hexTestRgx, hslExecRgx, hslaExecRgx, isBrowser, isDomSymbol, isRegisteredTargetSymbol, isSvgSymbol, lowerCaseRgx, maxFps, maxValue, minValue, noop, proxyTargetSymbol, relativeValuesExecRgx, rgbExecRgx, rgbaExecRgx, shortTransforms, tickModes, transformsFragmentStrings, transformsSymbol, tweenTypes, unitsExecRgx, validRgbHslRgx, validTransforms, valueTypes, win };
135
+ export { K, compositionTypes, cssVarPrefix, cssVariableMatchRgx, digitWithExponentRgx, doc, emptyArray, emptyString, hexTestRgx, hslExecRgx, hslaExecRgx, isBrowser, isDomSymbol, isRegisteredTargetSymbol, isSvgSymbol, lowerCaseRgx, maxFps, maxValue, minValue, noop, noopModifier, proxyTargetSymbol, relativeValuesExecRgx, rgbExecRgx, rgbaExecRgx, shortTransforms, tickModes, transformsFragmentStrings, transformsSymbol, tweenTypes, unitsExecRgx, validRgbHslRgx, validTransforms, valueTypes, win };
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Anime.js - core - CJS
3
- * @version v4.4.0
3
+ * @version v4.5.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -23,10 +23,13 @@ var consts = require('./consts.cjs');
23
23
  /**
24
24
  * @typedef {Object} EditorGlobals
25
25
  * @property {boolean} showPanel
26
- * @property {boolean} synced
27
26
  * @property {Function} addAnimation
27
+ * @property {Function} addSet
28
28
  * @property {Function} addTimeline
29
29
  * @property {Function} addTimelineChild
30
+ * @property {Function} addTimelineLabel
31
+ * @property {Function} addTimelineCall
32
+ * @property {Function} addTimelineSync
30
33
  * @property {Function} resolveStagger
31
34
  * @property {Object|null} _head
32
35
  * @property {Object|null} _tail
@@ -49,7 +52,7 @@ const defaults = {
49
52
  loopDelay: 0,
50
53
  ease: 'out(2)',
51
54
  composition: consts.compositionTypes.replace,
52
- modifier: v => v,
55
+ modifier: consts.noopModifier,
53
56
  onBegin: consts.noop,
54
57
  onBeforeUpdate: consts.noop,
55
58
  onUpdate: consts.noop,
@@ -79,7 +82,7 @@ const globals = {
79
82
  editor: null,
80
83
  };
81
84
 
82
- const globalVersions = { version: '4.4.0', engine: null };
85
+ const globalVersions = { version: '4.5.0', engine: null };
83
86
 
84
87
  if (consts.isBrowser) {
85
88
  if (!consts.win.AnimeJS) consts.win.AnimeJS = [];
@@ -11,10 +11,13 @@
11
11
  /**
12
12
  * @typedef {Object} EditorGlobals
13
13
  * @property {boolean} showPanel
14
- * @property {boolean} synced
15
14
  * @property {Function} addAnimation
15
+ * @property {Function} addSet
16
16
  * @property {Function} addTimeline
17
17
  * @property {Function} addTimelineChild
18
+ * @property {Function} addTimelineLabel
19
+ * @property {Function} addTimelineCall
20
+ * @property {Function} addTimelineSync
18
21
  * @property {Function} resolveStagger
19
22
  * @property {Object|null} _head
20
23
  * @property {Object|null} _tail
@@ -38,10 +41,13 @@ export namespace globalVersions {
38
41
  }
39
42
  export type EditorGlobals = {
40
43
  showPanel: boolean;
41
- synced: boolean;
42
44
  addAnimation: Function;
45
+ addSet: Function;
43
46
  addTimeline: Function;
44
47
  addTimelineChild: Function;
48
+ addTimelineLabel: Function;
49
+ addTimelineCall: Function;
50
+ addTimelineSync: Function;
45
51
  resolveStagger: Function;
46
52
  _head: any | null;
47
53
  _tail: any | null;
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.5.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
7
7
 
8
- import { isBrowser, win, noop, compositionTypes, K, maxFps, doc } from './consts.js';
8
+ import { isBrowser, win, noop, noopModifier, compositionTypes, K, maxFps, doc } from './consts.js';
9
9
 
10
10
  /**
11
11
  * @import {
@@ -21,10 +21,13 @@ import { isBrowser, win, noop, compositionTypes, K, maxFps, doc } from './consts
21
21
  /**
22
22
  * @typedef {Object} EditorGlobals
23
23
  * @property {boolean} showPanel
24
- * @property {boolean} synced
25
24
  * @property {Function} addAnimation
25
+ * @property {Function} addSet
26
26
  * @property {Function} addTimeline
27
27
  * @property {Function} addTimelineChild
28
+ * @property {Function} addTimelineLabel
29
+ * @property {Function} addTimelineCall
30
+ * @property {Function} addTimelineSync
28
31
  * @property {Function} resolveStagger
29
32
  * @property {Object|null} _head
30
33
  * @property {Object|null} _tail
@@ -47,7 +50,7 @@ const defaults = {
47
50
  loopDelay: 0,
48
51
  ease: 'out(2)',
49
52
  composition: compositionTypes.replace,
50
- modifier: v => v,
53
+ modifier: noopModifier,
51
54
  onBegin: noop,
52
55
  onBeforeUpdate: noop,
53
56
  onUpdate: noop,
@@ -77,7 +80,7 @@ const globals = {
77
80
  editor: null,
78
81
  };
79
82
 
80
- const globalVersions = { version: '4.4.0', engine: null };
83
+ const globalVersions = { version: '4.5.0', engine: null };
81
84
 
82
85
  if (isBrowser) {
83
86
  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.5.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
@@ -155,7 +155,7 @@ const snap = (v, increment) => isArr(increment) ? increment.reduce((closest, cv)
155
155
  * @param {Number} factor - Interpolation factor in the range [0, 1]
156
156
  * @return {Number} The interpolated value
157
157
  */
158
- const lerp = (start, end, factor) => start + (end - start) * factor;
158
+ const lerp = (start, end, factor) => factor === 1 ? end : factor === 0 ? start : start + (end - start) * factor;
159
159
 
160
160
  /**
161
161
  * Replaces infinity with maximum safe value
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Anime.js - core - ESM
3
- * @version v4.4.0
3
+ * @version v4.5.0
4
4
  * @license MIT
5
5
  * @copyright 2026 - Julian Garnier
6
6
  */
7
7
 
8
- import { isBrowser, maxValue, minValue, lowerCaseRgx, hexTestRgx, validRgbHslRgx } from './consts.js';
8
+ import { isBrowser, maxValue, minValue, hexTestRgx, lowerCaseRgx, validRgbHslRgx } from './consts.js';
9
9
  import { globals } from './globals.js';
10
10
 
11
11
  /**
@@ -153,7 +153,7 @@ const snap = (v, increment) => isArr(increment) ? increment.reduce((closest, cv)
153
153
  * @param {Number} factor - Interpolation factor in the range [0, 1]
154
154
  * @return {Number} The interpolated value
155
155
  */
156
- const lerp = (start, end, factor) => start + (end - start) * factor;
156
+ const lerp = (start, end, factor) => factor === 1 ? end : factor === 0 ? start : start + (end - start) * factor;
157
157
 
158
158
  /**
159
159
  * Replaces infinity with maximum safe value