0.0.6 • Published 1 month ago

animate.ts v0.0.6

Weekly downloads
-
License
-
Repository
github
Last release
1 month ago

animate.ts

animate.ts is an animation library for Typescript.

install animate.ts

npm install animate.ts

usage

import animate from 'animate.ts';

function easing(x: number): number {
  return x;
}
// an animation will run for 3 seconds
const stop = animate({
  start: 0,
  end: 1000,
  duration: 3000,
  easing: easing.easeOutBounce,
  onStep: (progress: number, x: number) => {
    console.log("current progress",progress); // 'easing' return value
    console.log("current x",x); // the range of x is form start to end
  }
})

use easing

import easing from 'animate.ts/dist/easing.js';

stop animation

// if you want to stop animation after two seconds
setTimeout(stop, 2000)
0.0.5

1 month ago

0.0.6

1 month ago

0.0.4

2 months ago

0.0.3

3 months ago

0.0.2

3 months ago

0.0.1

3 months ago