aeonjs
TypeScript icon, indicating that this package has built-in type declarations

4.0.6 • Public • Published

aeon.js

js animation engine | aeonjs.dev

aeon.js is a lightweight, performance-oriented JavaScript animation library following the Anime.js API. It works with CSS properties, SVG, DOM attributes and JavaScript Objects.

Getting started | Documentation | Demos and examples | Browser support | What's Change

Getting started

Download

Via npm

$ npm install aeonjs --save

Usage

import { aeon } from 'aeonjs';

Hello world

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

Documentation

Demos and examples

Browser support

Chrome Safari Edge Firefox Opera
107+ 16+ 107+ 106+ 92+

Changes

This library was created to address specific issues with anime.js:

  • rewritten in typescript
  • incompatibilty with Server Side Rendering
  • seek to 0 or to initial state did not set initial state or fire updates, causing desync issues
  • the requestAnimationFrame loop wasn't exposable to sync with other calls
  • object mutations were deoptimizing several key processes in Safari, causing slowdowns and hiccups
  • reduce loops were causing general deoptimizing in all 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 deep functions-in-loops. these have been addressed where possible to avoid function creation and reduce spikes in memory/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

Website | Documentation | MIT License | © 2022 Immutable.

Package Sidebar

Install

npm i aeonjs

Weekly Downloads

1

Version

4.0.6

License

MIT

Unpacked Size

143 kB

Total Files

76

Last publish

Collaborators

  • immutabl3