Socket
Socket
Sign inDemoInstall

tween-functions

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tween-functions

Robert Penner's easing functions, slightly modified


Version published
Weekly downloads
953K
decreased by-21.02%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

1.2.0 (November 20th 2015)

  • [F] Fix return value of easeInOutExpo, easeInElastic, easeOutElastic and easeInOutElastic. 20b7790

Readme

Source

Tween-functions

Robert Penner's tweening functions as used in React-tween-state and React-state-stream.

Penner's original functions uses the change in value rather than final value as parameter. I much prefer the latter, so this is what this library will use.

API

tweenFunction.tweenName(currentTime, beginValue, endValue, totalDuration)

Example

var tweenFunctions = require('tween-functions');
tweenFunctions.easeInQuad(1, 0, 50, 5); // => 4

List of available functions:

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

Keywords

FAQs

Last updated on 21 Nov 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc