sunify / object-transit

Utility for object values transition

Home Page:https://sunify.github.io/object-transit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Utility for object values transition

Usage

import transit from 'object-transit';

const object = transit({ a: 0 }, console.log);

object.to(
  { a: 100 },
  {
    duration: 300
  }
);

Demo

https://sunify.github.io/object-transit/

Params

List of params

  • duration — duration in ms, defaults to 300
  • easing — simple easing function that takes one argument — time (from 0 to 1). Defaults to linear. You can use functions from eases or similar package
  • fps — defaults to 60
  • end — transition end callback

About

Utility for object values transition

https://sunify.github.io/object-transit/


Languages

Language:TypeScript 39.5%Language:JavaScript 30.9%Language:HTML 18.4%Language:CSS 11.2%