animejs 4.3.6 → 4.4.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.
- package/README.md +8 -11
- package/dist/bundles/anime.esm.js +1033 -421
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +1038 -421
- package/dist/bundles/anime.umd.min.js +2 -2
- package/dist/modules/animatable/animatable.cjs +1 -1
- package/dist/modules/animatable/animatable.js +2 -2
- 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 +38 -16
- package/dist/modules/animation/animation.d.ts +2 -2
- package/dist/modules/animation/animation.js +42 -20
- package/dist/modules/animation/composition.cjs +1 -1
- package/dist/modules/animation/composition.js +3 -3
- 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 +3 -9
- package/dist/modules/core/consts.d.ts +1 -5
- package/dist/modules/core/consts.js +4 -8
- package/dist/modules/core/globals.cjs +16 -5
- package/dist/modules/core/globals.d.ts +22 -1
- package/dist/modules/core/globals.js +18 -6
- package/dist/modules/core/helpers.cjs +7 -10
- package/dist/modules/core/helpers.js +8 -11
- package/dist/modules/core/render.cjs +66 -63
- package/dist/modules/core/render.js +68 -65
- package/dist/modules/core/styles.cjs +53 -32
- package/dist/modules/core/styles.d.ts +1 -0
- package/dist/modules/core/styles.js +55 -35
- package/dist/modules/core/targets.cjs +1 -1
- package/dist/modules/core/targets.js +1 -1
- package/dist/modules/core/transforms.cjs +129 -13
- package/dist/modules/core/transforms.d.ts +1 -0
- package/dist/modules/core/transforms.js +130 -15
- package/dist/modules/core/units.cjs +1 -1
- package/dist/modules/core/units.js +1 -1
- package/dist/modules/core/values.cjs +68 -8
- package/dist/modules/core/values.d.ts +5 -2
- package/dist/modules/core/values.js +69 -11
- 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 +9 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +4 -1
- package/dist/modules/layout/index.cjs +1 -1
- package/dist/modules/layout/index.js +1 -1
- package/dist/modules/layout/layout.cjs +29 -25
- package/dist/modules/layout/layout.d.ts +4 -3
- package/dist/modules/layout/layout.js +30 -26
- 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 +3 -6
- package/dist/modules/svg/morphto.js +3 -6
- package/dist/modules/svg/motionpath.cjs +1 -1
- package/dist/modules/svg/motionpath.js +1 -1
- package/dist/modules/text/index.cjs +3 -1
- package/dist/modules/text/index.d.ts +1 -0
- package/dist/modules/text/index.js +2 -1
- package/dist/modules/text/scramble.cjs +272 -0
- package/dist/modules/text/scramble.d.ts +3 -0
- package/dist/modules/text/scramble.js +270 -0
- package/dist/modules/text/split.cjs +5 -5
- package/dist/modules/text/split.d.ts +5 -5
- package/dist/modules/text/split.js +5 -5
- 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 +36 -18
- package/dist/modules/timeline/timeline.d.ts +6 -5
- package/dist/modules/timeline/timeline.js +37 -19
- package/dist/modules/timer/index.cjs +1 -1
- package/dist/modules/timer/index.js +1 -1
- package/dist/modules/timer/timer.cjs +8 -12
- package/dist/modules/timer/timer.d.ts +2 -0
- package/dist/modules/timer/timer.js +9 -13
- package/dist/modules/types/index.d.ts +76 -8
- package/dist/modules/utils/chainable.cjs +8 -5
- package/dist/modules/utils/chainable.js +8 -5
- package/dist/modules/utils/index.cjs +5 -1
- package/dist/modules/utils/index.d.ts +1 -0
- package/dist/modules/utils/index.js +2 -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 +117 -20
- package/dist/modules/utils/stagger.js +118 -21
- package/dist/modules/utils/target.cjs +1 -1
- package/dist/modules/utils/target.js +1 -1
- package/dist/modules/utils/time.cjs +5 -3
- package/dist/modules/utils/time.d.ts +1 -1
- package/dist/modules/utils/time.js +5 -3
- 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 +19 -20
- package/dist/modules/waapi/waapi.js +20 -21
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - core - CJS
|
|
3
|
-
* @version v4.
|
|
3
|
+
* @version v4.4.0
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -19,6 +19,7 @@ var colors = require('./colors.cjs');
|
|
|
19
19
|
* Tween,
|
|
20
20
|
* TweenPropValue,
|
|
21
21
|
* TweenDecomposedValue,
|
|
22
|
+
* TargetsArray,
|
|
22
23
|
* } from '../types/index.js'
|
|
23
24
|
*/
|
|
24
25
|
|
|
@@ -36,15 +37,16 @@ const setValue = (targetValue, defaultValue) => {
|
|
|
36
37
|
* @param {TweenPropValue} value
|
|
37
38
|
* @param {Target} target
|
|
38
39
|
* @param {Number} index
|
|
39
|
-
* @param {
|
|
40
|
-
* @param {Object}
|
|
40
|
+
* @param {TargetsArray} targets
|
|
41
|
+
* @param {Object|null} store
|
|
42
|
+
* @param {Tween|null} prevTween
|
|
41
43
|
* @return {any}
|
|
42
44
|
*/
|
|
43
|
-
const getFunctionValue = (value, target, index,
|
|
45
|
+
const getFunctionValue = (value, target, index, targets, store, prevTween) => {
|
|
44
46
|
let func;
|
|
45
47
|
if (helpers.isFnc(value)) {
|
|
46
48
|
func = () => {
|
|
47
|
-
const computed = /** @type {Function} */(value)(target, index,
|
|
49
|
+
const computed = /** @type {Function} */(value)(target, index, targets, prevTween);
|
|
48
50
|
// Fallback to 0 if the function returns undefined / NaN / null / false / 0
|
|
49
51
|
return !isNaN(+computed) ? +computed : computed || 0;
|
|
50
52
|
};
|
|
@@ -111,9 +113,17 @@ const getCSSValue = (target, propName, animationInlineStyles) => {
|
|
|
111
113
|
*/
|
|
112
114
|
const getOriginalAnimatableValue = (target, propName, tweenType, animationInlineStyles) => {
|
|
113
115
|
const type = !helpers.isUnd(tweenType) ? tweenType : getTweenType(target, propName);
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
if (type === consts.tweenTypes.OBJECT) {
|
|
117
|
+
const value = target[propName];
|
|
118
|
+
if (value && animationInlineStyles) animationInlineStyles[propName] = value;
|
|
119
|
+
return value || 0;
|
|
120
|
+
}
|
|
121
|
+
if (type === consts.tweenTypes.ATTRIBUTE) {
|
|
122
|
+
const value = /** @type {DOMTarget} */(target).getAttribute(propName);
|
|
123
|
+
if (value && animationInlineStyles) animationInlineStyles[propName] = value;
|
|
124
|
+
return value;
|
|
125
|
+
}
|
|
126
|
+
return type === consts.tweenTypes.TRANSFORM ? transforms.parseInlineTransforms(/** @type {DOMTarget} */(target), propName, animationInlineStyles) :
|
|
117
127
|
type === consts.tweenTypes.CSS_VAR ? getCSSValue(/** @type {DOMTarget} */(target), propName, animationInlineStyles).trimStart() :
|
|
118
128
|
getCSSValue(/** @type {DOMTarget} */(target), propName, animationInlineStyles);
|
|
119
129
|
};
|
|
@@ -215,6 +225,56 @@ const decomposeTweenValue = (tween, targetObject) => {
|
|
|
215
225
|
|
|
216
226
|
const decomposedOriginalValue = createDecomposedValueTargetObject();
|
|
217
227
|
|
|
228
|
+
/**
|
|
229
|
+
* @param {Tween} tween
|
|
230
|
+
* @param {Number} progress
|
|
231
|
+
* @param {Number} precision
|
|
232
|
+
* @return {String}
|
|
233
|
+
*/
|
|
234
|
+
const composeColorValue = (tween, progress, precision) => {
|
|
235
|
+
const mod = tween._modifier;
|
|
236
|
+
const fn = tween._fromNumbers;
|
|
237
|
+
const tn = tween._toNumbers;
|
|
238
|
+
const r = helpers.round(helpers.clamp(/** @type {Number} */(mod(helpers.lerp(fn[0], tn[0], progress))), 0, 255), 0);
|
|
239
|
+
const g = helpers.round(helpers.clamp(/** @type {Number} */(mod(helpers.lerp(fn[1], tn[1], progress))), 0, 255), 0);
|
|
240
|
+
const b = helpers.round(helpers.clamp(/** @type {Number} */(mod(helpers.lerp(fn[2], tn[2], progress))), 0, 255), 0);
|
|
241
|
+
const a = helpers.clamp(/** @type {Number} */(mod(helpers.round(helpers.lerp(fn[3], tn[3], progress), precision))), 0, 1);
|
|
242
|
+
if (tween._composition !== consts.compositionTypes.none) {
|
|
243
|
+
const ns = tween._numbers;
|
|
244
|
+
ns[0] = r;
|
|
245
|
+
ns[1] = g;
|
|
246
|
+
ns[2] = b;
|
|
247
|
+
ns[3] = a;
|
|
248
|
+
}
|
|
249
|
+
return `rgba(${r},${g},${b},${a})`;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @param {Tween} tween
|
|
254
|
+
* @param {Number} progress
|
|
255
|
+
* @param {Number} precision
|
|
256
|
+
* @return {String}
|
|
257
|
+
*/
|
|
258
|
+
const composeComplexValue = (tween, progress, precision) => {
|
|
259
|
+
const mod = tween._modifier;
|
|
260
|
+
const fn = tween._fromNumbers;
|
|
261
|
+
const tn = tween._toNumbers;
|
|
262
|
+
const ts = tween._strings;
|
|
263
|
+
const hasComposition = tween._composition !== consts.compositionTypes.none;
|
|
264
|
+
let v = ts[0];
|
|
265
|
+
for (let j = 0, l = tn.length; j < l; j++) {
|
|
266
|
+
const n = /** @type {Number} */(mod(helpers.round(helpers.lerp(fn[j], tn[j], progress), precision)));
|
|
267
|
+
const s = ts[j + 1];
|
|
268
|
+
v += `${s ? n + s : n}`;
|
|
269
|
+
if (hasComposition) {
|
|
270
|
+
tween._numbers[j] = n;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return v;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
exports.composeColorValue = composeColorValue;
|
|
277
|
+
exports.composeComplexValue = composeComplexValue;
|
|
218
278
|
exports.createDecomposedValueTargetObject = createDecomposedValueTargetObject;
|
|
219
279
|
exports.decomposeRawValue = decomposeRawValue;
|
|
220
280
|
exports.decomposeTweenValue = decomposeTweenValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function setValue<T, D>(targetValue: T | undefined, defaultValue: D): T | D;
|
|
2
|
-
export function getFunctionValue(value: TweenPropValue, target: Target, index: number,
|
|
2
|
+
export function getFunctionValue(value: TweenPropValue, target: Target, index: number, targets: TargetsArray, store: any | null, prevTween: Tween | null): any;
|
|
3
3
|
export function getTweenType(target: Target, prop: string): tweenTypes;
|
|
4
4
|
export function getOriginalAnimatableValue(target: Target, propName: string, tweenType?: tweenTypes, animationInlineStyles?: any | void): string | number;
|
|
5
5
|
export function getRelativeValue(x: number, y: number, operator: string): number;
|
|
@@ -7,8 +7,11 @@ export function createDecomposedValueTargetObject(): TweenDecomposedValue;
|
|
|
7
7
|
export function decomposeRawValue(rawValue: string | number, targetObject: TweenDecomposedValue): TweenDecomposedValue;
|
|
8
8
|
export function decomposeTweenValue(tween: Tween, targetObject: TweenDecomposedValue): TweenDecomposedValue;
|
|
9
9
|
export const decomposedOriginalValue: TweenDecomposedValue;
|
|
10
|
+
export function composeColorValue(tween: Tween, progress: number, precision: number): string;
|
|
11
|
+
export function composeComplexValue(tween: Tween, progress: number, precision: number): string;
|
|
10
12
|
import type { TweenPropValue } from '../types/index.js';
|
|
11
13
|
import type { Target } from '../types/index.js';
|
|
14
|
+
import type { TargetsArray } from '../types/index.js';
|
|
15
|
+
import type { Tween } from '../types/index.js';
|
|
12
16
|
import { tweenTypes } from './consts.js';
|
|
13
17
|
import type { TweenDecomposedValue } from '../types/index.js';
|
|
14
|
-
import type { Tween } from '../types/index.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - core - ESM
|
|
3
|
-
* @version v4.
|
|
3
|
+
* @version v4.4.0
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { tweenTypes, isDomSymbol, isSvgSymbol, validTransforms, shortTransforms, valueTypes, unitsExecRgx, digitWithExponentRgx, proxyTargetSymbol, cssVarPrefix, cssVariableMatchRgx, emptyString } from './consts.js';
|
|
9
|
-
import { isUnd, isValidSVGAttribute, stringStartsWith, isCol, isFnc, isStr, cloneArray } from './helpers.js';
|
|
8
|
+
import { tweenTypes, isDomSymbol, isSvgSymbol, validTransforms, shortTransforms, valueTypes, unitsExecRgx, digitWithExponentRgx, compositionTypes, proxyTargetSymbol, cssVarPrefix, cssVariableMatchRgx, emptyString } from './consts.js';
|
|
9
|
+
import { isUnd, isValidSVGAttribute, stringStartsWith, isCol, isFnc, isStr, round, lerp, clamp, cloneArray } from './helpers.js';
|
|
10
10
|
import { parseInlineTransforms } from './transforms.js';
|
|
11
11
|
import { convertColorStringValuesToRgbaArray } from './colors.js';
|
|
12
12
|
|
|
@@ -17,6 +17,7 @@ import { convertColorStringValuesToRgbaArray } from './colors.js';
|
|
|
17
17
|
* Tween,
|
|
18
18
|
* TweenPropValue,
|
|
19
19
|
* TweenDecomposedValue,
|
|
20
|
+
* TargetsArray,
|
|
20
21
|
* } from '../types/index.js'
|
|
21
22
|
*/
|
|
22
23
|
|
|
@@ -34,15 +35,16 @@ const setValue = (targetValue, defaultValue) => {
|
|
|
34
35
|
* @param {TweenPropValue} value
|
|
35
36
|
* @param {Target} target
|
|
36
37
|
* @param {Number} index
|
|
37
|
-
* @param {
|
|
38
|
-
* @param {Object}
|
|
38
|
+
* @param {TargetsArray} targets
|
|
39
|
+
* @param {Object|null} store
|
|
40
|
+
* @param {Tween|null} prevTween
|
|
39
41
|
* @return {any}
|
|
40
42
|
*/
|
|
41
|
-
const getFunctionValue = (value, target, index,
|
|
43
|
+
const getFunctionValue = (value, target, index, targets, store, prevTween) => {
|
|
42
44
|
let func;
|
|
43
45
|
if (isFnc(value)) {
|
|
44
46
|
func = () => {
|
|
45
|
-
const computed = /** @type {Function} */(value)(target, index,
|
|
47
|
+
const computed = /** @type {Function} */(value)(target, index, targets, prevTween);
|
|
46
48
|
// Fallback to 0 if the function returns undefined / NaN / null / false / 0
|
|
47
49
|
return !isNaN(+computed) ? +computed : computed || 0;
|
|
48
50
|
};
|
|
@@ -109,9 +111,17 @@ const getCSSValue = (target, propName, animationInlineStyles) => {
|
|
|
109
111
|
*/
|
|
110
112
|
const getOriginalAnimatableValue = (target, propName, tweenType, animationInlineStyles) => {
|
|
111
113
|
const type = !isUnd(tweenType) ? tweenType : getTweenType(target, propName);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
if (type === tweenTypes.OBJECT) {
|
|
115
|
+
const value = target[propName];
|
|
116
|
+
if (value && animationInlineStyles) animationInlineStyles[propName] = value;
|
|
117
|
+
return value || 0;
|
|
118
|
+
}
|
|
119
|
+
if (type === tweenTypes.ATTRIBUTE) {
|
|
120
|
+
const value = /** @type {DOMTarget} */(target).getAttribute(propName);
|
|
121
|
+
if (value && animationInlineStyles) animationInlineStyles[propName] = value;
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
return type === tweenTypes.TRANSFORM ? parseInlineTransforms(/** @type {DOMTarget} */(target), propName, animationInlineStyles) :
|
|
115
125
|
type === tweenTypes.CSS_VAR ? getCSSValue(/** @type {DOMTarget} */(target), propName, animationInlineStyles).trimStart() :
|
|
116
126
|
getCSSValue(/** @type {DOMTarget} */(target), propName, animationInlineStyles);
|
|
117
127
|
};
|
|
@@ -213,4 +223,52 @@ const decomposeTweenValue = (tween, targetObject) => {
|
|
|
213
223
|
|
|
214
224
|
const decomposedOriginalValue = createDecomposedValueTargetObject();
|
|
215
225
|
|
|
216
|
-
|
|
226
|
+
/**
|
|
227
|
+
* @param {Tween} tween
|
|
228
|
+
* @param {Number} progress
|
|
229
|
+
* @param {Number} precision
|
|
230
|
+
* @return {String}
|
|
231
|
+
*/
|
|
232
|
+
const composeColorValue = (tween, progress, precision) => {
|
|
233
|
+
const mod = tween._modifier;
|
|
234
|
+
const fn = tween._fromNumbers;
|
|
235
|
+
const tn = tween._toNumbers;
|
|
236
|
+
const r = round(clamp(/** @type {Number} */(mod(lerp(fn[0], tn[0], progress))), 0, 255), 0);
|
|
237
|
+
const g = round(clamp(/** @type {Number} */(mod(lerp(fn[1], tn[1], progress))), 0, 255), 0);
|
|
238
|
+
const b = round(clamp(/** @type {Number} */(mod(lerp(fn[2], tn[2], progress))), 0, 255), 0);
|
|
239
|
+
const a = clamp(/** @type {Number} */(mod(round(lerp(fn[3], tn[3], progress), precision))), 0, 1);
|
|
240
|
+
if (tween._composition !== compositionTypes.none) {
|
|
241
|
+
const ns = tween._numbers;
|
|
242
|
+
ns[0] = r;
|
|
243
|
+
ns[1] = g;
|
|
244
|
+
ns[2] = b;
|
|
245
|
+
ns[3] = a;
|
|
246
|
+
}
|
|
247
|
+
return `rgba(${r},${g},${b},${a})`;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* @param {Tween} tween
|
|
252
|
+
* @param {Number} progress
|
|
253
|
+
* @param {Number} precision
|
|
254
|
+
* @return {String}
|
|
255
|
+
*/
|
|
256
|
+
const composeComplexValue = (tween, progress, precision) => {
|
|
257
|
+
const mod = tween._modifier;
|
|
258
|
+
const fn = tween._fromNumbers;
|
|
259
|
+
const tn = tween._toNumbers;
|
|
260
|
+
const ts = tween._strings;
|
|
261
|
+
const hasComposition = tween._composition !== compositionTypes.none;
|
|
262
|
+
let v = ts[0];
|
|
263
|
+
for (let j = 0, l = tn.length; j < l; j++) {
|
|
264
|
+
const n = /** @type {Number} */(mod(round(lerp(fn[j], tn[j], progress), precision)));
|
|
265
|
+
const s = ts[j + 1];
|
|
266
|
+
v += `${s ? n + s : n}`;
|
|
267
|
+
if (hasComposition) {
|
|
268
|
+
tween._numbers[j] = n;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return v;
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
export { composeColorValue, composeComplexValue, createDecomposedValueTargetObject, decomposeRawValue, decomposeTweenValue, decomposedOriginalValue, getFunctionValue, getOriginalAnimatableValue, getRelativeValue, getTweenType, setValue };
|
package/dist/modules/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - CJS
|
|
3
|
-
* @version v4.
|
|
3
|
+
* @version v4.4.0
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -21,12 +21,14 @@ var index$1 = require('./utils/index.cjs');
|
|
|
21
21
|
var index$2 = require('./svg/index.cjs');
|
|
22
22
|
var index$3 = require('./text/index.cjs');
|
|
23
23
|
var waapi = require('./waapi/waapi.cjs');
|
|
24
|
+
var globals = require('./core/globals.cjs');
|
|
24
25
|
var index$4 = require('./easings/cubic-bezier/index.cjs');
|
|
25
26
|
var index$5 = require('./easings/steps/index.cjs');
|
|
26
27
|
var index$6 = require('./easings/linear/index.cjs');
|
|
27
28
|
var index$7 = require('./easings/irregular/index.cjs');
|
|
28
29
|
var index$8 = require('./easings/spring/index.cjs');
|
|
29
30
|
var parser = require('./easings/eases/parser.cjs');
|
|
31
|
+
var helpers = require('./core/helpers.cjs');
|
|
30
32
|
var chainable = require('./utils/chainable.cjs');
|
|
31
33
|
var random = require('./utils/random.cjs');
|
|
32
34
|
var time = require('./utils/time.cjs');
|
|
@@ -38,6 +40,7 @@ var motionpath = require('./svg/motionpath.cjs');
|
|
|
38
40
|
var drawable = require('./svg/drawable.cjs');
|
|
39
41
|
var morphto = require('./svg/morphto.cjs');
|
|
40
42
|
var split = require('./text/split.cjs');
|
|
43
|
+
var scramble = require('./text/scramble.cjs');
|
|
41
44
|
|
|
42
45
|
|
|
43
46
|
|
|
@@ -65,6 +68,7 @@ exports.svg = index$2;
|
|
|
65
68
|
exports.text = index$3;
|
|
66
69
|
exports.WAAPIAnimation = waapi.WAAPIAnimation;
|
|
67
70
|
exports.waapi = waapi.waapi;
|
|
71
|
+
exports.globals = globals.globals;
|
|
68
72
|
exports.cubicBezier = index$4.cubicBezier;
|
|
69
73
|
exports.steps = index$5.steps;
|
|
70
74
|
exports.linear = index$6.linear;
|
|
@@ -73,6 +77,9 @@ exports.Spring = index$8.Spring;
|
|
|
73
77
|
exports.createSpring = index$8.createSpring;
|
|
74
78
|
exports.spring = index$8.spring;
|
|
75
79
|
exports.eases = parser.eases;
|
|
80
|
+
exports.addChild = helpers.addChild;
|
|
81
|
+
exports.forEachChildren = helpers.forEachChildren;
|
|
82
|
+
exports.removeChild = helpers.removeChild;
|
|
76
83
|
exports.clamp = chainable.clamp;
|
|
77
84
|
exports.damp = chainable.damp;
|
|
78
85
|
exports.degToRad = chainable.degToRad;
|
|
@@ -103,3 +110,4 @@ exports.morphTo = morphto.morphTo;
|
|
|
103
110
|
exports.TextSplitter = split.TextSplitter;
|
|
104
111
|
exports.split = split.split;
|
|
105
112
|
exports.splitText = split.splitText;
|
|
113
|
+
exports.scrambleText = scramble.scrambleText;
|
package/dist/modules/index.d.ts
CHANGED
package/dist/modules/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - ESM
|
|
3
|
-
* @version v4.
|
|
3
|
+
* @version v4.4.0
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -23,12 +23,14 @@ export { index$2 as svg };
|
|
|
23
23
|
import * as index$3 from './text/index.js';
|
|
24
24
|
export { index$3 as text };
|
|
25
25
|
export { WAAPIAnimation, waapi } from './waapi/waapi.js';
|
|
26
|
+
export { globals } from './core/globals.js';
|
|
26
27
|
export { cubicBezier } from './easings/cubic-bezier/index.js';
|
|
27
28
|
export { steps } from './easings/steps/index.js';
|
|
28
29
|
export { linear } from './easings/linear/index.js';
|
|
29
30
|
export { irregular } from './easings/irregular/index.js';
|
|
30
31
|
export { Spring, createSpring, spring } from './easings/spring/index.js';
|
|
31
32
|
export { eases } from './easings/eases/parser.js';
|
|
33
|
+
export { addChild, forEachChildren, removeChild } from './core/helpers.js';
|
|
32
34
|
export { clamp, damp, degToRad, lerp, mapRange, padEnd, padStart, radToDeg, round, roundPad, snap, wrap } from './utils/chainable.js';
|
|
33
35
|
export { createSeededRandom, random, randomPick, shuffle } from './utils/random.js';
|
|
34
36
|
export { keepTime, sync } from './utils/time.js';
|
|
@@ -40,3 +42,4 @@ export { createMotionPath } from './svg/motionpath.js';
|
|
|
40
42
|
export { createDrawable } from './svg/drawable.js';
|
|
41
43
|
export { morphTo } from './svg/morphto.js';
|
|
42
44
|
export { TextSplitter, split, splitText } from './text/split.js';
|
|
45
|
+
export { scrambleText } from './text/scramble.js';
|