Animation

This is the top-level JSON object, describing the document, layers, assets, etc.

The size of the canvas is determined by w and h. Duration is expressed in frames with op, and the framerate is in fr.

Most of the contents are in layers and assets.

Composition Diagram for Animation Animation Visual Object Composition
Attribute Type Title Description
nm string

Name

Human readable name, as seen from editors and the like

mn string

Match Name

Match name, used in expressions

layers array of Layer

Layers

Layers

v string

Bodymovin version, on very old versions some things might be slightly different from what is explained here

Bodymovin version, on very old versions some things might be slightly different from what is explained here

ver integer

Specification Version

Specification version this Lottie is targeting. This is a 6 digit number with version components encoded as MMmmpp, with MM being major version, mm being minor and pp being patch.

fr number

Framerate

Framerate in frames per second

ip number

In Point

Frame the animation starts at (usually 0)

op number

Out Point

Frame the animation stops/loops at, which makes this the duration in frames when ip is 0

w integer

Width

Width of the animation

h integer

Height

Height of the animation

ddd 0-1 integer

Threedimensional

Whether the animation has 3D layers

assets array of Asset

Assets

List of assets that can be referenced by layers

comps array of Precomposition

Extra Compositions

List of Extra compositions not referenced by anything

fonts Font List

Fonts

Fonts

chars array of Character Data

Characters

Data defining text characters as lottie shapes. If present a player might only render characters defined here and nothing else.

meta Metadata

Metadata

Document metadata

metadata User Metadata

User Metadata

User Metadata

markers array of Marker

Markers

Markers defining named sections of the composition.

mb Motion Blur

Motion Blur

Motion Blur

slots object

Slots

Dictionary of slot ids that will replace matching properties.

Composition

An object that contains a list of layers

Composition Diagram for Composition Composition Precomposition Animation
Attribute Type Title Description
layers array of Layer

Layers

Layers

Metadata

Some (but not all) lottie files will have a metadata object describing the program used to create the file and other useful information:

Document Metadata

Attribute Type Title Description
a string

Author

Author

d string

Description

Description

tc string

Theme Color

Theme Color

g string

Generator

Software used to generate the file

User Metadata

Attribute Type Title Description
filename string

Filename

Filename

customProps object

Custom Properties

Custom Properties

Motion Blur

Attribute Type Title Description
sa number

Shutter Angle

Angle in degrees

sp number

Shutter Phase

Angle in degrees

spf number

Samples per Frame

Samples per Frame

asl number

Adaptive Sample Limit

Adaptive Sample Limit