Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshnuss/svelte-animation-store
https://github.com/joshnuss/svelte-animation-store
animation svelte
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/joshnuss/svelte-animation-store
- Owner: joshnuss
- Created: 2021-05-03T03:47:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-03T05:58:57.000Z (over 3 years ago)
- Last Synced: 2024-08-04T03:05:38.368Z (3 months ago)
- Topics: animation, svelte
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 24
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-svelte-stores - svelte-animation-store
README
Svelte Animation Store
---------------A store that is based on Svelte's [tweened store](https://svelte.dev/docs#tweened), with some additional functionality:
- `pause()`: freeze the store at the current value.
- `reset()`: resets the store's value back to the last set point.
- `continue()`: play on from a paused state.
- `reverse()`: play in reverse.
- `replay()`: go back to start, and play to last set point.
- `accelerate(speed)`: adjust the speed of the animation.Functionality inherited from `writable()`:
- `set(value)`: works the same as a `writable` store.
- `update(callback)`: works the same as a `writable` store.
- `subscribe(callback)`: works the same as a `writable` store.## [Demo](https://svelte.dev/repl/9751df15d22245f691a1cf3a30c3b7b4?version=3.35.0)
## License
MIT