# lottie-api

> A library to edit lottie-web animations dynamically

Latest version **1.0.3** (published 2020-10-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install lottie-api
pnpm add lottie-api
yarn add lottie-api
bun add lottie-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-10-17 |
| First published | 2019-01-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 188 |
| Author | Hernan Torrisi |
| Maintainers | airnan |

## Links

- npm: https://www.npmjs.com/package/lottie-api
- Repository: https://github.com/bodymovin/lottie-api
- Homepage: https://github.com/bodymovin/lottie-api#readme
- Issues: https://github.com/bodymovin/lottie-api/issues
- npm.io page: https://npm.io/package/lottie-api

## Recent versions

- 1.0.3 (latest) — 2020-10-17
- 1.0.2 — 2019-05-28
- 1.0.0 — 2019-01-04

## README

# lottie-api
A library to edit lottie-web animations dynamically

## Methods
### createAnimationApi
- Expects 1 argument: the lottie animation instance
- Returns animation API instance
- This is the only method of the library. It will return an instance of an API connected to the animation it gets as argument.
Returns

## Animation Instance

## Usage
For a basic usage check the examples folder.

## Additional methods

- getKeyPath: returns a keypath pointing to an animation property
- addValueCallback: adds a callback to an animation property
- recalculateSize: call this method if the element gets resized
- toContainerPoint: converts a point from animation coordinates to global coordinates
- fromContainerPoint: converts a point from global coordinates to animation coordinates
- toKeypathLayerPoint: converts a point from global animation coordinates to property animation coordinates
- fromKeypathLayerPoint: converts a point from property animation coordinates to global animation coordinates
- getCurrentFrame: return current animation time in frames
- getCurrentTime: return current animation time in seconds

---
_Source: https://npm.io/package/lottie-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
