Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Sep 22, 2023
1 parent e705b6e commit 70970c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions docs/JSON_DOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Value | Type | Description
-- | -- | --
`__bgColor`<br/> ![Generic badge](https://img.shields.io/badge/Added_0.6.0-gray.svg) | String<br/><small class="color"> *Hex color "#rrggbb"* </small> | Background color of the level (same as `bgColor`, except the default value is automatically used here if its value is `null`)
`__bgPos`<br/><sup class="only">Only *If background image exists*</sup><br/> ![Generic badge](https://img.shields.io/badge/Added_0.7.0-gray.svg) | Object&nbsp;*(can&nbsp;be&nbsp;`null`)* | Position informations of the background image, if there is one.<br/> This object contains the following fields:<br/> <ul class='subFields'><li>**`cropRect`** **(Array of Float**) : *An array of 4 float values describing the cropped sub-rectangle of the displayed background image. This cropping happens when original is larger than the level bounds. Array format: `[ cropX, cropY, cropWidth, cropHeight ]`*</li><li>**`scale`** **(Array of Float**) : *An array containing the `[scaleX,scaleY]` values of the **cropped** background image, depending on `bgPos` option.*</li><li>**`topLeftPx`** **(Array of Int**) : *An array containing the `[x,y]` pixel coordinates of the top-left corner of the **cropped** background image, depending on `bgPos` option.*</li></ul>
`__neighbours`<br/> ![Generic badge](https://img.shields.io/badge/Added_0.6.0-gray.svg) ![Generic badge](https://img.shields.io/badge/Changed_1.3.5-gray.svg) | Array&nbsp;of&nbsp;Object | An array listing all other levels touching this one on the world map. Since 1.3.5, this includes levels that overlap in the same world layer, or in nearby world layers.<br/> Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, this array is always empty.<br/> This array contains objects with the following fields:<br/> <ul class='subFields'><li>**`dir`** **(String**) ![Generic badge](https://img.shields.io/badge/Changed_1.3.5-gray.svg) : *A single lowercase character tipping on the level location (`n`orth, `s`outh, `w`est, `e`ast).<br/> Since 1.3.5, this character value can also be `<` (neighbour depth is lower), `>` (neighbour depth is greater) or `o` (levels overlap and share the same world depth).*</li><li>**`levelIid`** **(String**) ![Generic badge](https://img.shields.io/badge/Added_1.0.0-gray.svg) : *Neighbour Instance Identifier*</li><li>**`levelUid`** **(Int *(can be `null`)***) ![Generic badge](https://img.shields.io/badge/Removed_1.2.0-gray.svg) : ***WARNING**: this deprecated value is no longer exported since version 1.2.0* ** *Replaced by: `levelIid`*</li></ul>
`__neighbours`<br/> ![Generic badge](https://img.shields.io/badge/Added_0.6.0-gray.svg) ![Generic badge](https://img.shields.io/badge/Changed_1.4.0-green.svg) | Array&nbsp;of&nbsp;Object | An array listing all other levels touching this one on the world map. Since 1.4.0, this includes levels that overlap in the same world layer, or in nearby world layers.<br/> Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, this array is always empty.<br/> This array contains objects with the following fields:<br/> <ul class='subFields'><li>**`dir`** **(String**) ![Generic badge](https://img.shields.io/badge/Changed_1.4.0-green.svg) : *A single lowercase character tipping on the level location (`n`orth, `s`outh, `w`est, `e`ast).<br/> Since 1.4.0, this character value can also be `<` (neighbour depth is lower), `>` (neighbour depth is greater) or `o` (levels overlap and share the same world depth).*</li><li>**`levelIid`** **(String**) ![Generic badge](https://img.shields.io/badge/Added_1.0.0-gray.svg) : *Neighbour Instance Identifier*</li><li>**`levelUid`** **(Int *(can be `null`)***) ![Generic badge](https://img.shields.io/badge/Removed_1.2.0-gray.svg) : ***WARNING**: this deprecated value is no longer exported since version 1.2.0* ** *Replaced by: `levelIid`*</li></ul>
`bgRelPath`<br/> ![Generic badge](https://img.shields.io/badge/Added_0.7.0-gray.svg) | String&nbsp;*(can&nbsp;be&nbsp;`null`)* | The *optional* relative path to the level background image.
`externalRelPath`<br/> ![Generic badge](https://img.shields.io/badge/Added_0.7.0-gray.svg) | String&nbsp;*(can&nbsp;be&nbsp;`null`)* | This value is not null if the project option "*Save levels separately*" is enabled. In this case, this **relative** path points to the level Json file.
`fieldInstances`<br/> ![Generic badge](https://img.shields.io/badge/Changed_0.8.0-gray.svg) | Array&nbsp;of&nbsp;[Field&nbsp;instance](#ldtk-FieldInstanceJson) | An array containing this level custom field values.
Expand Down Expand Up @@ -215,16 +215,16 @@ Value | Type | Description
`displayOpacity` | Float | Opacity of the layer (0 to 1.0)
`gridSize` | Int | Width and height of the grid in pixels
`identifier` | String | User defined unique identifier
`intGridValues`<br/><sup class="only">Only *IntGrid layer*</sup><br/> ![Generic badge](https://img.shields.io/badge/Changed_1.0.0-gray.svg) | Array&nbsp;of&nbsp;Object | An array that defines extra optional info for each IntGrid value.<br/> WARNING: the array order is not related to actual IntGrid values! As user can re-order IntGrid values freely, you may value "2" before value "1" in this array.<br/> This array contains objects with the following fields:<br/> <ul class='subFields'><li>**`color`** **(String**) <small class="color"> *Hex color "#rrggbb"* </small></li><li>**`groupUid`** **(Int**) ![Generic badge](https://img.shields.io/badge/Added_1.3.5-gray.svg) : *Parent group identifier (0 if none)*</li><li>**`identifier`** **(String *(can be `null`)***) : *User defined unique identifier*</li><li>**`tile`** **([Tileset rectangle](#ldtk-TilesetRect) *(can be `null`)***) ![Generic badge](https://img.shields.io/badge/Added_1.3.3-gray.svg) </li><li>**`value`** **(Int**) ![Generic badge](https://img.shields.io/badge/Added_0.8.0-gray.svg) : *The IntGrid value itself*</li></ul>
`intGridValuesGroups`<br/><sup class="only">Only *IntGrid layer*</sup><br/> ![Generic badge](https://img.shields.io/badge/Changed_1.3.5-gray.svg) | Array&nbsp;of&nbsp;Object | Group informations for IntGrid values<br/> This array contains objects with the following fields:<br/> <ul class='subFields'><li>**`color`** **(String *(can be `null`)***) : *User defined color*</li><li>**`identifier`** **(String *(can be `null`)***) : *User defined string identifier*</li><li>**`uid`** **(Int**) : *Group unique ID*</li></ul>
`intGridValues`<br/><sup class="only">Only *IntGrid layer*</sup><br/> ![Generic badge](https://img.shields.io/badge/Changed_1.0.0-gray.svg) | Array&nbsp;of&nbsp;Object | An array that defines extra optional info for each IntGrid value.<br/> WARNING: the array order is not related to actual IntGrid values! As user can re-order IntGrid values freely, you may value "2" before value "1" in this array.<br/> This array contains objects with the following fields:<br/> <ul class='subFields'><li>**`color`** **(String**) <small class="color"> *Hex color "#rrggbb"* </small></li><li>**`groupUid`** **(Int**) ![Generic badge](https://img.shields.io/badge/Added_1.4.0-green.svg) : *Parent group identifier (0 if none)*</li><li>**`identifier`** **(String *(can be `null`)***) : *User defined unique identifier*</li><li>**`tile`** **([Tileset rectangle](#ldtk-TilesetRect) *(can be `null`)***) ![Generic badge](https://img.shields.io/badge/Added_1.3.3-gray.svg) </li><li>**`value`** **(Int**) ![Generic badge](https://img.shields.io/badge/Added_0.8.0-gray.svg) : *The IntGrid value itself*</li></ul>
`intGridValuesGroups`<br/><sup class="only">Only *IntGrid layer*</sup><br/> ![Generic badge](https://img.shields.io/badge/Changed_1.4.0-green.svg) | Array&nbsp;of&nbsp;Object | Group informations for IntGrid values<br/> This array contains objects with the following fields:<br/> <ul class='subFields'><li>**`color`** **(String *(can be `null`)***) : *User defined color*</li><li>**`identifier`** **(String *(can be `null`)***) : *User defined string identifier*</li><li>**`uid`** **(Int**) : *Group unique ID*</li></ul>
`parallaxFactorX`<br/> ![Generic badge](https://img.shields.io/badge/Added_1.0.0-gray.svg) | Float | Parallax horizontal factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.
`parallaxFactorY`<br/> ![Generic badge](https://img.shields.io/badge/Added_1.0.0-gray.svg) | Float | Parallax vertical factor (from -1 to 1, defaults to 0) which affects the scrolling speed of this layer, creating a fake 3D (parallax) effect.
`parallaxScaling`<br/> ![Generic badge](https://img.shields.io/badge/Added_1.0.0-gray.svg) | Bool | If true (default), a layer with a parallax factor will also be scaled up/down accordingly.
`pxOffsetX`<br/> ![Generic badge](https://img.shields.io/badge/Added_0.5.0-gray.svg) | Int | X offset of the layer, in pixels (IMPORTANT: this should be added to the `LayerInstance` optional offset)
`pxOffsetY`<br/> ![Generic badge](https://img.shields.io/badge/Added_0.5.0-gray.svg) | Int | Y offset of the layer, in pixels (IMPORTANT: this should be added to the `LayerInstance` optional offset)
`tilesetDefUid`<br/><sup class="only">Only *Tile layers, Auto-layers*</sup><br/> ![Generic badge](https://img.shields.io/badge/Changed_1.0.0-gray.svg) | Int&nbsp;*(can&nbsp;be&nbsp;`null`)* | Reference to the default Tileset UID being used by this layer definition.<br/> **WARNING**: some layer *instances* might use a different tileset. So most of the time, you should probably use the `__tilesetDefUid` value found in layer instances.<br/> Note: since version 1.0.0, the old `autoTilesetDefUid` was removed and merged into this value.
`uid` | Int | Unique Int identifier
`autoRuleGroups`<br/><sup class="only">Only *Auto-layers*</sup><br/><sup class="internal">*Only used by editor*</sup> | Array&nbsp;of&nbsp;Object | Contains all the auto-layer rule definitions.<br/> This array contains objects with the following fields:<br/> <ul class='subFields'><li>**`active`** **(Bool**)</li><li>~~collapsed~~ **(Bool**) *This field was removed in 1.0.0 and should no longer be used.*</li><li>**`color`** **(String *(can be `null`)***) ![Generic badge](https://img.shields.io/badge/Added_1.3.5-gray.svg) </li><li>**`icon`** **([Tileset rectangle](#ldtk-TilesetRect) *(can be `null`)***) ![Generic badge](https://img.shields.io/badge/Added_1.3.5-gray.svg) </li><li>**`isOptional`** **(Bool**) ![Generic badge](https://img.shields.io/badge/Added_0.9.0-gray.svg) </li><li>**`name`** **(String**)</li><li>**`rules`** **(Array of [Auto-layer rule definition](#ldtk-AutoRuleDef)**)</li><li>**`uid`** **(Int**)</li><li>**`usesWizard`** **(Bool**) ![Generic badge](https://img.shields.io/badge/Added_1.1.4-gray.svg) </li></ul>
`autoRuleGroups`<br/><sup class="only">Only *Auto-layers*</sup><br/><sup class="internal">*Only used by editor*</sup> | Array&nbsp;of&nbsp;Object | Contains all the auto-layer rule definitions.<br/> This array contains objects with the following fields:<br/> <ul class='subFields'><li>**`active`** **(Bool**)</li><li>~~collapsed~~ **(Bool**) *This field was removed in 1.0.0 and should no longer be used.*</li><li>**`color`** **(String *(can be `null`)***) ![Generic badge](https://img.shields.io/badge/Added_1.4.0-green.svg) </li><li>**`icon`** **([Tileset rectangle](#ldtk-TilesetRect) *(can be `null`)***) ![Generic badge](https://img.shields.io/badge/Added_1.4.0-green.svg) </li><li>**`isOptional`** **(Bool**) ![Generic badge](https://img.shields.io/badge/Added_0.9.0-gray.svg) </li><li>**`name`** **(String**)</li><li>**`rules`** **(Array of [Auto-layer rule definition](#ldtk-AutoRuleDef)**)</li><li>**`uid`** **(Int**)</li><li>**`usesWizard`** **(Bool**) ![Generic badge](https://img.shields.io/badge/Added_1.1.4-gray.svg) </li></ul>
`canSelectWhenInactive`<br/><sup class="internal">*Only used by editor*</sup><br/> ![Generic badge](https://img.shields.io/badge/Added_1.1.4-gray.svg) | Bool | Allow editor selections when the layer is not currently active.
`doc`<br/><sup class="internal">*Only used by editor*</sup><br/> ![Generic badge](https://img.shields.io/badge/Added_1.2.5-gray.svg) | String&nbsp;*(can&nbsp;be&nbsp;`null`)* | User defined documentation for this element to provide help/tips to level designers.
`excludedTags`<br/><sup class="only">Only *Entity layer*</sup><br/><sup class="internal">*Only used by editor*</sup><br/> ![Generic badge](https://img.shields.io/badge/Added_0.8.0-gray.svg) | Array&nbsp;of&nbsp;String | An array of tags to forbid some Entities in this layer
Expand Down Expand Up @@ -290,7 +290,7 @@ Value | Type | Description
`tileRect`<br/> ![Generic badge](https://img.shields.io/badge/Added_1.0.0-gray.svg) | [Tileset&nbsp;rectangle](#ldtk-TilesetRect)&nbsp;*(can&nbsp;be&nbsp;`null`)* | An object representing a rectangle from an existing Tileset
`tileRenderMode`<br/> ![Generic badge](https://img.shields.io/badge/Changed_0.8.1-gray.svg) | Enum | An enum describing how the the Entity tile is rendered inside the Entity bounds.<br/> Possible values: `Cover`, `FitInside`, `Repeat`, `Stretch`, `FullSizeCropped`, `FullSizeUncropped`, `NineSlice`
`tilesetId` | Int&nbsp;*(can&nbsp;be&nbsp;`null`)* | Tileset ID used for optional tile display
`uiTileRect`<br/> ![Generic badge](https://img.shields.io/badge/Added_1.3.5-gray.svg) | [Tileset&nbsp;rectangle](#ldtk-TilesetRect)&nbsp;*(can&nbsp;be&nbsp;`null`)* | This tile overrides the one defined in `tileRect` in the UI
`uiTileRect`<br/> ![Generic badge](https://img.shields.io/badge/Added_1.4.0-green.svg) | [Tileset&nbsp;rectangle](#ldtk-TilesetRect)&nbsp;*(can&nbsp;be&nbsp;`null`)* | This tile overrides the one defined in `tileRect` in the UI
`uid` | Int | Unique Int identifier
`width` | Int | Pixel width
`doc`<br/><sup class="internal">*Only used by editor*</sup><br/> ![Generic badge](https://img.shields.io/badge/Added_1.2.5-gray.svg) | String&nbsp;*(can&nbsp;be&nbsp;`null`)* | User defined documentation for this element to provide help/tips to level designers.
Expand Down
4 changes: 2 additions & 2 deletions docs/JSON_SCHEMA.json
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@
]
},
"dir": {
"description": "A single lowercase character tipping on the level location (`n`orth, `s`outh, `w`est, `e`ast).<br/> Since 1.3.5, this character value can also be `<` (neighbour depth is lower), `>` (neighbour depth is greater) or `o` (levels overlap and share the same world depth).",
"description": "A single lowercase character tipping on the level location (`n`orth, `s`outh, `w`est, `e`ast).<br/> Since 1.4.0, this character value can also be `<` (neighbour depth is lower), `>` (neighbour depth is greater) or `o` (levels overlap and share the same world depth).",
"type": [
"string"
]
Expand Down Expand Up @@ -2659,7 +2659,7 @@
"additionalProperties": false,
"properties": {
"__neighbours": {
"description": "An array listing all other levels touching this one on the world map. Since 1.3.5, this includes levels that overlap in the same world layer, or in nearby world layers.<br/> Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, this array is always empty.",
"description": "An array listing all other levels touching this one on the world map. Since 1.4.0, this includes levels that overlap in the same world layer, or in nearby world layers.<br/> Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, this array is always empty.",
"items": {
"$ref": "#/otherTypes/NeighbourLevel"
},
Expand Down
4 changes: 2 additions & 2 deletions docs/MINIMAL_JSON_SCHEMA.json
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@
]
},
"dir": {
"description": "A single lowercase character tipping on the level location (`n`orth, `s`outh, `w`est, `e`ast).<br/> Since 1.3.5, this character value can also be `<` (neighbour depth is lower), `>` (neighbour depth is greater) or `o` (levels overlap and share the same world depth).",
"description": "A single lowercase character tipping on the level location (`n`orth, `s`outh, `w`est, `e`ast).<br/> Since 1.4.0, this character value can also be `<` (neighbour depth is lower), `>` (neighbour depth is greater) or `o` (levels overlap and share the same world depth).",
"type": [
"string"
]
Expand Down Expand Up @@ -1563,7 +1563,7 @@
"additionalProperties": false,
"properties": {
"__neighbours": {
"description": "An array listing all other levels touching this one on the world map. Since 1.3.5, this includes levels that overlap in the same world layer, or in nearby world layers.<br/> Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, this array is always empty.",
"description": "An array listing all other levels touching this one on the world map. Since 1.4.0, this includes levels that overlap in the same world layer, or in nearby world layers.<br/> Only relevant for world layouts where level spatial positioning is manual (ie. GridVania, Free). For Horizontal and Vertical layouts, this array is always empty.",
"items": {
"$ref": "#/otherTypes/NeighbourLevel"
},
Expand Down

0 comments on commit 70970c4

Please sign in to comment.