JSPM

eases-jsnext

1.0.10
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 455
  • Score
    100M100P100Q100957F
  • License MIT

grab bag of easing equations

Package Exports

  • eases-jsnext

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 (eases-jsnext) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eases-jsnext

This is a fork of mattdesl/eases. It includes tree-shaking-friendly ES6 modules, and a UMD build for use in browser.

It preserves the original individual CommonJS files, and therefore serves as a drop-in replacement.


eases

stable

This is a grab-bag of Robert Penner's easing equations, most of the code from glsl-easings. Pull requests for optimizations are welcome.

//require all eases
import * as eases from 'eases-jsnext';

//require only the single function
import { quadIn } from 'eases-jsnext';

Usage

NPM

Full list of eases:

import {
  backInOut,
  backIn,
  backOut,
  bounceInOut,
  bounceIn,
  bounceOut,
  circInOut,
  circIn,
  circOut,
  cubicInOut,
  cubicIn,
  cubicOut,
  elasticInOut,
  elasticIn,
  elasticOut,
  expoInOut,
  expoIn,
  expoOut,
  linear,
  quadInOut,
  quadIn,
  quadOut,
  quartInOut,
  quartIn,
  quartOut,
  quintInOut,
  quintIn,
  quintOut,
  sineInOut,
  sineIn,
  sineOut
} from 'eases-jsnext';

All easing functions only remap a time value, and all have the same signature.

v = ease(t)

Where t is typically a value between 0 and 1, and it returns a new float that has been eased.

License

MIT, see LICENSE.md for details.