@immutabl3/anime

3.2.11 • Public • Published

An updated anime implementation to address specific issues:

  • seek to 0 or initial state did not set initial state or fire updates. code was commented out to allow this, but side effects are currently unknown
  • centralization of requestAnimationFrame calls weren't exposed to sync with other calls. anime no longer starts itself; it needs to be ticked by an outside requestAnimationFrame loop (by importing engine)
  • object mutations were deoptimizing several key processes in Safari, causing slowdowns and hiccups. these were fixed by using better defaults and pulling out object creation
  • reduce loops were causing general deoptimizing in browsers, seemingly randomly. these reduces were to perform array flattening (now replaced with .flat()) and sorting and have been replaced or removed
  • functional loops (e.g. forEach), though nice, were creating functions-in-loops deeply. these have been addressed where possible to avoid function creation and reduce spikes in garbage collection
  • initialization of many animations was very slow. the central anime call and other encapsulations have been turned into pure functions and/or classes
  • substituted Map & Set where possible to reduce loop work-arounds/indexOf/includes checks
  • heavier parts of the library can now be tree shaked when not imported/used
  • general modernization of the library


anime.js

JavaScript animation engine | animejs.com

npm version npm downloads

Anime.js (/ˈæn.ə.meɪ/) is a lightweight JavaScript animation library with a simple, yet powerful API.
It works with CSS properties, SVG, DOM attributes and JavaScript Objects.

Getting started | Documentation | Demos and examples | Browser support

Getting started

Download

Via npm

$ npm install animejs --save

or manual download.

Usage

ES6 modules

import anime from 'animejs/lib/anime.es.js';

CommonJS

const anime = require('animejs');

File include

Link anime.min.js in your HTML :

<script src="anime.min.js"></script>

Hello world

anime({
  targets: 'div',
  translateX: 250,
  rotate: '1turn',
  backgroundColor: '#FFF',
  duration: 800
});

Documentation

Demos and examples

Browser support

Chrome Safari IE / Edge Firefox Opera
24+ 8+ 11+ 32+ 15+

anime-js-v3-logo

Website | Documentation | Demos and examples | MIT License | © 2019 Julian Garnier.

Package Sidebar

Install

npm i @immutabl3/anime

Weekly Downloads

4

Version

3.2.11

License

MIT

Unpacked Size

8.26 MB

Total Files

114

Last publish

Collaborators

  • immutabl3