animejs 4.3.2 → 4.3.4
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/dist/bundles/anime.esm.js +47 -23
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +47 -23
- 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 +29 -15
- package/dist/modules/animation/animation.js +30 -16
- 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 +1 -1
- package/dist/modules/core/render.js +1 -1
- 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 +8 -4
- package/dist/modules/events/scroll.d.ts +2 -0
- package/dist/modules/events/scroll.js +8 -4
- 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/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 +8 -4
- package/dist/modules/timeline/timeline.js +8 -4
- 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/types/index.d.ts +3 -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 - animation - CJS
|
|
3
|
-
* @version v4.3.
|
|
3
|
+
* @version v4.3.4
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -54,6 +54,7 @@ const fromTargetObject = values.createDecomposedValueTargetObject();
|
|
|
54
54
|
const toTargetObject = values.createDecomposedValueTargetObject();
|
|
55
55
|
const inlineStylesStore = {};
|
|
56
56
|
const toFunctionStore = { func: null };
|
|
57
|
+
const fromFunctionStore = { func: null };
|
|
57
58
|
const keyframesTargetArray = [null];
|
|
58
59
|
const fastSetValuesArray = [null, null];
|
|
59
60
|
/** @type {TweenKeyValue} */
|
|
@@ -295,6 +296,7 @@ class JSAnimation extends timer.Timer {
|
|
|
295
296
|
}
|
|
296
297
|
|
|
297
298
|
toFunctionStore.func = null;
|
|
299
|
+
fromFunctionStore.func = null;
|
|
298
300
|
|
|
299
301
|
const computedToValue = values.getFunctionValue(key.to, target, ti, tl, toFunctionStore);
|
|
300
302
|
|
|
@@ -355,7 +357,7 @@ class JSAnimation extends timer.Timer {
|
|
|
355
357
|
|
|
356
358
|
// Decompose values
|
|
357
359
|
if (isFromToValue) {
|
|
358
|
-
values.decomposeRawValue(isFromToArray ? values.getFunctionValue(tweenToValue[0], target, ti, tl) : tweenFromValue, fromTargetObject);
|
|
360
|
+
values.decomposeRawValue(isFromToArray ? values.getFunctionValue(tweenToValue[0], target, ti, tl, fromFunctionStore) : tweenFromValue, fromTargetObject);
|
|
359
361
|
values.decomposeRawValue(isFromToArray ? values.getFunctionValue(tweenToValue[1], target, ti, tl, toFunctionStore) : tweenToValue, toTargetObject);
|
|
360
362
|
// Needed to force an inline style registration
|
|
361
363
|
const originalValue = values.getOriginalAnimatableValue(target, propName, tweenType, inlineStylesStore);
|
|
@@ -472,7 +474,8 @@ class JSAnimation extends timer.Timer {
|
|
|
472
474
|
property: propName,
|
|
473
475
|
target: target,
|
|
474
476
|
_value: null,
|
|
475
|
-
|
|
477
|
+
_toFunc: toFunctionStore.func,
|
|
478
|
+
_fromFunc: fromFunctionStore.func,
|
|
476
479
|
_ease: parser.parseEase(tweenEasing),
|
|
477
480
|
_fromNumbers: helpers.cloneArray(fromTargetObject.d),
|
|
478
481
|
_toNumbers: helpers.cloneArray(toTargetObject.d),
|
|
@@ -630,18 +633,29 @@ class JSAnimation extends timer.Timer {
|
|
|
630
633
|
*/
|
|
631
634
|
refresh() {
|
|
632
635
|
helpers.forEachChildren(this, (/** @type {Tween} */tween) => {
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
636
|
+
const toFunc = tween._toFunc;
|
|
637
|
+
const fromFunc = tween._fromFunc;
|
|
638
|
+
if (toFunc || fromFunc) {
|
|
639
|
+
if (fromFunc) {
|
|
640
|
+
values.decomposeRawValue(fromFunc(), fromTargetObject);
|
|
641
|
+
if (fromTargetObject.u !== tween._unit && tween.target[consts.isDomSymbol]) {
|
|
642
|
+
units.convertValueUnit(/** @type {DOMTarget} */(tween.target), fromTargetObject, tween._unit, true);
|
|
643
|
+
}
|
|
644
|
+
tween._fromNumbers = helpers.cloneArray(fromTargetObject.d);
|
|
645
|
+
tween._fromNumber = fromTargetObject.n;
|
|
646
|
+
} else if (toFunc) {
|
|
647
|
+
// When only toFunc exists, get from value from target
|
|
648
|
+
values.decomposeRawValue(values.getOriginalAnimatableValue(tween.target, tween.property, tween._tweenType), values.decomposedOriginalValue);
|
|
649
|
+
tween._fromNumbers = helpers.cloneArray(values.decomposedOriginalValue.d);
|
|
650
|
+
tween._fromNumber = values.decomposedOriginalValue.n;
|
|
651
|
+
}
|
|
652
|
+
if (toFunc) {
|
|
653
|
+
values.decomposeRawValue(toFunc(), toTargetObject);
|
|
654
|
+
tween._toNumbers = helpers.cloneArray(toTargetObject.d);
|
|
655
|
+
tween._strings = helpers.cloneArray(toTargetObject.s);
|
|
656
|
+
// Make sure to apply relative operators https://github.com/juliangarnier/anime/issues/1025
|
|
657
|
+
tween._toNumber = toTargetObject.o ? values.getRelativeValue(tween._fromNumber, toTargetObject.n, toTargetObject.o) : toTargetObject.n;
|
|
658
|
+
}
|
|
645
659
|
}
|
|
646
660
|
});
|
|
647
661
|
// This forces setter animations to render once
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - animation - ESM
|
|
3
|
-
* @version v4.3.
|
|
3
|
+
* @version v4.3.4
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { K, compositionTypes, valueTypes, minValue, tweenTypes } from '../core/consts.js';
|
|
8
|
+
import { K, compositionTypes, valueTypes, minValue, tweenTypes, isDomSymbol } from '../core/consts.js';
|
|
9
9
|
import { mergeObjects, isUnd, isKey, isObj, round, cloneArray, isNil, addChild, forEachChildren, clampInfinity, normalizeTime, isArr, isFnc, isStr, isNum } from '../core/helpers.js';
|
|
10
10
|
import { globals } from '../core/globals.js';
|
|
11
11
|
import { registerTargets } from '../core/targets.js';
|
|
@@ -52,6 +52,7 @@ const fromTargetObject = createDecomposedValueTargetObject();
|
|
|
52
52
|
const toTargetObject = createDecomposedValueTargetObject();
|
|
53
53
|
const inlineStylesStore = {};
|
|
54
54
|
const toFunctionStore = { func: null };
|
|
55
|
+
const fromFunctionStore = { func: null };
|
|
55
56
|
const keyframesTargetArray = [null];
|
|
56
57
|
const fastSetValuesArray = [null, null];
|
|
57
58
|
/** @type {TweenKeyValue} */
|
|
@@ -293,6 +294,7 @@ class JSAnimation extends Timer {
|
|
|
293
294
|
}
|
|
294
295
|
|
|
295
296
|
toFunctionStore.func = null;
|
|
297
|
+
fromFunctionStore.func = null;
|
|
296
298
|
|
|
297
299
|
const computedToValue = getFunctionValue(key.to, target, ti, tl, toFunctionStore);
|
|
298
300
|
|
|
@@ -353,7 +355,7 @@ class JSAnimation extends Timer {
|
|
|
353
355
|
|
|
354
356
|
// Decompose values
|
|
355
357
|
if (isFromToValue) {
|
|
356
|
-
decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[0], target, ti, tl) : tweenFromValue, fromTargetObject);
|
|
358
|
+
decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[0], target, ti, tl, fromFunctionStore) : tweenFromValue, fromTargetObject);
|
|
357
359
|
decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[1], target, ti, tl, toFunctionStore) : tweenToValue, toTargetObject);
|
|
358
360
|
// Needed to force an inline style registration
|
|
359
361
|
const originalValue = getOriginalAnimatableValue(target, propName, tweenType, inlineStylesStore);
|
|
@@ -470,7 +472,8 @@ class JSAnimation extends Timer {
|
|
|
470
472
|
property: propName,
|
|
471
473
|
target: target,
|
|
472
474
|
_value: null,
|
|
473
|
-
|
|
475
|
+
_toFunc: toFunctionStore.func,
|
|
476
|
+
_fromFunc: fromFunctionStore.func,
|
|
474
477
|
_ease: parseEase(tweenEasing),
|
|
475
478
|
_fromNumbers: cloneArray(fromTargetObject.d),
|
|
476
479
|
_toNumbers: cloneArray(toTargetObject.d),
|
|
@@ -628,18 +631,29 @@ class JSAnimation extends Timer {
|
|
|
628
631
|
*/
|
|
629
632
|
refresh() {
|
|
630
633
|
forEachChildren(this, (/** @type {Tween} */tween) => {
|
|
631
|
-
const
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
634
|
+
const toFunc = tween._toFunc;
|
|
635
|
+
const fromFunc = tween._fromFunc;
|
|
636
|
+
if (toFunc || fromFunc) {
|
|
637
|
+
if (fromFunc) {
|
|
638
|
+
decomposeRawValue(fromFunc(), fromTargetObject);
|
|
639
|
+
if (fromTargetObject.u !== tween._unit && tween.target[isDomSymbol]) {
|
|
640
|
+
convertValueUnit(/** @type {DOMTarget} */(tween.target), fromTargetObject, tween._unit, true);
|
|
641
|
+
}
|
|
642
|
+
tween._fromNumbers = cloneArray(fromTargetObject.d);
|
|
643
|
+
tween._fromNumber = fromTargetObject.n;
|
|
644
|
+
} else if (toFunc) {
|
|
645
|
+
// When only toFunc exists, get from value from target
|
|
646
|
+
decomposeRawValue(getOriginalAnimatableValue(tween.target, tween.property, tween._tweenType), decomposedOriginalValue);
|
|
647
|
+
tween._fromNumbers = cloneArray(decomposedOriginalValue.d);
|
|
648
|
+
tween._fromNumber = decomposedOriginalValue.n;
|
|
649
|
+
}
|
|
650
|
+
if (toFunc) {
|
|
651
|
+
decomposeRawValue(toFunc(), toTargetObject);
|
|
652
|
+
tween._toNumbers = cloneArray(toTargetObject.d);
|
|
653
|
+
tween._strings = cloneArray(toTargetObject.s);
|
|
654
|
+
// Make sure to apply relative operators https://github.com/juliangarnier/anime/issues/1025
|
|
655
|
+
tween._toNumber = toTargetObject.o ? getRelativeValue(tween._fromNumber, toTargetObject.n, toTargetObject.o) : toTargetObject.n;
|
|
656
|
+
}
|
|
643
657
|
}
|
|
644
658
|
});
|
|
645
659
|
// This forces setter animations to render once
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - core - CJS
|
|
3
|
-
* @version v4.3.
|
|
3
|
+
* @version v4.3.4
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -67,7 +67,7 @@ const globals = {
|
|
|
67
67
|
|
|
68
68
|
const devTools = consts.isBrowser && consts.win.AnimeJSDevTools;
|
|
69
69
|
|
|
70
|
-
const globalVersions = { version: '4.3.
|
|
70
|
+
const globalVersions = { version: '4.3.4', engine: null };
|
|
71
71
|
|
|
72
72
|
if (consts.isBrowser) {
|
|
73
73
|
if (!consts.win.AnimeJS) consts.win.AnimeJS = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - core - ESM
|
|
3
|
-
* @version v4.3.
|
|
3
|
+
* @version v4.3.4
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -65,7 +65,7 @@ const globals = {
|
|
|
65
65
|
|
|
66
66
|
const devTools = isBrowser && win.AnimeJSDevTools;
|
|
67
67
|
|
|
68
|
-
const globalVersions = { version: '4.3.
|
|
68
|
+
const globalVersions = { version: '4.3.4', engine: null };
|
|
69
69
|
|
|
70
70
|
if (isBrowser) {
|
|
71
71
|
if (!win.AnimeJS) win.AnimeJS = [];
|