2.1.0 • Published 6 years ago

spring-array v2.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

spring-array

Micro library for tweening arrays(or array of arrays). Built-in spring easing. Useful for animating svg paths.

Usage

import tween from 'spring-array';

const from = [0, 0, [0, 0]];
const to = [1, 1, [1, 1]];

const stopper = tween({
  from,
  to,
  update: (value) => { // Called on every frame with current value }
  done: () => { // Called upon completetion },
  // Spring config (optional, defaults show below)
  deceleration: 0.8,
  tension: 0.8,
  friction: 1
});

stopper(); // will stop the tween

License

MIT Daniel Lundin 2018

2.1.0

6 years ago

2.0.0

6 years ago

1.2.4

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

8 years ago