Coder Social home page Coder Social logo

eases's Introduction

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
var quadIn = require('eases').quadIn

//require only the single function
var quadIn = require('eases/quad-in')

Usage

NPM

Each easing has its own file which can be required individually. The entry point also exports all eases with camelCase, so require('eases/expo-in-out') becomes require('eases').expoInOut.

Full list of eases:

require('eases/back-in-out')
require('eases/back-in')
require('eases/back-out')
require('eases/bounce-in-out')
require('eases/bounce-in')
require('eases/bounce-out')
require('eases/circular-in-out')
require('eases/circular-in')
require('eases/circular-out')
require('eases/cubic-in-out')
require('eases/cubic-in')
require('eases/cubic-out')
require('eases/elastic-in-out')
require('eases/elastic-in')
require('eases/elastic-out')
require('eases/exponential-in-out')
require('eases/exponential-in')
require('eases/exponential-out')
require('eases/linear')
require('eases/quadratic-in-out')
require('eases/quadratic-in')
require('eases/quadratic-out')
require('eases/quartic-in-out')
require('eases/quartic-in')
require('eases/quartic-out')
require('eases/quintic-in-out')
require('eases/quintic-in')
require('eases/quintic-out')
require('eases/sine-in-out')
require('eases/sine-in')
require('eases/sine-out')

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

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.

eases's People

Contributors

mattdesl avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.