Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ikun-svelte/smoke-distance
- Owner: ikun-svelte
- License: mit
- Created: 2023-08-23T14:10:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-25T07:27:22.000Z (over 1 year ago)
- Last Synced: 2024-08-10T00:05:54.904Z (6 months ago)
- Topics: easing
- Language: TypeScript
- Homepage:
- Size: 79.1 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)