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
.
Attribute | Type | Description |
---|---|---|
layers |
array of Precomposition Layer or Solid Color Layer or Image Layer or Null Layer or Shape Layer or Text Layer or Audio Layer or Camera Layer or Data Layer |
An array of layers (See: Lists of layers and shapes) |
nm |
string |
Name, as seen from editors and the like |
mn |
string |
Match name, used in expressions |
assets |
array of Image or Precomposition or Sound or Data source |
An array of assets |
v |
string |
Lottie version, on very old versions some things might be slightly different from what is explained here |
ddd |
0-1 integer |
Whether the animation has 3D layers. Lottie doesn't actually support 3D stuff so this should always be 0 |
fr |
number |
Framerate in frames per second |
ip |
number |
"In Point", which frame the animation starts at (usually 0) |
op |
number |
"Out Point", which frame the animation stops/loops at, which makes this the duration in frames when |
w |
integer |
Width of the animation |
h |
integer |
Height of the animation |
comps |
array of Precomposition |
List of Extra compositions not referenced by anything |
fonts |
Font List |
Fonts |
chars |
array of Character Data |
Data defining text characters as lottie shapes. If present a player might only render characters defined here and nothing else. |
meta |
Metadata |
Document metadata |
metadata |
User Metadata |
User Metadata |
markers |
array of Marker |
Markers defining named sections of the composition. |
mb |
Motion Blur |
Motion Blur |
slots |
object |
Available property overrides |
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 | Description |
---|---|---|
a |
string |
Author |
d |
string |
Description |
tc |
string |
Theme Color |
g |
string |
Software used to generate the file |
User Metadata
Motion Blur
Attribute | Type | Description |
---|---|---|
sa |
number |
Angle in degrees |
sp |
number |
Angle in degrees |
spf |
number |
Samples per Frame |
asl |
number |
Adaptive Sample Limit |