1.0.7 • Published 3 years ago

svg-morpher v1.0.7

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

SVG-Morpher

About

This is a helper module for morphing between SVGs. Specifically, between two SVGs with different amount of Path elements.

Usage

  1. Import it as a module:
import SVGMorpher from "svg-morpher";
  1. Use either morphFromTo or morphFromContainerToSvg function. First three parameters must be provided, callback is optional!
SVGMorpher.morphFromContainerToSvg(containerID, toSVG, duration, callback);

// or

SVGMorpher.morphFromTo(fromSVG, toSVG, duration, callback);

Note - the morph function provides callback function with a boolean parameter -> true when animation ends.

  1. Have Fun!

Dependencies

This module uses two dependencies:

  1. Flubber - SVG Interpolator -> for the interpolation between SVG Paths

  2. Just.animate - library for animation. In this case, Timeline is used for animation.

Author @nfejzic - Nadir Fejzic

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago