Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chenqingspring/vue-lottie
Render After Effects animations on Vue based on Bodymovin
https://github.com/chenqingspring/vue-lottie
bodymovin lottie lottie-animation vue vue-animate vue-components vuejs2
Last synced: about 1 month ago
JSON representation
Render After Effects animations on Vue based on Bodymovin
- Host: GitHub
- URL: https://github.com/chenqingspring/vue-lottie
- Owner: chenqingspring
- License: mit
- Created: 2017-05-03T06:24:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T00:48:51.000Z (almost 2 years ago)
- Last Synced: 2024-10-08T19:43:19.170Z (about 1 month ago)
- Topics: bodymovin, lottie, lottie-animation, vue, vue-animate, vue-components, vuejs2
- Language: Vue
- Homepage:
- Size: 1.95 MB
- Stars: 1,307
- Watchers: 13
- Forks: 281
- Open Issues: 54
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-lottie - chenqingspring
README
# Lottie Animation View for Vue ([React](https://github.com/chenqingspring/react-lottie), [Angular](https://github.com/chenqingspring/ng-lottie))
[![npm version](https://badge.fury.io/js/vue-lottie.svg)](http://badge.fury.io/js/vue-lottie)
Generated by [create-vue-component](https://github.com/chenqingspring/create-vue-component)
## Wapper of bodymovin.js
[bodymovin](https://github.com/bodymovin/bodymovin) is [Adobe After Effects](http://www.adobe.com/products/aftereffects.html) plugin for exporting animations as JSON, also it provide bodymovin.js for vender them as svg/canvas/html.
## Demo
https://chenqingspring.github.io/vue-lottie## Why Lottie?
#### Flexible After Effects features
We currently support solids, shape layers, masks, alpha mattes, trim paths, and dash patterns. And we’ll be adding new features on a regular basis.#### Manipulate your animation any way you like
You can go forward, backward, and most importantly you can program your animation to respond to any interaction.#### Small file sizes
Bundle vector animations within your app without having to worry about multiple dimensions or large file sizes. Alternatively, you can decouple animation files from your app’s code entirely by loading them from a JSON API.[Learn more](http://airbnb.design/introducing-lottie/) › http://airbnb.design/lottie/
Looking for lottie files › https://www.lottiefiles.com/
## Installation
Install through npm:
```
npm install --save vue-lottie
```## Usage
```vue
Speed: x{{animationSpeed}}
stop
pause
play
import Lottie from './lottie.vue';
import * as animationData from './assets/pinjump.json';export default {
name: 'app',
components: {
'lottie': Lottie
},
data() {
return {
defaultOptions: {animationData: animationData},
animationSpeed: 1
}
},
methods: {
handleAnimation: function (anim) {
this.anim = anim;
},stop: function () {
this.anim.stop();
},play: function () {
this.anim.play();
},pause: function () {
this.anim.pause();
},onSpeedChange: function () {
this.anim.setSpeed(this.animationSpeed);
}
}
}```
## ConfigurationYou can pass a configuration object through `options` property:
* animationData: an Object with the exported animation data.
* path: the relative path to the animation object. (animationData and path are mutually exclusive)
* loop: true / false / number
* autoplay: true / false it will start playing as soon as it is ready
* name: animation name for future reference
* renderer: 'svg' / 'canvas' / 'html' to set the renderer
* container: the dom element on which to render the animationMore information on [Bodymoving Documentation](https://github.com/bodymovin/bodymovin)
## Related Projects
* [Bodymovin](https://github.com/bodymovin/bodymovin) vue-lottie is a wrapper of bodymovin
* [Angular Lottie](https://github.com/chenqingspring/ng-lottie) angular implementation
* [React Lottie](https://github.com/chenqingspring/react-lottie) react implementation
* [React Native Lottie](https://github.com/airbnb/lottie-react-native) react native implementation by airbnb
* [IOS Lottie](https://github.com/airbnb/lottie-ios) ios implementation by airbnb
* [Android Lottie](https://github.com/airbnb/lottie-android) android implementation by airbnb## Contribution
Your contributions and suggestions are heartily welcome.
## License
MIT