unstale

npm / animejs

animejs

What changed in animejs 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.

18 breaking75 new APIs and options4 performance9 behavior and defaults1 tooling42 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

animejs 4119 changes

Breaking changes 9

  • Color animations blend RGB channels in pseudo-linear space for smoother, more even transitions; intermediate colors may differ from previous versions.

    4.5.0release notes

  • The DevTools integration has been removed.

    4.4.0release notes

  • Direct animation of matrix is no longer supported; matrix values remain preserved when read from inline styles and can still be set using a transform string.

    4.4.0release notes

  • Direct animation of matrix3d is no longer supported; matrix values remain preserved when read from inline styles and can still be set using a transform string.

    4.4.0release notes

  • The third argument to function-based value callbacks is now the targets array rather than the total target count; use targets.length to get the count.

    4.4.0release notes

  • The third argument to the stagger callback is now the targets array instead of the total count; use targets.length to get the count.

    4.4.0release notes

  • Transforms now render in a fixed order—perspective, translate, rotate, scale, then skew—regardless of the order in animation parameters.

    4.4.0release notes

  • The default composition is replace, overriding existing animations.

    4.0.0release notes

  • The rewrite includes improved performance.

    4.0.0release notes

New APIs and options 63

  • Adds a built-in Three.js adapter for animating Object3D, materials, lights, cameras, audio nodes, UniformNode, and instanced meshes.

    4.5.0release notes

  • Adds an API for extending animate() and utils.set() to non-DOM targets.

    4.5.0release notes

  • The axis parameter accepts 'z' for 3D grid origins.

    4.5.0release notes

  • The from parameter accepts normalized [x, y, z] coordinates for 3D grid origins.

    4.5.0release notes

  • Auto-grid mode supports 3D layouts using x, y, and z coordinates or an explicit columns, rows, and depth triplet.

    4.5.0release notes

  • Adds a jitter parameter for adding a random offset to staggered values, as a single number or a [start, end] range.

    4.5.0release notes

  • Adds a seed parameter to make jitter and from: 'random' reproducible.

    4.5.0release notes

  • The addChild helper is now exported from utils.

    4.4.0release notes

  • The forEachChildren helper is now exported from utils.

    4.4.0release notes

  • The stagger from parameter accepts normalized [x, y] coordinate arrays from 0 to 1 for precise grid origin control.

    4.4.0release notes

  • globals is now exported from the main module entry point.

    4.4.0release notes

  • Adds an editor hook system for an external editor to intercept animate() and createTimeline() calls.

    4.4.0release notes

  • Adds grid: true auto-grid mode, which computes a 2D layout from element positions or JS object coordinates without requiring explicit dimensions.

    4.4.0release notes

  • createLayout() now accepts an id parameter.

    4.4.0release notes

  • Function-based value callbacks receive a fourth argument with the previous sibling tween's computed end value for the same target and property.

    4.4.0release notes

  • Adds a parameter to control execution order within the engine tick loop for timers, animations, and timelines.

    4.4.0release notes

  • The removeChild helper is now exported from utils.

    4.4.0release notes

  • Adds a function-based value for animating text with a character-by-character scramble and reveal effect.

    4.4.0release notes

  • Adds an onResize callback that triggers when the scroll container refreshes due to a resize event.

    4.3.3release notes

  • Adds muteCallbacks to .complete() so an animation can complete without triggering callbacks.

    4.3.0release notes

  • Adds a parameter to disable animation composition when using .add() and improve performance.

    4.3.0release notes

  • Adds a method to animate between two layout states.

    4.3.0release notes

  • Controls whether animations replace, blend with, or run independently of existing animations.

    4.0.0release notes

  • Adds control over an animation's maximum fps.

    4.0.0release notes

  • Adds object syntax for defining a tween's from and to values and easing.

    4.0.0release notes

  • Adds a more flexible keyframes system with tween-value, tween-parameter, duration-based, and percentage-based syntaxes.

    4.0.0release notes

  • Adds a function for transforming animation values during render.

    4.0.0release notes

  • Adds a callback invoked before each animation update.

    4.0.0release notes

  • Adds a callback triggered when an animation completes an iteration.

    4.0.0release notes

  • Adds a callback invoked when an animation is paused manually or interrupted by another animation.

    4.0.0release notes

  • Adds a callback triggered when animation values are updated and applied.

    4.0.0release notes

  • Applies easing to overall animation progress.

    4.0.0release notes

  • Executes a callback at a timeline position.

    4.0.0release notes

  • Immediately completes an animation.

    4.0.0release notes

  • Efficiently animates target properties, suited to frequently changing values such as cursor events or animation loops.

    4.0.0release notes

  • Adds draggable capabilities to DOM elements with physics, constraints, and callbacks.

    4.0.0release notes

  • Adds scopes for media-query reactions, custom root elements, shared defaults, and batch reversion.

    4.0.0release notes

  • Adds a spring API with object parameters.

    4.0.0release notes

  • Adds a dedicated defaults parameter for defining timeline child defaults.

    4.0.0release notes

  • Creates timers that schedule and control timed callbacks, keeping them in sync with animations.

    4.0.0release notes

  • Animations now support CSS variables.

    4.0.0release notes

  • Sets default animation parameters globally.

    4.0.0release notes

  • Controls whether animations pause when the tab is inactive.

    4.0.0release notes

  • Controls decimal precision for animated values globally.

    4.0.0release notes

  • Chooses between seconds and milliseconds for engine time units.

    4.0.0release notes

  • Adds a parameterized power easing function.

    4.0.0release notes

  • Adds random stepped easing.

    4.0.0release notes

  • Creates named timeline markers for referencing.

    4.0.0release notes

  • Adds multi-point linear interpolation easing.

    4.0.0release notes

  • Triggers and synchronizes Timer, Animation, and Timeline instances on scroll.

    4.0.0release notes

  • Updates all function-based animation values with new states.

    4.0.0release notes

  • Removes specific animations from a timeline.

    4.0.0release notes

  • Restores all animated properties to their original values.

    4.0.0release notes

  • Sets properties instantly at a timeline position.

    4.0.0release notes

  • Scales an animation to a new duration.

    4.0.0release notes

  • Adds control over SVG path drawing.

    4.0.0release notes

  • Adds the ability to move elements along SVG paths.

    4.0.0release notes

  • Adds SVG shape morphing between paths.

    4.0.0release notes

  • Synchronizes an external animation with a timeline.

    4.0.0release notes

  • Adds simpler Promise handling for animations.

    4.0.0release notes

  • Adds label references, previous-animation references, and relative positions for timeline positions.

    4.0.0release notes

  • Adds chainable utility functions for DOM manipulation, math operations, and animation helpers.

    4.0.0release notes

  • Creates native browser WAAPI-powered animations with the simplicity of Anime.js.

    4.0.0release notes

Performance 4

  • engine.speed updates are faster because unnecessary work is skipped when the value does not change.

    4.5.0release notes

  • engine.timeUnit updates are faster because unnecessary work is skipped when the value does not change.

    4.5.0release notes

  • Improves performance when building large timelines with many overlapping .add() calls on the same property and fixes a case where the timeline could cancel itself.

    4.5.0release notes

  • Increases the engine's maximum fps to 240 from 120.

    4.3.0release notes

Behavior and default changes 6

  • The target type for splitText() and TextSplitter is widened from HTMLElement to Element.

    4.4.0release notes

  • Adjacent translate and scale axis properties are grouped into CSS shorthand forms, producing shorter transform strings.

    4.4.0release notes

  • Synced WAAPI animations now automatically have their persist property set to true.

    4.3.4release notes

  • The ease parameter now accepts function-based values, like duration and delay properties.

    4.3.0release notes

  • Animations now support hex colors with an alpha channel.

    4.0.0release notes

  • The stagger function can now be used as a timeline time position.

    4.0.0release notes

Fixes and other changes 37

  • Fixes random flicker on alternate loops when duration values are non-integers.

    4.5.0release notes

  • Frame scheduling is more accurate and no longer drops frames arriving slightly early because of requestAnimationFrame jitter.

    4.5.0release notes

  • Fixes implicit from values resolving to stale values when an overridden tween occurs earlier in the chain.

    4.5.0release notes

  • Fixes a crash when a scroll container resizes before its target is ready.

    4.5.0release notes

  • Fixes floating point precision producing incorrect intermediate values in keyframe arrays.

    4.5.0release notes

  • Fixes backward scrubbing past the start of a keyframe sequence not restoring the first keyframe's from value.

    4.5.0release notes

  • Fixes forward scrubbing past the end of a keyframe sequence leaving the target at a previous keyframe's value.

    4.5.0release notes

  • Fixes sequential keyframes being detected as overlapping because of floating point drift, which could leave the target at the wrong value when scrubbing.

    4.5.0release notes

  • Function-based and CSS variable from values in { from, to } object form now re-resolve on refresh().

    4.5.0release notes

  • Fixes random flicker between iterations of reversed loops.

    4.5.0release notes

  • Fixes stretch() incorrectly scaling animations that use keyframes.

    4.5.0release notes

  • Fixes backward seeking leaving a timeline child at its end value when all its properties share the same delay.

    4.5.0release notes

  • Fixes a delayed timeline child overwriting a later sibling's value during a forward seek when its delay exceeds its duration.

    4.5.0release notes

  • Fixes stale values when seeking timelines whose children animate the same property through delayed tweens, especially with staggered jitter delays.

    4.5.0release notes

  • Fixed a regression where timeline call did not trigger properly in some cases.

    4.4.1release notes

  • addEffect() now returns this when the effect argument is not a function.

    4.4.0release notes

  • Accessing a non-existent chainable method now returns undefined instead of throwing an error.

    4.4.0release notes

  • Parsing now handles multi-argument CSS transform functions and nested calc() expressions.

    4.4.0release notes

  • Tracked animations reconstructed during effect refresh now preserve _startTime, preventing timing jumps.

    4.4.0release notes

  • Scroll-controlled layout animations now properly call onComplete and onPause callbacks.

    4.4.0release notes

  • Chaining in keyframe arrays and timelines now produces the correct intermediate shapes.

    4.4.0release notes

  • revert() now restores object properties and DOM attributes to their original values as well as CSS styles and transforms.

    4.4.0release notes

  • Auto Layout now properly syncs with onScroll, allowing layout animations to be controlled by scroll progress.

    4.3.6release notes

  • Fixes a regression so CSS computed style for background is correctly interpreted as a color value.

    4.3.5release notes

  • Fixes a regression that prevented inline elements from being animated in some cases with Auto Layout.

    4.3.5release notes

  • Fixes comment syntax that could potentially cause an error.

    4.3.4release notes

  • Function-based from values now refresh correctly when calling refresh().

    4.3.3release notes

  • Unit conversion is recalculated on refresh.

    4.3.3release notes

  • Fixes detection of inline tags such as span or strong when they are surrounded by comments.

    4.3.1release notesrelease notes

  • Complex values containing a color are now handled as complex string values rather than color values.

    4.3.0release notes

  • Fixes spring easing being ignored when defined in the defaults parameter.

    4.3.0release notes

  • Fixes .call() and .sync() incorrectly inheriting delay from defaults parameters.

    4.3.0release notes

  • Fixes cases where animations were not properly removed from document.timeline.

    4.3.0release notes

  • Fixes the first word of the second line being incorrectly added to the first line.

    4.3.0release notes

  • Fixes unnecessary empty spaces not being properly removed from lines.

    4.3.0release notes

  • Fixes spring parameters not properly setting the duration in Draggable.

    4.3.0release notes

  • Child loop and direction parameters are included in timeline duration, allowing seeking through iterations.

    4.0.0release notes

animejs 330 changes

Breaking changes 9

  • Adds the change callback, replacing run().

    3.0.0release notes

  • Cubic Bézier curves are now defined using a cubicBezier(x1,y1,x2,y2) string instead of an array.

    3.0.0release notes

  • Adds get() as the replacement for getValue().

    3.0.0release notes

  • getValue() is replaced by get().

    3.0.0release notes

  • Animations are now paused when the browser tab or window is not active.

    3.0.0release notes

  • The Timeline offset property is replaced by timelineOffset.

    3.0.0release notes

  • The run() callback is replaced by change().

    3.0.0release notes

  • The SVG scale property is no longer overridden by CSS transform scale.

    3.0.0release notes

  • Replaces the Timeline offset property.

    3.0.0release notes

New APIs and options 12

Behavior and default changes 3

  • Adds automatic conversion of CSS units.

    3.0.0release notes

  • remove() can now remove targets from a timeline.

    3.0.0release notes

  • A transform property no longer needs to be re-defined when animating multiple transforms on the same target in a timeline.

    3.0.0release notes

Tooling 1

Fixes and other changes 5

  • Fixes selection of specific HTML id selectors that are HEX colours.

    3.0.0release notes

  • Improves inline style unit handling by checking inline style before getComputedStyle.

    3.0.0release notes

  • Improves simultaneous animations on the same target.

    3.0.0release notes

  • Fixes wrong initial SVG transform values in some cases.

    3.0.0release notes

  • Fixes an error when no timeline parameters object is specified.

    3.0.0release notes