@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