Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/madsleejensen/react-native-image-sequence
native implementation for creating frame based image animations
https://github.com/madsleejensen/react-native-image-sequence
Last synced: about 2 months ago
JSON representation
native implementation for creating frame based image animations
- Host: GitHub
- URL: https://github.com/madsleejensen/react-native-image-sequence
- Owner: madsleejensen
- License: mit
- Created: 2016-07-13T12:37:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-09T01:19:23.000Z (almost 4 years ago)
- Last Synced: 2024-05-13T14:03:24.824Z (8 months ago)
- Language: Java
- Homepage:
- Size: 79.1 KB
- Stars: 107
- Watchers: 3
- Forks: 64
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native-native-modules - react-native-image-sequence ★38
README
# react-native-image-sequence
native modules for handling image sequence animations. (created because i had performance issues with a javascript only solution like: https://github.com/remobile/react-native-image-animation)its a simple wrapper around **iOS** `UIImageView.animationImages` and **Android** `AnimationDrawable`
## Installation
1. `npm i --save react-native-image-sequence`
2. `react-native link react-native-image-sequence`## Examples
```javascript
import ImageSequence from 'react-native-image-sequence';const images = [
require('1.jpg'),
require('2.jpg'),
require('3.jpg'),
require('4.jpg'),
require('5.jpg'),
];const centerIndex = Math.round(images.length / 2);
```
### Change animation speed
You can change the speed of the animation by setting the `framesPerSecond` property.```javascript
```
### Looping
You can change if animation loops indefinitely by setting the `loop` property.```javascript
```