By the folks at AirBnB:
Lottie is an iOS, Android, and React Native library that renders After Effects animations in real time, allowing apps to use animations as easily as they use static images.
Lottie uses a JSON file – generated by the BodyMovin plugin for After Effects as its source, and then renders it with no additional engineering effort.
Here’s a React-based example:
import React from 'react';
import Animation from 'lottie-react-native';
export default class BasicExample extends React.Component {
componentDidMount() {
this.animation.play();
}
render() {
return (
<Animation
ref={animation => { this.animation = animation; }}
style={{
width: 200,
height: 200,
}}
source={require('../path/to/animation.json')}
/>
);
}
}
I like this take on creating cross-platform animations, yet it requires one to create his/her animations using After Effects.
Leave a comment