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.
- package/README.md +2 -2
- package/dist/bundles/anime.esm.js +31 -61
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +31 -61
- package/dist/bundles/anime.umd.min.js +2 -2
- package/dist/modules/animatable/animatable.cjs +1 -1
- package/dist/modules/animatable/animatable.js +1 -1
- package/dist/modules/animatable/index.cjs +1 -1
- package/dist/modules/animatable/index.js +1 -1
- package/dist/modules/animation/additive.cjs +1 -1
- package/dist/modules/animation/additive.js +1 -1
- package/dist/modules/animation/animation.cjs +1 -1
- package/dist/modules/animation/animation.js +1 -1
- package/dist/modules/animation/composition.cjs +1 -1
- package/dist/modules/animation/composition.js +1 -1
- package/dist/modules/animation/index.cjs +1 -1
- package/dist/modules/animation/index.js +1 -1
- package/dist/modules/core/clock.cjs +1 -1
- package/dist/modules/core/clock.js +1 -1
- package/dist/modules/core/colors.cjs +1 -1
- package/dist/modules/core/colors.js +1 -1
- package/dist/modules/core/consts.cjs +1 -1
- package/dist/modules/core/consts.js +1 -1
- package/dist/modules/core/globals.cjs +2 -2
- package/dist/modules/core/globals.js +2 -2
- package/dist/modules/core/helpers.cjs +1 -1
- package/dist/modules/core/helpers.js +1 -1
- package/dist/modules/core/render.cjs +30 -60
- package/dist/modules/core/render.js +32 -62
- package/dist/modules/core/styles.cjs +1 -1
- package/dist/modules/core/styles.js +1 -1
- package/dist/modules/core/targets.cjs +1 -1
- package/dist/modules/core/targets.js +1 -1
- package/dist/modules/core/transforms.cjs +1 -1
- package/dist/modules/core/transforms.js +1 -1
- package/dist/modules/core/units.cjs +1 -1
- package/dist/modules/core/units.js +1 -1
- package/dist/modules/core/values.cjs +1 -1
- package/dist/modules/core/values.js +1 -1
- package/dist/modules/draggable/draggable.cjs +1 -1
- package/dist/modules/draggable/draggable.js +1 -1
- package/dist/modules/draggable/index.cjs +1 -1
- package/dist/modules/draggable/index.js +1 -1
- package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
- package/dist/modules/easings/cubic-bezier/index.js +1 -1
- package/dist/modules/easings/eases/index.cjs +1 -1
- package/dist/modules/easings/eases/index.js +1 -1
- package/dist/modules/easings/eases/parser.cjs +1 -1
- package/dist/modules/easings/eases/parser.js +1 -1
- package/dist/modules/easings/index.cjs +1 -1
- package/dist/modules/easings/index.js +1 -1
- package/dist/modules/easings/irregular/index.cjs +1 -1
- package/dist/modules/easings/irregular/index.js +1 -1
- package/dist/modules/easings/linear/index.cjs +1 -1
- package/dist/modules/easings/linear/index.js +1 -1
- package/dist/modules/easings/none.cjs +1 -1
- package/dist/modules/easings/none.js +1 -1
- package/dist/modules/easings/spring/index.cjs +1 -1
- package/dist/modules/easings/spring/index.js +1 -1
- package/dist/modules/easings/steps/index.cjs +1 -1
- package/dist/modules/easings/steps/index.js +1 -1
- package/dist/modules/engine/engine.cjs +1 -1
- package/dist/modules/engine/engine.js +1 -1
- package/dist/modules/engine/index.cjs +1 -1
- package/dist/modules/engine/index.js +1 -1
- package/dist/modules/events/index.cjs +1 -1
- package/dist/modules/events/index.js +1 -1
- package/dist/modules/events/scroll.cjs +1 -1
- package/dist/modules/events/scroll.js +1 -1
- package/dist/modules/index.cjs +1 -1
- package/dist/modules/index.js +1 -1
- package/dist/modules/layout/index.cjs +1 -1
- package/dist/modules/layout/index.js +1 -1
- package/dist/modules/layout/layout.cjs +1 -1
- package/dist/modules/layout/layout.js +1 -1
- package/dist/modules/scope/index.cjs +1 -1
- package/dist/modules/scope/index.js +1 -1
- package/dist/modules/scope/scope.cjs +1 -1
- package/dist/modules/scope/scope.js +1 -1
- package/dist/modules/svg/drawable.cjs +1 -1
- package/dist/modules/svg/drawable.js +1 -1
- package/dist/modules/svg/helpers.cjs +1 -1
- package/dist/modules/svg/helpers.js +1 -1
- package/dist/modules/svg/index.cjs +1 -1
- package/dist/modules/svg/index.js +1 -1
- package/dist/modules/svg/morphto.cjs +1 -1
- package/dist/modules/svg/morphto.js +1 -1
- package/dist/modules/svg/motionpath.cjs +1 -1
- package/dist/modules/svg/motionpath.js +1 -1
- package/dist/modules/text/index.cjs +1 -1
- package/dist/modules/text/index.js +1 -1
- package/dist/modules/text/scramble.cjs +1 -1
- package/dist/modules/text/scramble.js +1 -1
- package/dist/modules/text/split.cjs +1 -1
- package/dist/modules/text/split.js +1 -1
- package/dist/modules/timeline/index.cjs +1 -1
- package/dist/modules/timeline/index.js +1 -1
- package/dist/modules/timeline/position.cjs +1 -1
- package/dist/modules/timeline/position.js +1 -1
- package/dist/modules/timeline/timeline.cjs +1 -1
- package/dist/modules/timeline/timeline.js +1 -1
- package/dist/modules/timer/index.cjs +1 -1
- package/dist/modules/timer/index.js +1 -1
- package/dist/modules/timer/timer.cjs +1 -1
- package/dist/modules/timer/timer.js +1 -1
- package/dist/modules/utils/chainable.cjs +1 -1
- package/dist/modules/utils/chainable.js +1 -1
- package/dist/modules/utils/index.cjs +1 -1
- package/dist/modules/utils/index.js +1 -1
- package/dist/modules/utils/number.cjs +1 -1
- package/dist/modules/utils/number.js +1 -1
- package/dist/modules/utils/random.cjs +1 -1
- package/dist/modules/utils/random.js +1 -1
- package/dist/modules/utils/stagger.cjs +1 -1
- package/dist/modules/utils/stagger.js +1 -1
- package/dist/modules/utils/target.cjs +1 -1
- package/dist/modules/utils/target.js +1 -1
- package/dist/modules/utils/time.cjs +1 -1
- package/dist/modules/utils/time.js +1 -1
- package/dist/modules/waapi/composition.cjs +1 -1
- package/dist/modules/waapi/composition.js +1 -1
- package/dist/modules/waapi/index.cjs +1 -1
- package/dist/modules/waapi/index.js +1 -1
- package/dist/modules/waapi/waapi.cjs +1 -1
- package/dist/modules/waapi/waapi.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - UMD bundle
|
|
3
|
-
* @version v4.4.
|
|
3
|
+
* @version v4.4.1
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -841,7 +841,7 @@
|
|
|
841
841
|
editor: null,
|
|
842
842
|
};
|
|
843
843
|
|
|
844
|
-
const globalVersions = { version: '4.4.
|
|
844
|
+
const globalVersions = { version: '4.4.1', engine: null };
|
|
845
845
|
|
|
846
846
|
if (isBrowser) {
|
|
847
847
|
if (!win.AnimeJS) win.AnimeJS = [];
|
|
@@ -1836,50 +1836,6 @@
|
|
|
1836
1836
|
return hasRendered;
|
|
1837
1837
|
};
|
|
1838
1838
|
|
|
1839
|
-
// Shared context for extracted forEachChildren callbacks in tick()
|
|
1840
|
-
// Avoids closure allocation every frame
|
|
1841
|
-
|
|
1842
|
-
let renderCtxChildrenTime = 0;
|
|
1843
|
-
let renderCtxTlFps = 0;
|
|
1844
|
-
let renderCtxTickTime = 0;
|
|
1845
|
-
let renderCtxTickMode = 0;
|
|
1846
|
-
let renderCtxMuteCallbacks = 0;
|
|
1847
|
-
let renderCtxInternalRender = 0;
|
|
1848
|
-
let renderCtxChildrenHasRendered = 0;
|
|
1849
|
-
let renderCtxChildrenHaveCompleted = true;
|
|
1850
|
-
let loopCtxIsRunningBackwards = false;
|
|
1851
|
-
let loopCtxIterationDuration = 0;
|
|
1852
|
-
let loopCtxMuteCallbacks = 0;
|
|
1853
|
-
|
|
1854
|
-
/** @param {JSAnimation} child */
|
|
1855
|
-
const tickLoopChild = (child) => {
|
|
1856
|
-
if (!loopCtxIsRunningBackwards) {
|
|
1857
|
-
// Force an internal render to trigger the callbacks if the child has not completed on loop
|
|
1858
|
-
if (!child.completed && !child.backwards && child._currentTime < child.iterationDuration) {
|
|
1859
|
-
render(child, loopCtxIterationDuration, loopCtxMuteCallbacks, 1, tickModes.FORCE);
|
|
1860
|
-
}
|
|
1861
|
-
// Reset their began and completed flags to allow retrigering callbacks on the next iteration
|
|
1862
|
-
child.began = false;
|
|
1863
|
-
child.completed = false;
|
|
1864
|
-
} else {
|
|
1865
|
-
const childDuration = child.duration;
|
|
1866
|
-
const childStartTime = child._offset + child._delay;
|
|
1867
|
-
const childEndTime = childStartTime + childDuration;
|
|
1868
|
-
// Triggers the onComplete callback on reverse for children on the edges of the timeline
|
|
1869
|
-
if (!loopCtxMuteCallbacks && childDuration <= minValue && (!childStartTime || childEndTime === loopCtxIterationDuration)) {
|
|
1870
|
-
child.onComplete(child);
|
|
1871
|
-
}
|
|
1872
|
-
}
|
|
1873
|
-
};
|
|
1874
|
-
|
|
1875
|
-
/** @param {JSAnimation} child */
|
|
1876
|
-
const tickRenderChild = (child) => {
|
|
1877
|
-
const childTime = round$1((renderCtxChildrenTime - child._offset) * child._speed, 12); // Rounding is needed when using seconds
|
|
1878
|
-
const childTickMode = child._fps < renderCtxTlFps ? child.requestTick(renderCtxTickTime) : renderCtxTickMode;
|
|
1879
|
-
renderCtxChildrenHasRendered += render(child, childTime, renderCtxMuteCallbacks, renderCtxInternalRender, childTickMode);
|
|
1880
|
-
if (!child.completed && renderCtxChildrenHaveCompleted) renderCtxChildrenHaveCompleted = false;
|
|
1881
|
-
};
|
|
1882
|
-
|
|
1883
1839
|
/**
|
|
1884
1840
|
* @param {Tickable} tickable
|
|
1885
1841
|
* @param {Number} time
|
|
@@ -1896,28 +1852,42 @@
|
|
|
1896
1852
|
const tlIsRunningBackwards = tl.backwards;
|
|
1897
1853
|
const tlChildrenTime = internalRender ? time : tl._iterationTime;
|
|
1898
1854
|
const tlCildrenTickTime = now();
|
|
1855
|
+
|
|
1899
1856
|
let tlChildrenHasRendered = 0;
|
|
1900
1857
|
let tlChildrenHaveCompleted = true;
|
|
1858
|
+
|
|
1901
1859
|
// If the timeline has looped forward, we need to manually triggers children skipped callbacks
|
|
1902
1860
|
if (!internalRender && tl._currentIteration !== _currentIteration) {
|
|
1903
1861
|
const tlIterationDuration = tl.iterationDuration;
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1862
|
+
forEachChildren(tl, (/** @type {JSAnimation} */child) => {
|
|
1863
|
+
if (!tlIsRunningBackwards) {
|
|
1864
|
+
// Force an internal render to trigger the callbacks if the child has not completed on loop
|
|
1865
|
+
if (!child.completed && !child.backwards && child._currentTime < child.iterationDuration) {
|
|
1866
|
+
render(child, tlIterationDuration, muteCallbacks, 1, tickModes.FORCE);
|
|
1867
|
+
}
|
|
1868
|
+
// Reset their began and completed flags to allow retrigering callbacks on the next iteration
|
|
1869
|
+
child.began = false;
|
|
1870
|
+
child.completed = false;
|
|
1871
|
+
} else {
|
|
1872
|
+
const childDuration = child.duration;
|
|
1873
|
+
const childStartTime = child._offset + child._delay;
|
|
1874
|
+
const childEndTime = childStartTime + childDuration;
|
|
1875
|
+
// Triggers the onComplete callback on reverse for children on the edges of the timeline
|
|
1876
|
+
if (!muteCallbacks && childDuration <= minValue && (!childStartTime || childEndTime === tlIterationDuration)) {
|
|
1877
|
+
child.onComplete(child);
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1908
1881
|
if (!muteCallbacks) tl.onLoop(/** @type {CallbackArgument} */(tl));
|
|
1909
1882
|
}
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
forEachChildren(tl, tickRenderChild, tlIsRunningBackwards);
|
|
1919
|
-
tlChildrenHasRendered = renderCtxChildrenHasRendered;
|
|
1920
|
-
tlChildrenHaveCompleted = renderCtxChildrenHaveCompleted;
|
|
1883
|
+
|
|
1884
|
+
forEachChildren(tl, (/** @type {JSAnimation} */child) => {
|
|
1885
|
+
const childTime = round$1((tlChildrenTime - child._offset) * child._speed, 12); // Rounding is needed when using seconds
|
|
1886
|
+
const childTickMode = child._fps < tl._fps ? child.requestTick(tlCildrenTickTime) : tickMode;
|
|
1887
|
+
tlChildrenHasRendered += render(child, childTime, muteCallbacks, internalRender, childTickMode);
|
|
1888
|
+
if (!child.completed && tlChildrenHaveCompleted) tlChildrenHaveCompleted = false;
|
|
1889
|
+
}, tlIsRunningBackwards);
|
|
1890
|
+
|
|
1921
1891
|
// Renders on timeline are triggered by its children so it needs to be set after rendering the children
|
|
1922
1892
|
if (!muteCallbacks && tlChildrenHasRendered) tl.onRender(/** @type {CallbackArgument} */(tl));
|
|
1923
1893
|
// Triggers the timeline onComplete() once all chindren all completed and the current time has reached the end
|