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:

Properties:

name type docs
anchor_point Point
position Point
scale Vector2D
rotation float

MaskSettings

Base types:

Properties:

name type docs
mask MaskMode
inverted bool

Composition

Base types:

Properties:

name type docs
shapes array of ShapeElement
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
color Color
opacity float
use UUID References BrushStyle.

Rect

Base types:

Properties:

name type docs
position Point
size Size
rounded float

Ellipse

Base types:

Properties:

name type docs
position Point
size Size

PolyStar

Base types:

Properties:

name type docs
type StarType
position Point
outer_radius float
inner_radius float
angle float
points int
outer_roundness float
inner_roundness float

Path

Base types:

Properties:

name type docs
shape Bezier
closed bool

Group

Base types:

Sub types:

Properties:

name type docs
shapes array of ShapeElement
opacity float
auto_orient bool

Layer

Base types:

Properties:

name type docs
parent UUID References Layer.
render bool

PreCompLayer

Base types:

Properties:

name type docs
composition UUID References Composition.
size Size
opacity float

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
width float
cap Cap
join Join
miter_limit float

Repeater

Base types:

Properties:

name type docs
copies int
start_opacity float
end_opacity float

PathModifier

Base types:

Sub types:

Trim

Base types:

Properties:

name type docs
start float
end float
offset float
multiple MultipleShapes

InflateDeflate

Base types:

Properties:

name type docs
amount float

RoundCorners

Base types:

Properties:

name type docs
radius float

OffsetPath

Base types:

Properties:

name type docs
amount float
miter_limit float
join Stroke::Join

ZigZag

Base types:

Properties:

name type docs
amplitude float
frequency float
style Style

Asset

Base types:

Sub types:

BrushStyle

Base types:

Sub types:

NamedColor

Base types:

Properties:

name type docs
color Color

GradientColors

Base types:

Properties:

name type docs
colors array of Gradient Stop

Gradient

Base types:

Properties:

name type docs
colors UUID References GradientColors.
type GradientType
start_point Point
end_point Point
highlight Point

Bitmap

Base types:

Properties:

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

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

CompositionList

Base types:

Properties:

name type docs
values array of Composition

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

Descriptive

value docs
Hold
Linear
Ease
Fast
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
Conical

Direction

value docs
Import
Export

Direction

value docs
Import
Export