JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q32650F
  • License ISC

↝ Simple and flexible easing package for smooth animations

Package Exports

  • eaz

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eaz) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eaz

↝ Simple and flexible easing package for smooth animations

Installation: npm i eaz

documentation 📖

Use Predefined Easing Functions

Using predefined easing functions is as simple as referencing a static property of the Easing class.

import { Easing } from 'eaz';

Easing.cubic.in(0.3); // Output: 0.0269

Every Easing object contains an in, out, and inOut method, and more options. Refer to the documentation for theEasing class for more information.

Create Custom Easing Functions

Use eaz's generational methods to create custom easing functions quickly

import { Easing } from 'eaz';

Easing.polynomial(2.5).in(0.3); // Output: 0.0493

Or create entirely custom easing methods from scratch

import { Easing } from 'eaz';

const myEasing = new Easing(t => t ** 2.5);
myEasing.in(0.3); // Output: 0.0493

Easily Generate Demo Images

Generate images to test your easing functions

import { Easing, DemoImage } from '../index';

DemoImage.inOut(Easing.cubic, 'images/cubicInOut.png');

Output: images/cubicInOut.png