3.1.0 • Published 1 month ago

@remvst/animate.js v3.1.0

Weekly downloads
5
License
UNLICENSED
Repository
-
Last release
1 month ago

animate.js

Simple Javascript animation system. Provides timelines and interpolations.

Example

import { Timeline, Animation, InterpolationPool } from '@remvst/animate.js';

const pool = new InterpolationPool();

new Timeline()
    .append(new Animation(myView).interpToOffset('position.x', 100).during(0.3))
    .wait(1)
    .append(new Animation(myView).interpToOffset('position.x', -100).during(0.3))
    .run(pool);


function frame(elapsed: number) {
    pool.cycle(elapsed);
}