Skip to content

alexa/apl-translator-lottie

Overview

This tool is used to convert Lottie animation to APL (Alexa Presentation Language) document. It supports Lottie files that were created in Adobe After Effects with the Bodymovin plugin.

Currently, the converter won't be able to support all After Effects features. Make sure your animation doesn't use unsupported features. For details, see supported features.

Release Notes

Changes are tracked in CHANGELOG.md.

Installation

The fastest way to use apl-translator-lottie is to install it from npm.

npm install apl-translator-lottie --save

Usage

  • To convert with a filepath
import {convertFile} from "apl-translator-lottie"

const aplDocument = convertFile('lottie_sample.json')
  • To convert with a JSON object
import {convert} from "apl-translator-lottie"

let lottieJSON = {
    "v":"5.7.5"
}
const aplDocument = convert(lottieJSON)
  • To run local convert test
  1. Paste your Lottie file to test/local/lottie.json
  2. Run npm run build && npm run convert
  3. Converted APL will be written in test/local/apl.json file

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 license, except Lottie samples and APL Templates are licensed under the Amazon Software License. For more detail, please see the LICENSE file under /samples folder.