github juliangarnier/anime v4.5.0

8 hours ago

New Features

  • Adapters
  • Three.js adapter
    • New built-in three.js adapter, imported as a side-effect from animejs/adapters/three, to animate Object3D, materials, lights, cameras, audio nodes, UniformNode (TSL) and instanced meshes (learn more: https://animejs.com/documentation/adapters/three)
  • Stagger
    • Auto-grid mode now supports 3D layouts, using {x, y, z} coordinates or an explicit grid: [columns, rows, depth] triplet
    • The from parameter now accepts [x, y, z] normalized coordinates and axis now accepts 'z' for 3D grid origins
    • New jitter parameter to add a random offset to staggered values, either a single number or a [start, end] range
    • New seed parameter to make jitter and from: 'random' reproducible

Bug Fixes and improvements

  • Color
    • Color animations now blend RGB channels in pseudo-linear space for smoother, more even transitions (intermediate colors differ slightly from previous versions)
  • Render
    • Fix a flicker that could appear randomly between iterations of reversed loops
    • Fix a flicker that could appear randomly on alternate loops when using non-integer duration values
  • Timeline
    • Fix a backward seek leaving a timeline child stuck at its end value when all its properties share the same delay
    • Fix a timeline child whose delay is longer than its duration overwriting a later sibling's value on a forward seek
    • Fix stale values when seeking a timeline whose children animate the same property through delayed tweens, most visible with staggered jitter delays
    • Fix an implicit from value resolving to a stale value when an overridden tween sits earlier in the chain
    • Improve performance when building large timelines with many overlapping .add() calls on the same property, and fix a case where such a timeline could cancel itself
  • Keyframes
    • Fix a floating point precision issue producing incorrect intermediate values in keyframe arrays
    • Fix scrubbing backward past the start of a keyframe sequence not restoring the first keyframe's from value
    • Fix scrubbing forward past the end of a keyframe sequence leaving the target stuck on a previous keyframe's value
    • Fix sequential keyframes occasionally detected as overlapping because of floating point drift, leaving the target stuck on the wrong value when scrubbing
  • Animation
    • Fix function-based and CSS variable from values in object form ({ from, to }) not re-resolving on refresh()
    • Fix stretch() not correctly scaling animations that use keyframes
  • Scroll
    • Fix a getBoundingClientRect crash that could happen when a scroll container resized before its target was ready
  • Engine
    • More accurate frame scheduling that no longer drops frames arriving slightly early because of requestAnimationFrame jitter
    • Faster engine.speed and engine.timeUnit updates that skip unnecessary work when the value does not actually change

Don't miss a new anime release

NewReleases is sending notifications on new releases.