Sensible defaults
By default, a native WAAPI animation requires a duration to be set, won't have any easing applied, and more annoyingly, won't persist its final value, letting the user to take care of setting the final styles manually after the animation completes.
Anime.js simplifies all that by making sure the animation state is preserved after the animation completes, and uses the same default duration and delay as the JS animate()
method.
Syntax comparison
Anime.js
waapi.animate('.circle', { translate: '100px' });
WAAPI equivalent
const $el = document.querySelector('.circle');
$el.animate({ translate: '100px' }, {
duration: 1000,
easing: 'ease-out',
}).finished.then(() => {
$el.style.translate = '100px';
});
Sensible defaults code example
import { waapi } from 'animejs';
waapi.animate('.circle', { translate: '16rem' });
<div class="large row">
<div class="circle"></div>
</div>