Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ikun-svelte/smoke-distance

🚬tweening engine for Typescript
https://github.com/ikun-svelte/smoke-distance

easing

Last synced: 3 months ago
JSON representation

🚬tweening engine for Typescript

Awesome Lists containing this project

README

        

# smoke-distance
tweening engine for Typescript

## Install

```bash
npm i unplugin-vue-cssvars -D
```
Or
```bash
yarn add unplugin-vue-cssvars -D
```
Or
```bash
pnpm add unplugin-vue-cssvars -D
```
## Usage

```typescript
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](https://github.com/PengJiyuan/b-tween)