Socket
Socket
Sign inDemoInstall

lottie-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lottie-api

A library to edit lottie-web animations dynamically


Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 17 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc