@f/animate

WebJar for @f/animate

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

f__animate
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

@f/animate
WebJar for @f/animate
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/micro-js/animate

Download f__animate

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
org.webjars.npm : f__elapsed-time jar [1.0.0,2)
org.webjars.npm : f__raf jar [1.0.0,2)
org.webjars.npm : f__tween jar [1.0.0,2)

Project Modules

There are no modules declared in this project.

animate

Build status Git tag NPM version Code style

Animate properties using requestAnimationFrame and a custom render function

Installation

$ npm install @f/animate

Usage

var animate = require('@f/animate')
var applyStyles = require('@f/apply-styles')

animate({width: 10}, {width: 100}, props => applyStyles(element, props))

API

animate(start, end, render, duration, easing)

  • start - The initial value of the properties you want to animate
  • end - The final value of the properties you want to animate
  • render - A function that receives render(props, t) where props is the interpolated properties, and t is the frame number.
  • duration - The duration in milliseconds. Defaults to 350ms.
  • easing - An easing function that accepts a frame number and interpolates it along an easing curve.

Returns: A stop function. Call it if you want to cancel an in-flight animation.

License

MIT

Versions

Version
1.0.1