@cawfree/lottie-mutate

1.0.2 • Public • Published

@cawfree/lottie-mutate

A collection of functions that can be used to manipulate raw Lottie Animation JSON programmatically.

🚀 Getting Started

Using npm:

npm install --save @cawfree/lottie-mutate

Using yarn:

yarn add @cawfree/lottie-mutate

✍️ Example

replaceAllColors

const { replaceAllColors } = require('@cawfree/lottie-mutate');

const anim = require('/path/to/animation.json');

const animFilledWithWhite = replaceAllColors(
  anim,
  "white",
);

Returns the supplied animation with all color references overrided with your value for color, which is a CSS color string (See color-string). Your original object is left unchanged.

✌️ License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @cawfree/lottie-mutate

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

84.6 kB

Total Files

8

Last publish

Collaborators

  • cawfree