animejs 4.3.2 → 4.3.3
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 +36 -17
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +36 -17
- 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 +4 -1
- package/dist/modules/events/scroll.d.ts +2 -0
- package/dist/modules/events/scroll.js +4 -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/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/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 - ESM bundle
|
|
3
|
-
* @version v4.3.
|
|
3
|
+
* @version v4.3.3
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -205,7 +205,8 @@
|
|
|
205
205
|
* @property {String} property
|
|
206
206
|
* @property {Target} target
|
|
207
207
|
* @property {String|Number} _value
|
|
208
|
-
* @property {Function|null}
|
|
208
|
+
* @property {Function|null} _toFunc
|
|
209
|
+
* @property {Function|null} _fromFunc
|
|
209
210
|
* @property {EasingFunction} _ease
|
|
210
211
|
* @property {Array.<Number>} _fromNumbers
|
|
211
212
|
* @property {Array.<Number>} _toNumbers
|
|
@@ -536,6 +537,7 @@
|
|
|
536
537
|
* @property {Callback<ScrollObserver>} [onEnterBackward]
|
|
537
538
|
* @property {Callback<ScrollObserver>} [onLeaveBackward]
|
|
538
539
|
* @property {Callback<ScrollObserver>} [onUpdate]
|
|
540
|
+
* @property {Callback<ScrollObserver>} [onResize]
|
|
539
541
|
* @property {Callback<ScrollObserver>} [onSyncComplete]
|
|
540
542
|
*/
|
|
541
543
|
|
|
@@ -801,7 +803,7 @@ const globals = {
|
|
|
801
803
|
|
|
802
804
|
const devTools = isBrowser && win.AnimeJSDevTools;
|
|
803
805
|
|
|
804
|
-
const globalVersions = { version: '4.3.
|
|
806
|
+
const globalVersions = { version: '4.3.3', engine: null };
|
|
805
807
|
|
|
806
808
|
if (isBrowser) {
|
|
807
809
|
if (!win.AnimeJS) win.AnimeJS = [];
|
|
@@ -3271,6 +3273,7 @@ const fromTargetObject = createDecomposedValueTargetObject();
|
|
|
3271
3273
|
const toTargetObject = createDecomposedValueTargetObject();
|
|
3272
3274
|
const inlineStylesStore = {};
|
|
3273
3275
|
const toFunctionStore = { func: null };
|
|
3276
|
+
const fromFunctionStore = { func: null };
|
|
3274
3277
|
const keyframesTargetArray = [null];
|
|
3275
3278
|
const fastSetValuesArray = [null, null];
|
|
3276
3279
|
/** @type {TweenKeyValue} */
|
|
@@ -3512,6 +3515,7 @@ class JSAnimation extends Timer {
|
|
|
3512
3515
|
}
|
|
3513
3516
|
|
|
3514
3517
|
toFunctionStore.func = null;
|
|
3518
|
+
fromFunctionStore.func = null;
|
|
3515
3519
|
|
|
3516
3520
|
const computedToValue = getFunctionValue(key.to, target, ti, tl, toFunctionStore);
|
|
3517
3521
|
|
|
@@ -3572,7 +3576,7 @@ class JSAnimation extends Timer {
|
|
|
3572
3576
|
|
|
3573
3577
|
// Decompose values
|
|
3574
3578
|
if (isFromToValue) {
|
|
3575
|
-
decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[0], target, ti, tl) : tweenFromValue, fromTargetObject);
|
|
3579
|
+
decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[0], target, ti, tl, fromFunctionStore) : tweenFromValue, fromTargetObject);
|
|
3576
3580
|
decomposeRawValue(isFromToArray ? getFunctionValue(tweenToValue[1], target, ti, tl, toFunctionStore) : tweenToValue, toTargetObject);
|
|
3577
3581
|
// Needed to force an inline style registration
|
|
3578
3582
|
const originalValue = getOriginalAnimatableValue(target, propName, tweenType, inlineStylesStore);
|
|
@@ -3689,7 +3693,8 @@ class JSAnimation extends Timer {
|
|
|
3689
3693
|
property: propName,
|
|
3690
3694
|
target: target,
|
|
3691
3695
|
_value: null,
|
|
3692
|
-
|
|
3696
|
+
_toFunc: toFunctionStore.func,
|
|
3697
|
+
_fromFunc: fromFunctionStore.func,
|
|
3693
3698
|
_ease: parseEase(tweenEasing),
|
|
3694
3699
|
_fromNumbers: cloneArray(fromTargetObject.d),
|
|
3695
3700
|
_toNumbers: cloneArray(toTargetObject.d),
|
|
@@ -3847,18 +3852,29 @@ class JSAnimation extends Timer {
|
|
|
3847
3852
|
*/
|
|
3848
3853
|
refresh() {
|
|
3849
3854
|
forEachChildren(this, (/** @type {Tween} */tween) => {
|
|
3850
|
-
const
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3855
|
+
const toFunc = tween._toFunc;
|
|
3856
|
+
const fromFunc = tween._fromFunc;
|
|
3857
|
+
if (toFunc || fromFunc) {
|
|
3858
|
+
if (fromFunc) {
|
|
3859
|
+
decomposeRawValue(fromFunc(), fromTargetObject);
|
|
3860
|
+
if (fromTargetObject.u !== tween._unit && tween.target[isDomSymbol]) {
|
|
3861
|
+
convertValueUnit(/** @type {DOMTarget} */(tween.target), fromTargetObject, tween._unit, true);
|
|
3862
|
+
}
|
|
3863
|
+
tween._fromNumbers = cloneArray(fromTargetObject.d);
|
|
3864
|
+
tween._fromNumber = fromTargetObject.n;
|
|
3865
|
+
} else if (toFunc) {
|
|
3866
|
+
// When only toFunc exists, get from value from target
|
|
3867
|
+
decomposeRawValue(getOriginalAnimatableValue(tween.target, tween.property, tween._tweenType), decomposedOriginalValue);
|
|
3868
|
+
tween._fromNumbers = cloneArray(decomposedOriginalValue.d);
|
|
3869
|
+
tween._fromNumber = decomposedOriginalValue.n;
|
|
3870
|
+
}
|
|
3871
|
+
if (toFunc) {
|
|
3872
|
+
decomposeRawValue(toFunc(), toTargetObject);
|
|
3873
|
+
tween._toNumbers = cloneArray(toTargetObject.d);
|
|
3874
|
+
tween._strings = cloneArray(toTargetObject.s);
|
|
3875
|
+
// Make sure to apply relative operators https://github.com/juliangarnier/anime/issues/1025
|
|
3876
|
+
tween._toNumber = toTargetObject.o ? getRelativeValue(tween._fromNumber, toTargetObject.n, toTargetObject.o) : toTargetObject.n;
|
|
3877
|
+
}
|
|
3862
3878
|
}
|
|
3863
3879
|
});
|
|
3864
3880
|
// This forces setter animations to render once
|
|
@@ -6465,6 +6481,7 @@ class ScrollContainer {
|
|
|
6465
6481
|
this.updateBounds();
|
|
6466
6482
|
forEachChildren(this, (/** @type {ScrollObserver} */child) => {
|
|
6467
6483
|
child.refresh();
|
|
6484
|
+
child.onResize(child);
|
|
6468
6485
|
if (child._debug) {
|
|
6469
6486
|
child.debug();
|
|
6470
6487
|
}
|
|
@@ -6676,6 +6693,8 @@ class ScrollObserver {
|
|
|
6676
6693
|
/** @type {Callback<ScrollObserver>} */
|
|
6677
6694
|
this.onUpdate = parameters.onUpdate || noop;
|
|
6678
6695
|
/** @type {Callback<ScrollObserver>} */
|
|
6696
|
+
this.onResize = parameters.onResize || noop;
|
|
6697
|
+
/** @type {Callback<ScrollObserver>} */
|
|
6679
6698
|
this.onSyncComplete = parameters.onSyncComplete || noop;
|
|
6680
6699
|
/** @type {Boolean} */
|
|
6681
6700
|
this.reverted = false;
|