Warning, /graphics/glaxnimate/docs/json_reference.in.md is written in an unsupported language. File is not indexed.
0001 Authors: Mattia Basaglia 0002 0003 # Glaxnimate file format 0004 0005 Glaxnimate files are stored as JSON. 0006 0007 The top-level object represents the document, it has the following fields: 0008 0009 | name | type | required | description | 0010 | --- | --- | --- | --- | 0011 | `format` | [Format Metadata](#format-metadata) | yes | Describes the format used | 0012 | `metadata` | `object` | no | Can contain anything | 0013 | `defs` | [Defs](#defs) | no | Defines assets | 0014 | `animation` | [MainComposition](#maincomposition) | yes | Animation object | 0015 0016 0017 ## Basic Types 0018 0019 ### Format Metadata 0020 0021 Object describing the file format. 0022 0023 | name | type | required | description | 0024 | --------------------- | -------- | --- | ---------------------------------------------- | 0025 | `generator` | `string` | no | Program used to create the file | 0026 | `generator_version` | `string` | no | Version of the program used to create the file | 0027 | `format_version` | `int` | yes | Version of the format specs, currently `2` | 0028 0029 ### Point 0030 0031 Represents a point in 2D space 0032 0033 | name | type | required | description | 0034 | ----- | --------- | --------- | ------------- | 0035 | `x` | `float` | yes | X coordinate | 0036 | `y` | `float` | yes | Y coordinate | 0037 0038 0039 ### Size 0040 0041 Represents a size 0042 0043 | name | type | required | description | 0044 | ----- | --------- | --------- | ------------- | 0045 | `width` | `float` | yes | | 0046 | `height` | `float` | yes | | 0047 0048 0049 ### Bezier 0050 0051 A polybezier. 0052 0053 | name | type | required | description | 0054 | ----- | --------- | --------- | ------------- | 0055 | `closed` | `bool` | no | Whether the bezier is closed | 0056 | `points` | array of [Bezier Points](#bezier-point) | yes | | 0057 0058 ### Bezier Point 0059 0060 | name | type | required | description | 0061 | --------- | ----------------- | --------- | ------------- | 0062 | `pos` | [Point](#point) | yes | Vertex Position | 0063 | `tan_in` | [Point](#point) | yes | Incoming tangent (absolute) | 0064 | `tan_out` | [Point](#point) | yes | Outgoing tangent (absolute) | 0065 | `type` | `int` | yes | See below for possible values | 0066 0067 Point Types: 0068 0069 | value | name | description | 0070 | ----- | ------------- | ------------------------------------------------------------------------- | 0071 | `0` | Corner | The two tangents are independent | 0072 | `1` | Smooth | The two tangents are on the same line but their length can be different | 0073 | `2` | Symmetrical | The two tangents are on the same line and have the same length | 0074 0075 0076 ### Gradient Stop 0077 0078 0079 | name | type | required | description | 0080 | --------- | ----------------- | --------- | ------------- | 0081 | `offset` | `float` | yes | Value in [0, 1] determining the offset of this stop | 0082 | `color` | [Color](#color) | yes | Color of the stop | 0083 0084 0085 ### Color 0086 0087 A string representing color values, it starts with `#` and is followed by 0088 2 hexadecimal digits per color component (Red, Green, Blue). 0089 0090 With an optional 2 extra hexadecimal digits to represent transparency. 0091 0092 0093 ### UUID 0094 0095 String representing a unique identifier, in the form 0096 0097 {00000000-0000-0000-0000-000000000000} 0098 0099 ## Object Types 0100 0101 Most objects fall in this category, their type is represented by the `__type__` attribute. 0102 0103 Each type inherits properties from its parent type. 0104 0105 If a specific property requires a given `__type__`, you can use one of its sub-types.