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 indipendent
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.

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 Type
start_point Point
end_point Point
highlight Point

Bitmap

Base types:

Properties:

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

Defs

Base types:

Properties:

name type docs
colors array of NamedColor
images array of Bitmap
gradient_colors array of GradientColors
gradients array of Gradient

ShapeElement

Base types:

Sub types:

Shape

Base types:

Sub types:

Modifier

Base 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

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

Layer

Base types:

Properties:

name type docs
parent UUID References Layer.
start_time float
render bool

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

Image

Base types:

Properties:

name type docs
image UUID References Bitmap.

Object

Sub types:

ReferenceTarget

Base types:

Sub types:

Properties:

name type docs
uuid UUID
name string

DocumentNode

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

Transform

Base types:

Properties:

name type docs
anchor_point Point
position Point
scale Vector2D
rotation float

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

Enumerations

Type

value docs
Linear
Radial

StarType

value docs
Star
Polygon

PointType

value docs
Corner
Smooth
Symmetrical

Rule

value docs
NonZero
EvenOdd

Cap

value docs
ButtCap
RoundCap
SquareCap

Join

value docs
MiterJoin
RoundJoin
BevelJoin

Descriptive

value docs
Hold
Linear
Ease
Custom