Skip to content

ikun-svelte/smoke-distance

Repository files navigation

smoke-distance

tweening engine for Typescript

Install

npm i unplugin-vue-cssvars -D

Or

yarn add unplugin-vue-cssvars -D

Or

pnpm add unplugin-vue-cssvars -D

Usage

import SmokeDistance from 'b-tween';
const smoke = new SmokeDistance({
  from: {
    left: 0
  },
  to: {
    left: 700
  },
  duration: 500,
  easing: 'bounceOut',
  onUpdate: (keys) => {
    // You can do everything with keys
    block.style.left = keys.left + 'px';
  }
});
smoke.start();

Thanks

b-tween