tween-functions

WebJar for tween-functions

License

License

BSD
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

tween-functions
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

tween-functions
WebJar for tween-functions
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/chenglou/tween-functions

Download tween-functions

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/tween-functions/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>tween-functions</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/tween-functions/
implementation 'org.webjars.npm:tween-functions:1.2.0'
// https://jarcasting.com/artifacts/org.webjars.npm/tween-functions/
implementation ("org.webjars.npm:tween-functions:1.2.0")
'org.webjars.npm:tween-functions:jar:1.2.0'
<dependency org="org.webjars.npm" name="tween-functions" rev="1.2.0">
  <artifact name="tween-functions" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='tween-functions', version='1.2.0')
)
libraryDependencies += "org.webjars.npm" % "tween-functions" % "1.2.0"
[org.webjars.npm/tween-functions "1.2.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.2.0