Glaxnimate file format

Glaxnimate files are stored as JSON.

The top-level object represents the document, it has the following fields:

name type required description
format Format Metadata yes Describes the format used
metadata object no Can contain anything
defs Defs no Defines assets
animation MainComposition yes Animation object

Basic Types

Format Metadata

Object describing the file format.

name type required description
generator string no Program used to create the file
generator_version string no Version of the program used to create the file
format_version int yes Version of the format specs, currently 2

Point

Represents a point in 2D space

name type required description
x float yes X coordinate
y float yes Y coordinate

Size

Represents a size

name type required description
width float yes
height float yes

Bezier

A polybezier.

name type required description
closed bool no Whether the bezier is closed
points array of Bezier Points yes

Bezier Point

name type required description
pos Point yes Vertex Position
tan_in Point yes Incoming tangent (absolute)
tan_out Point yes Outgoing tangent (absolute)
type int yes See below for possible values

Point Types:

value name description
0 Corner The two tangents are independent
1 Smooth The two tangents are on the same line but their length can be different
2 Symmetrical The two tangents are on the same line and have the same length

Gradient Stop

name type required description
offset float yes Value in [0, 1] determining the offset of this stop
color Color yes Color of the stop

Color

A string representing color values, it starts with # and is followed by 2 hexadecimal digits per color component (Red, Green, Blue).

With an optional 2 extra hexadecimal digits to represent transparency.

UUID

String representing a unique identifier, in the form

{00000000-0000-0000-0000-000000000000}

Object Types

Most objects fall in this category, their type is represented by the __type__ attribute.

Each type inherits properties from its parent type.

If a specific property requires a given __type__, you can use one of its sub-types.

Object

Sub types:

DocumentNode

Base types:

Sub types:

Properties:

name type docs
uuid UUID
name string

VisualNode

Base types:

Sub types:

Properties:

name type docs
group_color Color
visible bool
locked bool

AnimationContainer

Base types:

Properties:

name type docs
first_frame float
last_frame float

StretchableTime

Base types:

Properties:

name type docs
start_time float
stretch float

Transform

Base types:

MaskSettings

Base types:

Properties:

name type docs
mask bool

Composition

Base types:

Sub types:

Properties:

name type docs
shapes array of ShapeElement

MainComposition

Base types:

Properties:

name type docs
fps float
width int
height int

ShapeElement

Base types:

Sub types:

Shape

Base types:

Sub types:

Properties:

name type docs
reversed bool

Modifier

Base types:

Sub types:

Styler

Base types:

Sub types:

Properties:

name type docs
use UUID References BrushStyle.

Rect

Base types:

Ellipse

Base types:

PolyStar

Base types:

Properties:

name type docs
type StarType

Path

Base types:

Properties:

name type docs
closed bool

Group

Base types:

Sub types:

Properties:

name type docs
shapes array of ShapeElement

Layer

Base types:

Properties:

name type docs
parent UUID References Layer.
render bool

PreCompLayer

Base types:

Properties:

name type docs
composition UUID References Precomposition.
size Size

Image

Base types:

Properties:

name type docs
image UUID References Bitmap.

Fill

Base types:

Properties:

name type docs
fill_rule Rule

Stroke

Base types:

Properties:

name type docs
cap Cap
join Join
miter_limit float

Repeater

Base types:

PathModifier

Base types:

Sub types:

Trim

Base types:

Properties:

name type docs
multiple MultipleShapes

InflateDeflate

Base types:

RoundCorners

Base types:

Asset

Base types:

Sub types:

BrushStyle

Base types:

Sub types:

NamedColor

Base types:

GradientColors

Base types:

Gradient

Base types:

Properties:

name type docs
colors UUID References GradientColors.
type GradientType

Bitmap

Base types:

Properties:

name type docs
data Base64 string
filename string
format string
width int
height int

Precomposition

Base types:

EmbeddedFont

Base types:

Properties:

name type docs
data Base64 string
source_url string
css_url string

BitmapList

Base types:

Properties:

name type docs
values array of Bitmap

NamedColorList

Base types:

Properties:

name type docs
values array of NamedColor

GradientList

Base types:

Properties:

name type docs
values array of Gradient

GradientColorsList

Base types:

Properties:

name type docs
values array of GradientColors

PrecompositionList

Base types:

Properties:

name type docs
values array of Precomposition

FontList

Base types:

Properties:

name type docs
values array of EmbeddedFont

Assets

Base types:

Enumerations

PointType

value docs
Corner
Smooth
Symmetrical

MatchType

value docs
Centroid
Closest
MostFrequent

Direction

value docs
Import
Export

Direction

value docs
Import
Export

Descriptive

value docs
Hold
Linear
Ease
Custom

StarType

value docs
Star
Polygon

Rule

value docs
NonZero
EvenOdd

Cap

value docs
ButtCap
RoundCap
SquareCap

Join

value docs
MiterJoin
RoundJoin
BevelJoin

GradientType

value docs
Linear
Radial