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.
- package/README.md +4 -5
- package/dist/bundles/anime.esm.js +491 -272
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +491 -272
- package/dist/bundles/anime.umd.min.js +2 -2
- package/dist/modules/adapters/index.cjs +14 -0
- package/dist/modules/adapters/index.d.ts +1 -0
- package/dist/modules/adapters/index.js +8 -0
- package/dist/modules/adapters/registry.cjs +149 -0
- package/dist/modules/adapters/registry.d.ts +65 -0
- package/dist/modules/adapters/registry.js +146 -0
- package/dist/modules/adapters/three/adapter.cjs +26 -0
- package/dist/modules/adapters/three/adapter.d.ts +15 -0
- package/dist/modules/adapters/three/adapter.js +24 -0
- package/dist/modules/adapters/three/helpers.cjs +297 -0
- package/dist/modules/adapters/three/helpers.d.ts +89 -0
- package/dist/modules/adapters/three/helpers.js +280 -0
- package/dist/modules/adapters/three/index.cjs +20 -0
- package/dist/modules/adapters/three/index.d.ts +2 -0
- package/dist/modules/adapters/three/index.js +12 -0
- package/dist/modules/adapters/three/instance.cjs +368 -0
- package/dist/modules/adapters/three/instance.d.ts +133 -0
- package/dist/modules/adapters/three/instance.js +365 -0
- package/dist/modules/adapters/three/object3d.cjs +214 -0
- package/dist/modules/adapters/three/object3d.d.ts +1 -0
- package/dist/modules/adapters/three/object3d.js +212 -0
- package/dist/modules/adapters/three/resolvers.cjs +105 -0
- package/dist/modules/adapters/three/resolvers.d.ts +1 -0
- package/dist/modules/adapters/three/resolvers.js +103 -0
- package/dist/modules/adapters/three/uniform.cjs +41 -0
- package/dist/modules/adapters/three/uniform.d.ts +1 -0
- package/dist/modules/adapters/three/uniform.js +39 -0
- package/dist/modules/animatable/animatable.cjs +2 -1
- package/dist/modules/animatable/animatable.d.ts +2 -1
- package/dist/modules/animatable/animatable.js +2 -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 +43 -16
- package/dist/modules/animation/animation.d.ts +5 -0
- package/dist/modules/animation/animation.js +45 -18
- package/dist/modules/animation/composition.cjs +38 -35
- package/dist/modules/animation/composition.js +38 -35
- package/dist/modules/animation/index.cjs +1 -1
- package/dist/modules/animation/index.js +1 -1
- package/dist/modules/core/clock.cjs +11 -15
- package/dist/modules/core/clock.d.ts +0 -2
- package/dist/modules/core/clock.js +11 -15
- package/dist/modules/core/colors.cjs +1 -1
- package/dist/modules/core/colors.js +1 -1
- package/dist/modules/core/consts.cjs +15 -1
- package/dist/modules/core/consts.d.ts +2 -0
- package/dist/modules/core/consts.js +14 -2
- package/dist/modules/core/globals.cjs +7 -4
- package/dist/modules/core/globals.d.ts +8 -2
- package/dist/modules/core/globals.js +8 -5
- package/dist/modules/core/helpers.cjs +2 -2
- package/dist/modules/core/helpers.js +3 -3
- package/dist/modules/core/render.cjs +93 -73
- package/dist/modules/core/render.js +96 -76
- package/dist/modules/core/styles.cjs +16 -2
- package/dist/modules/core/styles.js +16 -2
- package/dist/modules/core/targets.cjs +11 -13
- package/dist/modules/core/targets.js +11 -13
- 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 +73 -82
- package/dist/modules/core/values.d.ts +1 -2
- package/dist/modules/core/values.js +76 -84
- 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 +3 -3
- package/dist/modules/easings/eases/parser.d.ts +4 -5
- package/dist/modules/easings/eases/parser.js +3 -3
- 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 +4 -2
- package/dist/modules/engine/engine.js +4 -2
- 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 +3 -1
- package/dist/modules/events/scroll.js +3 -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 +12 -2
- package/dist/modules/text/scramble.d.ts +9 -1
- package/dist/modules/text/scramble.js +12 -2
- package/dist/modules/text/split.cjs +2 -1
- package/dist/modules/text/split.js +2 -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 +14 -5
- package/dist/modules/timeline/timeline.d.ts +3 -3
- package/dist/modules/timeline/timeline.js +14 -5
- 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 +36 -11
- 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 +4 -3
- package/dist/modules/utils/random.d.ts +1 -1
- package/dist/modules/utils/random.js +4 -3
- package/dist/modules/utils/stagger.cjs +67 -13
- package/dist/modules/utils/stagger.js +69 -15
- package/dist/modules/utils/target.cjs +4 -1
- package/dist/modules/utils/target.js +4 -1
- package/dist/modules/utils/time.cjs +6 -5
- package/dist/modules/utils/time.d.ts +1 -1
- package/dist/modules/utils/time.js +6 -5
- 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 +38 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - core - CJS
|
|
3
|
-
* @version v4.
|
|
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
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - core - ESM
|
|
3
|
-
* @version v4.
|
|
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
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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:
|
|
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.
|
|
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.
|
|
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:
|
|
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.
|
|
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.
|
|
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.
|
|
3
|
+
* @version v4.5.0
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { isBrowser, maxValue, minValue,
|
|
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
|