0.7.0 • Published 5 years ago

react-native-image-sequence v0.7.0

Weekly downloads
523
License
MIT
Repository
github
Last release
5 years ago

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

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);

<ImageSequence
  images={images}
  startFrameIndex={centerIndex}
  style={{width: 50, height: 50}} />

Change animation speed

You can change the speed of the animation by setting the framesPerSecond property.

<ImageSequence
  images={images}
  framesPerSecond={24}
  />

Looping

You can change if animation loops indefinitely by setting the loop property.

<ImageSequence
  images={images}
  framesPerSecond={24}
  loop={false}
  />
0.7.0

5 years ago

0.6.1

5 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago