@rxfx/animation
TypeScript icon, indicating that this package has built-in type declarations

0.9.2 • Public • Published

𝗥𝘅𝑓𝑥 animation

Create JS-driven animations without recursive requestAnimationFrame calls, and with appropriate cancelation and timeouts.

A TypeScript/Observable version of TweenJS.

Includes @rxfx/perception, @rxfx/after.

Example:

import { tweenToValue, LERP, Easing } from '@rxfx/animation';

const tweens = tweenToValue(
  { x: 1 },     // start
  { x: 100 },   // end
  100,          // duration
  Easing.Exponential.Out // optional - defaults linear
);

tweens.subscribe({
  next(frame) {
    // frame.x increases toward 100 every animationFrame
  },
});

Part of the 𝗥𝘅𝑓𝑥 family of libraries.

Readme

Keywords

none

Package Sidebar

Install

npm i @rxfx/animation

Weekly Downloads

4

Version

0.9.2

License

MIT

Unpacked Size

247 kB

Total Files

45

Last publish

Collaborators

  • deanius