react-frame-animator

1.0.1 • Public • Published

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';
  1. Add the Component to Your App
<FrameAnimator frames={frames} speed={500} />

Props

Name Description Type Values
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. Number 500, 30, 1000
playMode The mode in which the animation will play. Number playModes.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.

Package Sidebar

Install

npm i react-frame-animator

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • danielz