Ninety Proof Mezcal

    @mobilabs/easing

    1.0.1 • Public • Published

    Easing

    NPM version GitHub last commit Travis CI Test coverage npm bundle size License

    Easing is a simple library that implements Robert Penner's easing equations. These equations are encapsulated in the module pattern. Easing is written in pure Javascript. It has no dependency.

    Easing runs on both Node.js and ECMAScript 2015 (ES6) compliant browsers.

    Quick Startup

    This README isn't a tutorial on Easing equations. If you need to understand what are the Easing equations, you can refer here.

    Node.js

    const Easing = require('easing');
    
    // t: current time, b: beginning value, c: change in value, d: duration
    const val = Easing.linear(t, b, c, d);

    Browser

    const val = Easing.linear(t, b, c, d);

    API

    This library implements the following equations:

    linear
    swing
    easeInSine
    easeOutSine
    easeInOutSine
    easeInQuad
    easeOutQuad
    easeInOutQuad
    easeInCubic
    easeOutCubic
    easeInOutCubic
    easeInQuart
    easeOutQuart
    easeInOutQuart
    easeInQuint
    easeOutQuint
    easeInOutQuint
    easeInExpo
    easeOutExpo
    easeInOutExpo
    easeInCirc
    easeOutCirc
    easeInOutCirc
    easeInBack
    easeOutBack
    easeInOutBack
    easeInElastic
    easeOutElastic
    easeInOutElastic
    easeInBounce
    easeOutBounce
    easeInOutBounce
    

    License

    MIT.

    Install

    npm i @mobilabs/easing

    DownloadsWeekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    41.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • jclo