animejs 4.3.0-beta.2 → 4.3.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 +16 -17
- package/dist/bundles/anime.esm.js +446 -245
- package/dist/bundles/anime.esm.min.js +3 -3
- package/dist/bundles/anime.umd.js +446 -245
- package/dist/bundles/anime.umd.min.js +3 -3
- package/dist/modules/animatable/animatable.cjs +2 -2
- package/dist/modules/animatable/animatable.js +2 -2
- package/dist/modules/animatable/index.cjs +2 -2
- package/dist/modules/animatable/index.js +2 -2
- package/dist/modules/animation/additive.cjs +2 -2
- package/dist/modules/animation/additive.js +2 -2
- package/dist/modules/animation/animation.cjs +8 -5
- package/dist/modules/animation/animation.js +9 -6
- package/dist/modules/animation/composition.cjs +2 -2
- package/dist/modules/animation/composition.js +2 -2
- package/dist/modules/animation/index.cjs +2 -2
- package/dist/modules/animation/index.js +2 -2
- package/dist/modules/core/clock.cjs +2 -2
- package/dist/modules/core/clock.js +2 -2
- package/dist/modules/core/colors.cjs +2 -2
- package/dist/modules/core/colors.js +2 -2
- package/dist/modules/core/consts.cjs +2 -2
- package/dist/modules/core/consts.js +2 -2
- package/dist/modules/core/globals.cjs +3 -3
- package/dist/modules/core/globals.js +3 -3
- package/dist/modules/core/helpers.cjs +4 -4
- package/dist/modules/core/helpers.js +4 -4
- package/dist/modules/core/render.cjs +2 -2
- package/dist/modules/core/render.js +2 -2
- package/dist/modules/core/styles.cjs +2 -2
- package/dist/modules/core/styles.js +2 -2
- package/dist/modules/core/targets.cjs +2 -2
- package/dist/modules/core/targets.js +2 -2
- package/dist/modules/core/transforms.cjs +2 -2
- package/dist/modules/core/transforms.js +2 -2
- package/dist/modules/core/units.cjs +2 -2
- package/dist/modules/core/units.js +2 -2
- package/dist/modules/core/values.cjs +2 -2
- package/dist/modules/core/values.js +2 -2
- package/dist/modules/draggable/draggable.cjs +2 -2
- package/dist/modules/draggable/draggable.js +2 -2
- package/dist/modules/draggable/index.cjs +2 -2
- package/dist/modules/draggable/index.js +2 -2
- package/dist/modules/easings/cubic-bezier/index.cjs +2 -2
- package/dist/modules/easings/cubic-bezier/index.js +2 -2
- package/dist/modules/easings/eases/index.cjs +2 -2
- package/dist/modules/easings/eases/index.js +2 -2
- package/dist/modules/easings/eases/parser.cjs +2 -2
- package/dist/modules/easings/eases/parser.js +2 -2
- package/dist/modules/easings/index.cjs +2 -2
- package/dist/modules/easings/index.js +2 -2
- package/dist/modules/easings/irregular/index.cjs +2 -2
- package/dist/modules/easings/irregular/index.js +2 -2
- package/dist/modules/easings/linear/index.cjs +2 -2
- package/dist/modules/easings/linear/index.js +2 -2
- package/dist/modules/easings/none.cjs +2 -2
- package/dist/modules/easings/none.js +2 -2
- package/dist/modules/easings/spring/index.cjs +2 -2
- package/dist/modules/easings/spring/index.js +2 -2
- package/dist/modules/easings/steps/index.cjs +2 -2
- package/dist/modules/easings/steps/index.js +2 -2
- package/dist/modules/engine/engine.cjs +2 -2
- package/dist/modules/engine/engine.js +2 -2
- package/dist/modules/engine/index.cjs +2 -2
- package/dist/modules/engine/index.js +2 -2
- package/dist/modules/events/index.cjs +2 -2
- package/dist/modules/events/index.js +2 -2
- package/dist/modules/events/scroll.cjs +2 -2
- package/dist/modules/events/scroll.js +2 -2
- package/dist/modules/index.cjs +2 -2
- package/dist/modules/index.js +2 -2
- package/dist/modules/layout/index.cjs +2 -2
- package/dist/modules/layout/index.js +2 -2
- package/dist/modules/layout/layout.cjs +427 -228
- package/dist/modules/layout/layout.d.ts +44 -38
- package/dist/modules/layout/layout.js +429 -230
- package/dist/modules/scope/index.cjs +2 -2
- package/dist/modules/scope/index.js +2 -2
- package/dist/modules/scope/scope.cjs +2 -2
- package/dist/modules/scope/scope.js +2 -2
- package/dist/modules/svg/drawable.cjs +2 -2
- package/dist/modules/svg/drawable.js +2 -2
- package/dist/modules/svg/helpers.cjs +2 -2
- package/dist/modules/svg/helpers.js +2 -2
- package/dist/modules/svg/index.cjs +2 -2
- package/dist/modules/svg/index.js +2 -2
- package/dist/modules/svg/morphto.cjs +2 -2
- package/dist/modules/svg/morphto.js +2 -2
- package/dist/modules/svg/motionpath.cjs +2 -2
- package/dist/modules/svg/motionpath.js +2 -2
- package/dist/modules/text/index.cjs +2 -2
- package/dist/modules/text/index.js +2 -2
- package/dist/modules/text/split.cjs +2 -2
- package/dist/modules/text/split.js +2 -2
- package/dist/modules/timeline/index.cjs +2 -2
- package/dist/modules/timeline/index.js +2 -2
- package/dist/modules/timeline/position.cjs +2 -2
- package/dist/modules/timeline/position.js +2 -2
- package/dist/modules/timeline/timeline.cjs +2 -2
- package/dist/modules/timeline/timeline.js +2 -2
- package/dist/modules/timer/index.cjs +2 -2
- package/dist/modules/timer/index.js +2 -2
- package/dist/modules/timer/timer.cjs +5 -4
- package/dist/modules/timer/timer.d.ts +2 -1
- package/dist/modules/timer/timer.js +5 -4
- package/dist/modules/types/index.d.ts +6 -6
- package/dist/modules/utils/chainable.cjs +2 -2
- package/dist/modules/utils/chainable.js +2 -2
- package/dist/modules/utils/index.cjs +2 -2
- package/dist/modules/utils/index.js +2 -2
- package/dist/modules/utils/number.cjs +2 -2
- package/dist/modules/utils/number.js +2 -2
- package/dist/modules/utils/random.cjs +2 -2
- package/dist/modules/utils/random.js +2 -2
- package/dist/modules/utils/stagger.cjs +2 -2
- package/dist/modules/utils/stagger.js +2 -2
- package/dist/modules/utils/target.cjs +2 -2
- package/dist/modules/utils/target.js +2 -2
- package/dist/modules/utils/time.cjs +2 -2
- package/dist/modules/utils/time.js +2 -2
- package/dist/modules/waapi/composition.cjs +2 -2
- package/dist/modules/waapi/composition.js +2 -2
- package/dist/modules/waapi/index.cjs +2 -2
- package/dist/modules/waapi/index.js +2 -2
- package/dist/modules/waapi/waapi.cjs +12 -7
- package/dist/modules/waapi/waapi.js +12 -7
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - timer - CJS
|
|
3
|
-
* @version v4.3.0
|
|
3
|
+
* @version v4.3.0
|
|
4
4
|
* @license MIT
|
|
5
|
-
* @copyright
|
|
5
|
+
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
@@ -463,10 +463,11 @@ class Timer extends clock.Clock {
|
|
|
463
463
|
|
|
464
464
|
/**
|
|
465
465
|
* Imediatly completes the timer, cancels it and triggers the onComplete callback
|
|
466
|
+
* @param {Boolean|Number} [muteCallbacks]
|
|
466
467
|
* @return {this}
|
|
467
468
|
*/
|
|
468
|
-
complete() {
|
|
469
|
-
return this.seek(this.duration).cancel();
|
|
469
|
+
complete(muteCallbacks = 0) {
|
|
470
|
+
return this.seek(this.duration, muteCallbacks).cancel();
|
|
470
471
|
}
|
|
471
472
|
|
|
472
473
|
/**
|
|
@@ -124,9 +124,10 @@ export class Timer extends Clock {
|
|
|
124
124
|
revert(): this;
|
|
125
125
|
/**
|
|
126
126
|
* Imediatly completes the timer, cancels it and triggers the onComplete callback
|
|
127
|
+
* @param {Boolean|Number} [muteCallbacks]
|
|
127
128
|
* @return {this}
|
|
128
129
|
*/
|
|
129
|
-
complete(): this;
|
|
130
|
+
complete(muteCallbacks?: boolean | number): this;
|
|
130
131
|
/**
|
|
131
132
|
* @typedef {this & {then: null}} ResolvedTimer
|
|
132
133
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - timer - ESM
|
|
3
|
-
* @version v4.3.0
|
|
3
|
+
* @version v4.3.0
|
|
4
4
|
* @license MIT
|
|
5
|
-
* @copyright
|
|
5
|
+
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { minValue, noop, maxValue, compositionTypes, tickModes } from '../core/consts.js';
|
|
@@ -461,10 +461,11 @@ class Timer extends Clock {
|
|
|
461
461
|
|
|
462
462
|
/**
|
|
463
463
|
* Imediatly completes the timer, cancels it and triggers the onComplete callback
|
|
464
|
+
* @param {Boolean|Number} [muteCallbacks]
|
|
464
465
|
* @return {this}
|
|
465
466
|
*/
|
|
466
|
-
complete() {
|
|
467
|
-
return this.seek(this.duration).cancel();
|
|
467
|
+
complete(muteCallbacks = 0) {
|
|
468
|
+
return this.seek(this.duration, muteCallbacks).cancel();
|
|
468
469
|
}
|
|
469
470
|
|
|
470
471
|
/**
|
|
@@ -12,7 +12,7 @@ export type DefaultsParams = {
|
|
|
12
12
|
duration?: number | FunctionValue;
|
|
13
13
|
delay?: number | FunctionValue;
|
|
14
14
|
loopDelay?: number;
|
|
15
|
-
ease?: EasingParam;
|
|
15
|
+
ease?: EasingParam | FunctionValue;
|
|
16
16
|
composition?: "none" | "replace" | "blend" | compositionTypes;
|
|
17
17
|
modifier?: (v: any) => any;
|
|
18
18
|
onBegin?: Callback<Tickable>;
|
|
@@ -114,7 +114,7 @@ export type TimerOptions = {
|
|
|
114
114
|
playbackRate?: number;
|
|
115
115
|
};
|
|
116
116
|
export type TimerParams = TimerOptions & TickableCallbacks<Timer>;
|
|
117
|
-
export type FunctionValue = (target: Target, index: number, length: number) => number | string | TweenObjectValue | Array<number | string | TweenObjectValue>;
|
|
117
|
+
export type FunctionValue = (target: Target, index: number, length: number) => number | string | TweenObjectValue | EasingParam | Array<number | string | TweenObjectValue>;
|
|
118
118
|
export type TweenModifier = (value: number) => number | string;
|
|
119
119
|
export type ColorArray = [number, number, number, number];
|
|
120
120
|
export type Tween = {
|
|
@@ -187,13 +187,13 @@ export type TweenPropertySiblings = {
|
|
|
187
187
|
export type TweenLookups = Record<string, TweenPropertySiblings>;
|
|
188
188
|
export type TweenReplaceLookups = WeakMap<Target, TweenLookups>;
|
|
189
189
|
export type TweenAdditiveLookups = Map<Target, TweenLookups>;
|
|
190
|
-
export type TweenParamValue = number | string | FunctionValue;
|
|
190
|
+
export type TweenParamValue = number | string | FunctionValue | EasingParam;
|
|
191
191
|
export type TweenPropValue = TweenParamValue | [TweenParamValue, TweenParamValue];
|
|
192
192
|
export type TweenComposition = (string & {}) | "none" | "replace" | "blend" | compositionTypes;
|
|
193
193
|
export type TweenParamsOptions = {
|
|
194
194
|
duration?: TweenParamValue;
|
|
195
195
|
delay?: TweenParamValue;
|
|
196
|
-
ease?: EasingParam;
|
|
196
|
+
ease?: EasingParam | FunctionValue;
|
|
197
197
|
modifier?: TweenModifier;
|
|
198
198
|
composition?: TweenComposition;
|
|
199
199
|
};
|
|
@@ -253,7 +253,7 @@ export type TimelineOptions = {
|
|
|
253
253
|
};
|
|
254
254
|
export type TimelineParams = TimerOptions & TimelineOptions & TickableCallbacks<Timeline> & RenderableCallbacks<Timeline>;
|
|
255
255
|
export type WAAPITweenValue = string | number | Array<string> | Array<number>;
|
|
256
|
-
export type WAAPIFunctionValue = (target: DOMTarget, index: number, length: number) => WAAPITweenValue;
|
|
256
|
+
export type WAAPIFunctionValue = (target: DOMTarget, index: number, length: number) => WAAPITweenValue | WAAPIEasingParam;
|
|
257
257
|
export type WAAPIKeyframeValue = WAAPITweenValue | WAAPIFunctionValue | Array<string | number | WAAPIFunctionValue>;
|
|
258
258
|
export type WAAPITweenOptions = {
|
|
259
259
|
to?: WAAPIKeyframeValue;
|
|
@@ -271,7 +271,7 @@ export type WAAPIAnimationOptions = {
|
|
|
271
271
|
playbackRate?: number;
|
|
272
272
|
duration?: number | WAAPIFunctionValue;
|
|
273
273
|
delay?: number | WAAPIFunctionValue;
|
|
274
|
-
ease?: WAAPIEasingParam;
|
|
274
|
+
ease?: WAAPIEasingParam | WAAPIFunctionValue;
|
|
275
275
|
composition?: CompositeOperation;
|
|
276
276
|
persist?: boolean;
|
|
277
277
|
onComplete?: Callback<WAAPIAnimation>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - utils - ESM
|
|
3
|
-
* @version v4.3.0
|
|
3
|
+
* @version v4.3.0
|
|
4
4
|
* @license MIT
|
|
5
|
-
* @copyright
|
|
5
|
+
* @copyright 2026 - Julian Garnier
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export { clamp, damp, degToRad, lerp, mapRange, padEnd, padStart, radToDeg, round, roundPad, snap, wrap } from './chainable.js';
|