juliangarnier/anime
 Watch   
 Star   
 Fork   
27 days ago
anime

v4.4.1

Bug fix

  • Fix a regression introduced in 4.4.0 with timeline .call() not triggering properly in some cases.
28 days ago
anime

v4.4.0

Breaking Changes

  • Transforms
    • Transforms now follow a fixed render order (perspective > translate > rotate > scale > skew), regardless of the order they are defined in animation parameters:
      // Before: scale rendered first because it was defined first
      animate(el, { scale: 2, translateX: 100 }) // → scale(2) translateX(100px)
      // After: order is always fixed
      animate(el, { scale: 2, translateX: 100 }) // → translate(100px, 0px) scale(2)
    • matrix and matrix3d can no longer be animated directly (they are still preserved when read from inline styles and can be set using transform: 'matrix(...)')
  • Function-based values
    • The third argument of function-based value callbacks changed from total (Number) to targets (Array). To migrate, replace total with targets.length:
      // Before
      translateX: (target, index, total) => total * 10
      // After
      translateX: (target, index, targets) => targets.length * 10
    • A fourth argument prevTween is now passed to function-based value callbacks, providing access to the previous sibling tween's computed end value for the same target and property.
  • Stagger
    • The stagger callback signature changed to match function-based values: the third argument is now the targets array instead of the total count:
      // Before
      delay: stagger(100, { use: (target, i, total) => total - i })
      // After
      delay: stagger(100, { use: (target, i, targets) => targets.length - i })

New Features

  • scrambleText
  • Stagger
    • New grid: true auto-grid mode that computes a 2D layout from element positions or JS object coordinates ({x, y}) instead of requiring explicit [columns, rows] dimensions
    • The from parameter now accepts [x, y] normalized coordinate arrays (0 to 1) for precise grid origin control
  • Timer / Animation / Timeline
    • New priority parameter to control execution order within the engine tick loop
  • Transforms
    • Adjacent axis properties are now grouped into CSS shorthand for shorter transform strings:
      • translateX + translateYtranslate(x, y)
      • translateX + translateY + translateZtranslate3d(x, y, z)
      • scaleX + scaleYscale(x, y)
      • scaleX + scaleY + scaleZscale3d(x, y, z)
    • Inline transform parsing rewritten to properly handle multi-argument CSS functions (translate(x, y), scale3d(x, y, z)) and nested calc() expressions
  • Layout
    • createLayout() now accepts an id parameter
  • Exports
    • globals is now exported from the main module entry point
    • forEachChildren, addChild, removeChild helpers are now exported from utils

Bug Fixes and improvements

  • JS Animation
    • revert() now restores object properties and DOM attributes to their original pre-animation values, in addition to CSS styles and transforms (previously only CSS styles and transforms were reverted, leaving animated object props and attributes at their last animated value). The public cleanInlineStyles() utility keeps its original behavior and only clears inline styles and transforms.
    • Fix getOriginalAnimatableValue not storing the original inline value for object properties and DOM attributes, preventing proper revert
  • morphTo
    • Fix chaining in keyframe arrays and timelines producing incorrect intermediate shapes
  • Chainable utils
    • Fix accessing non-existent chainable methods throwing an error instead of returning undefined
  • splitText
    • Fix addEffect() returning undefined instead of this when the effect argument is not a function
  • Layout
    • Fix scroll-controlled layout animations not properly calling onComplete and onPause callbacks
  • keepTime
    • Fix _startTime not being preserved when reconstructing tracked animations, causing timing jumps on effect refresh

Changes

  • Engine
    • DevTools integration (AnimeJSDevTools) removed
    • Render loop performance: inline closures in tick() and render() extracted to module-scope functions to avoid allocation every frame
    • Tween composition is now resolved before computing to/from/duration/delay values, so the previous sibling tween is available to function-based value callbacks
  • splitText
    • Type annotation for splitText() and TextSplitter target parameter widened from HTMLElement to Element
  • Tween value chaining
    • Each tween now pre-computes and stores its end value at construction time
    • Enables function-based values like morphTo and scrambleText to read the previous tween's end value when used in keyframe arrays or timelines
  • morphTo
    • Now properly chains in keyframe arrays and timelines by reading the previous tween's computed end value instead of mutating the target element with a Symbol
  • Editor integration (👀)
    • New globals.editor hook system allowing an external editor to intercept animate() and createTimeline() calls
2026-02-14 01:02:33
anime

v4.3.6

Bug Fixes

  • Auto Layout
    • Fix auto layout not properly synced with onScroll, allowing controlling layout animations like this:
layout.animate({
  autoplay: onScroll({
    sync: true,
  })
});
2026-01-25 17:01:39
anime

v4.3.5

Bug Fixes

  • Auto Layout
    • Fix a regression introduced in v4.3.2 that prevented inline element to be animated in some cases.
  • Animation
    • Fix a regression introduced in v4.3.0 that prevented CSS computed style of background to be correctly interpreted as a color value (#1136).
2026-01-24 00:38:24
anime

v4.3.4

Improvements

  • WAAPI / Timeline
    • Synced WAAPI animations now automatically have their persist property set to true (#1121)

Bug Fixes

  • onScroll
    • Fix comment syntax potentially causing an error (#1124)
2026-01-23 01:54:49
anime

v4.3.2

Bug Fixes

  • Layout
    • Fix an issue where inline tags, like or weren't detected when surrounded by comments (again)
2026-01-23 01:54:49
anime

v4.3.3

Improvements

  • Refresh

    • Function-based "from" values now refresh correctly when calling .refresh()
    • Unit conversion (e.g., svh to rem) is recalculated on refresh
  • onScroll

    • Add onResize callback that triggers when the scroll container refreshes due to a resize event

Documentation

  • Playback

    • Add missing tl.backward / anim.backward / time.backward property doc
  • Easing

    • Add an opacity animation preview to the easing functions editor
2026-01-21 22:06:29
anime

v4.3.1

Bug Fixes

  • Layout
    • Fix an issue where inline tags, like or weren't detected when surrounded by comments
2026-01-20 22:14:58
anime

v4.3.0

New Features

  • AutoLayout
  • Easings
    • The ease parameter now accepts function-based values (like duration and delay properties)
  • Timeline
    • Add composition parameter to disable animation composition when using .add() and greatly improve performance

Bug Fixes

  • JS Animation
    • Fix an issue where complex values containing a color (e.g., box-shadow) would be incorrectly handled as color values instead of complex string values
  • WAAPI
    • Fix animations not being properly removed from document.timeline in some cases
  • Draggable
    • Fix spring parameters not properly setting the duration
  • Timeline
    • Fix spring easing being ignored when defined in the defaults parameter
    • Fix .call() and .sync() incorrectly inheriting delay from defaults parameters
  • splitText
    • Fix a bug where the first word of the second line could be incorrectly added to the first line
    • Fix unnecessary empty spaces not being properly removed from lines

Changes

  • Engine
    • Increase max fps to 240 (previously 120)
    • Animation / Timer / Timeline
    • Add muteCallbacks parameter to .complete(muteCallbacks) to complete the animation without triggering callbacks
2025-10-07 15:26:13
anime

v4.2.2

Fixes

  • SVG
    • createMotionPath(): Fix a bug introduced in v4.2.1 that wrapped the target back to 0 when reaching 1 (#1104 )