1.5.11 • Published 2 years ago

parsegraph-animator v1.5.11

Weekly downloads
5
License
MIT
Repository
github
Last release
2 years ago

Animator

Animator manages a date-based percent value.

import Animator from 'parsegraph-animator';

const interval = 3000;
const anim = new Animator(interval);
anim.restart();
const animate = ()=>{
  console.log(anim.t());
  requestAnimationFrame(animate);
};
requestAnimationFrame(animate);
setTimeout(()=>anim.restart(), interval);

Output:

anim.t() counts from 0 to 1 over 3s, repeating every 3s.
1.5.10-dev

2 years ago

1.5.10

2 years ago

1.5.11

2 years ago

1.5.11-dev

2 years ago

1.5.9-dev

2 years ago

1.5.9

2 years ago

1.5.8

3 years ago

1.5.8-dev

3 years ago

1.5.7-dev

3 years ago

1.5.7

3 years ago

1.5.6-dev

3 years ago

1.5.6

3 years ago

1.5.5-dev

4 years ago

1.5.5

4 years ago

1.5.4

4 years ago