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

1.0.2 • Public • Published

eaz

↝ Simple and flexible easing package for smooth animations

Installation: npm i eaz

npm npmlogo

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    7
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i eaz

Weekly Downloads

5

Version

1.0.2

License

ISC

Unpacked Size

12 kB

Total Files

10

Last publish

Collaborators

  • robertmay