1.0.0 • Published 6 years ago

seven-tween-ease v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

Seven Tween Ease

Easing functions for seven tween or whatever you might need them for

Installation

Installing Package

npm install -D seven-tween-ease

Importing in node

let sevenTweenEase = require('seven-tween-ease')

Importing in Webpack

import sevenTweenEase from 'seven-tween-ease'

Importing through script tag
To be found in the release folder

<script type="text/javascript" src="seven-tween-ease.min.js"> 

Usage

Access the tweening functions and use them as you want or to overwrite seven-tweens _easeFunctions property. If you are using it for seven-tween, you can also just use the plugin method.

// Seven Tween Usage
sevenTweenEase.plugin(sevenTween)
// OR
sevenTween._easeFunctions = sevenTweenEase.easeFunctions

// Generic usage for other purposes.
let easeFunctions = sevenTweenEase.easeFunctions
let elasticOut = easeFunctions.easeOutElastic
let exponentialInOut = easeFunctions['easeInOutExpo']

Ease Function parameters

All the supplied functions take the following parameters: (t, b, c ,d) where:

  • t = total time ellapsed of tween.
  • b = initial tween value
  • c = difference from initial tween value and the final tween value
  • d = total duration of tween