| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2025-09-29 | 4.1 kB | |
| v4.2.0 source code.tar.gz | 2025-09-29 | 3.0 MB | |
| v4.2.0 source code.zip | 2025-09-29 | 3.3 MB | |
| Totals: 3 Items | 6.3 MB | 0 | |
Looking at the structure of the second file, I'll reformat the first file to match that cleaner format:
Breaking Changes
- Utils
- Remove
interpolate()(use the simplifiedlerp()instead) - Remove the clock parameter from
lerp()(use the framerate dependent damping functiondamp()instead) - Setting a CSS variable using
utils.set()now computes the variable value instead of setting the var name. To set the variable name without conversion, use a function-based value (x: () => var(--value)) or use the nativeelement.style.setProperty('--value') - Easings
linear(),irregular(),steps()andcubicBezier()have been removed from the core and must now be imported separately
New Features
- API
-
All modules can now be imported individually with subpaths:
:::js import { animate } from 'animejs/animation'; import { createTimer } from 'animejs/timer'; import { createTimeline } from 'animejs/timeline'; import { createAnimatable } from 'animejs/animatable'; import { createDraggable } from 'animejs/draggable'; import { createScope } from 'animejs/scope'; import { engine } from 'animejs/engine'; import * as events from 'animejs/events'; import * as easings from 'animejs/easings'; import * as utils from 'animejs/utils'; import * as svg from 'animejs/svg'; import * as text from 'animejs/text'; import * as waapi from 'animejs/waapi'; - Spring - Add
bounceparameter to control the strength of the spring - Adddurationparameter to define the perceived duration of the spring - AddonCompletecallback called when the spring currentTime hits the perceived duration - Support for over-damped springs with stiffness values below 30 (previously these values had no effect) - WAAPI -waapi.animate()built-in eases are now on par with the JSanimate()method, plus all native WAAPI easing parameters - Addpersistparameter to control whether the animation should be canceled on finish - JS Animation - Add support for CSS variable values (e.g.,animate(target, { x: 'var(--x, 100px)' })) - Utils - AddcreateSeededRandom()to generate pre-seeded pseudo-random utility functions - Docs - Add an easing functions editor
Bug Fixes
- Draggable
- Allow touch dragging within Shadow DOM (#1067)
- Fix draggable getting stuck while dragging near the origin of the initial grab
- Animation
- Fix
animation.revert()not properly reverting multi-target animations styles when targets have different starting style values - Fix inline styles with hyphens (e.g.,
border-radius,stroke-width) not being properly reverted - WAAPI
- Fix
animation.cancel()not properly committing styles before canceling - Fix
animation.revert()not properly reverting multi-target animation styles and not overriding newly added styles - Fix scroll-controlled WAAPI animations being disconnected after completing once
- Fix staggered animations with
reversed: truenot updating on play - Timeline
- Fix
tl.call()not being fired in some cases (#1088)
Changes
- Utils
stagger()has been moved to/utilsbut still available globally viaimport { stagger } from 'animejs'- WAAPI
waapi.convertEase()values are now rounded to 4 decimals (previously no rounding)- Spring
massminimum value is now clamped to 1stiffnessminimum allowed value is now 0dampingminimum allowed value is now 0- Easings
Ease Backdefault overshoot value is now 1.7 (previously 1.70158)- Types
- Add
@types/nodedependency for type checking (#1069) - Build
- Simplify build scripts:
build,dev,dev:test,test:browser,test:node,open:examples
Deprecated
- Text
text.split()deprecated, usesplitText()ortext.splitText()instead- Spring
createSpring()deprecated, usespring()instead