react-native-image-sequence

A <ImageSequence> component for react-native

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
react-native-image-sequence
106270.7.05 years ago8 years agoMinified + gzip package size for react-native-image-sequence in KB

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
  1. 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 ```