Monster Brain Dev Blog Android Dev. Game Dev. Web Hobbyist.

Lottie JSON Structure for Animation

Lottie (Link) is an awesome animation library for web, android and ios, for creating animation files from aftereffects. However if you want to edit a lottie json file, it’s hard because the keys were abbreviated so as to reduce the size I guess.

There’s no official record of this. So python lottie docs had done a good job of decoding the json keys. Here are the main keys, I’ve extracted from their site.

Animation

Lottie name Type Description Attribute
layers list of Layer List of Composition Layers.   layers
v str Bodymovin Version.   version
fr float Frames per second.   frame_rate
ip float The time when the composition work area begins, in frames.   in_point
op float The time when the composition work area ends.   out_point
w int Composition Width.   width
h int Composition Height.   height
nm str Composition name.   name
ddd 0-1 int Composition has 3-D layers.   threedimensional
assets list of Asset source items that can be used in multiple places.   assets
fonts FontList Available fonts.   fonts
chars list of Chars source chars for text layers   chars

Image

Lottie name Type Description Attribute
h float Image Height.   height
w float Image Width.   width
id str Image ID.   id
p str Image name.   image
u str Image path.   image_path
e 0-1 int Image data is stored as a data: url.   is_embedded

Transform

Lottie name Type Description Attribute
a MultiDimensional Transform Anchor Point.   anchor_point
p PositionValue Transform Position.   position
s MultiDimensional Transform Scale.   scale
r Value Transform Rotation.   rotation
o Value Transform Opacity.   opacity
sk Value Transform Skew.   skew
sa Value Transform Skew Axis.   skew_axis

MultiDimensional

Lottie name Type Description Attribute
k list of float Non-animated value.   value
ix int Property index.   property_index
a 0-1 int Whether it's animated.   animated
k list of OffsetKeyframe Keyframe list.   keyframes

For more properties

Find the full list of properties here

keywords: Lottie json, lottie structure,lottie json format, lottie json edit

Category : Programming