1.1.0 • Published 8 years ago

animate-svg v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

animate-svg

NPM version Downloads Dependency status Dev Dependency status

Easily animate an SVG line or path to look like it's animating itself.

Installation

npm install --save animate-svg

Usage

Basic usage:

import animateSvg from 'animate-svg'

async function foo() {
  // blabla
  const path = document.getElementById('some-svg-path-element')
  // the animateSvg function esentially returns a promise
  // so you can await it if you use it in an async function
  await animateSvg(path, 1, false)
  // blablabla
}

The function animateSvg accepts 3 parameters:

  • the SVGPathElement or SVGLineElement to animate
  • the speed at which the animation should occur (pixels per millisecond)
  • (optional) direction of the animation: true is for reverse animation, false is for normal
1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago