1.0.1 • Published 7 years ago

react-frame-animator v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

React Frame Animator

A simple react component that animates an array of frames.

Travis npm npm

Getting Started

Install

Using yarn:

yarn add react-frame-animator

Using npm:

npm i -S react-frame-animator

Usage

1) Import After Installation

import FrameAnimator from 'react-frame-animator';

2) Add the Component to Your App

<FrameAnimator frames={frames} speed={500} />

Props

NameDescriptionTypeValues
frames *List of frames to be animated. This can be a url, file path, or image data.String Array "img/walk_up1.png", "img/walk_up2.png"
speed *The speed in milliseconds of the animation.Number500, 30, 1000
playModeThe mode in which the animation will play.NumberplayModes.NORMAL (Default), playModes.LOOP, playModes.REVERSE, playModes.LOOP_REVERSE

Note: playModes can be imported as follows:

import { playModes } from 'react-frame-animator';

Development

Install Dependencies:

yarn install

Run the Demo:

yarn run demo

Build:

yarn run build

License

This project is licensed under the MIT License - see the LICENSE for details.