Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8b15659
Initial changes for flips
Lojemiru Jan 9, 2023
616932e
Add EntityDefs integration, add rough visuals
Lojemiru Jan 10, 2023
1531bc0
Cleanup, add hotkeys, add cursor display
Lojemiru Jan 11, 2023
46c2326
Cleanup, UI polish.
Lojemiru Jan 12, 2023
b573822
Fix cover bounds and full size cropped Entity renders
Lojemiru Jan 13, 2023
29ce77a
Update pivot display for flipped Entities
Lojemiru Jan 14, 2023
fa37787
docs: Fix hotkey hint in platformer sample (#821)
johanhelsing Jan 14, 2023
5af2126
Base pivot flipping changes, start visual rollout
Lojemiru Jan 16, 2023
08b9117
Fix issue 826 (#827)
midyh Jan 23, 2023
29b82db
Revert "Base pivot flipping changes, start visual rollout"
Lojemiru Jan 24, 2023
ae17777
Revert "Update pivot display for flipped Entities"
Lojemiru Jan 24, 2023
0795b87
Merge branch 'deepnight:master' into entity-flips
Lojemiru Jan 24, 2023
c5fd767
Revert broken tile flipping in Repeat mode
Lojemiru Jan 24, 2023
98baf34
Revert errant change to setup.hxml
Lojemiru Jan 24, 2023
9b2583c
Final cleanup
Lojemiru Jan 24, 2023
48ed6cd
Re-add initial pivot flips
Lojemiru Feb 4, 2023
62d6ada
Revert "Revert "Update pivot display for flipped Entities""
Lojemiru Feb 4, 2023
6a34b9a
Add entitydef toggle for flip style, fix placement visual bugs
Lojemiru Feb 5, 2023
8fed521
Make flipped pivots take pivot flipping into account
Lojemiru Feb 14, 2023
0c34ad5
Fix field display for flipped Entities
Lojemiru Feb 14, 2023
32e8ff8
Somewhat fix resizing (actual fix in new branch)
Lojemiru Feb 14, 2023
2eab260
Update test-windows.yml
Lojemiru Mar 5, 2023
4991750
Update test-windows.yml
Lojemiru Mar 5, 2023
59fb849
Entity flips pivots - rebase to dev-1.2.6 (#1)
Lojemiru Mar 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/assets/css/app.min.css

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions app/assets/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6517,6 +6517,17 @@ dl.form.fieldInstanceEditor {
box-shadow: 0px 0px 32px $red;
}

button.reset {
margin-left: 10px;
flex: 0;
align-self: center;
padding: 4px 1px;
.icon {
width: 20px;
height: 20px;
}
}

span.point {
padding: 4px;
align-self: center;
Expand Down Expand Up @@ -6599,9 +6610,6 @@ dl.form.fieldInstanceEditor {
height: 20px;
}
}
button.reset {
margin-left: 10px;
}
button.remove {
flex: 0 1 16px;
}
Expand Down
17 changes: 17 additions & 0 deletions app/assets/tpl/editEntityDefs.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,23 @@ <h2> <div class="icon entity"></div> Project entities </h2>
Keep aspect ratio
</label>
</dd>
<dd>
<span>Flippable:</span>
<label for="flippableX">
<input type="checkbox" id="flippableX" title="If checked, the entity instances will be horizontally flippable."/>
Horizontal
</label>

<label for="flippableY">
<input type="checkbox" id="flippableY" title="If checked, the entity instances will be vertically flippable."/>
Vertical
</label>

<label for="flipAroundPivot">
<input type="checkbox" id="flipAroundPivot" title="If checked, the entity instances will flip around their pivot instead of just within their existing bounds."/>
Flip around pivot
</label>
</dd>

<dt>
<label>Editor visual</label>
Expand Down
18 changes: 17 additions & 1 deletion app/assets/tpl/entityInstanceEditor.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@
<span class="unit" title="Change coordinates unit"></span>
</dd>

<dt>
Flips
<info>How this Entity instance is oriented on the X and Y axes.</info>
</dt>
<dd class="flips">
<label>
<input type="checkbox" name="x"/>
Horizontal
</label>

<label>
<input type="checkbox" name="y"/>
Vertical
</label>
</dd>

<dt class="refs">
References to this entity
<info>This is a list of all other Entities having a Reference field pointing to this Entity.</info>
Expand All @@ -42,4 +58,4 @@
<div class="customFieldsWrapper"></div>
</div>

<div class="resizeBar"></div>
<div class="resizeBar"></div>
39 changes: 20 additions & 19 deletions app/extraFiles/samples/Entities.ldtk
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
"doc": "https://ldtk.io/json",
"schema": "https://ldtk.io/files/JSON_SCHEMA.json",
"appAuthor": "Sebastien 'deepnight' Benard",
"appVersion": "1.2.5",
"appVersion": "1.2.6",
"url": "https://ldtk.io"
},
"iid": "a2a4fe00-7820-11ed-b6fd-9b53622ece75",
"jsonVersion": "1.2.5",
"appBuildId": 464869,
"jsonVersion": "1.2.6",
"appBuildId": 465061,
"nextUid": 173,
"identifierStyle": "Capitalize",
"toc": [{
"identifier": "PlayerStart",
"instances": [{
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f",
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"layerIid": "f80e99e0-66b0-11ec-b121-456135fb304a",
"entityIid": "f80f0f12-66b0-11ec-b121-c7e0ed2499ae"
Expand Down Expand Up @@ -1997,12 +1997,12 @@
"entityIid": "3396d6c0-66b0-11ec-b548-27e4812969a5",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}, {
"entityIid": "f80ee800-66b0-11ec-b121-9b6ebb5b8d6e",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
} ], "__type": "Array<EntityRef>", "__tile": null, "defUid": 97, "realEditorValues": [ {
"id": "V_String",
"params": ["3396d6c0-66b0-11ec-b548-27e4812969a5"]
Expand Down Expand Up @@ -2034,12 +2034,12 @@
"entityIid": "34733ef0-66b0-11ec-b043-b1457bc19192",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}, {
"entityIid": "f05f14b0-7820-11ed-b13c-3bd68d5556ee",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
} ], "__type": "Array<EntityRef>", "__tile": null, "defUid": 98, "realEditorValues": [ {
"id": "V_String",
"params": ["34733ef0-66b0-11ec-b043-b1457bc19192"]
Expand Down Expand Up @@ -2070,7 +2070,7 @@
"entityIid": "dd32c940-7820-11ed-b13c-d7bdc343ece3",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}], "__type": "Array<EntityRef>", "__tile": null, "defUid": 98, "realEditorValues": [{
"id": "V_String",
"params": ["dd32c940-7820-11ed-b13c-d7bdc343ece3"]
Expand Down Expand Up @@ -2202,12 +2202,12 @@
"entityIid": "0ac19200-66b0-11ec-b043-21f75c6683af",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}, {
"entityIid": "f80ee805-66b0-11ec-b121-09bc15634dc5",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
} ], "__type": "Array<EntityRef>", "__tile": null, "defUid": 102, "realEditorValues": [ {
"id": "V_String",
"params": ["0ac19200-66b0-11ec-b043-21f75c6683af"]
Expand Down Expand Up @@ -2236,19 +2236,19 @@
"entityIid": "f80ec0f0-66b0-11ec-b121-db9b161a9754",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
},
{
"entityIid": "f80ee801-66b0-11ec-b121-4d74c475d701",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
},
{
"entityIid": "15991840-7820-11ed-9e31-5d3ab678e30e",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}
], "__type": "Array<EntityRef>", "__tile": null, "defUid": 102, "realEditorValues": [ {
"id": "V_String",
Expand Down Expand Up @@ -2354,7 +2354,7 @@
"entityIid": "ba7bf4c0-7820-11ed-b300-97eb43836a46",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}], "__type": "Array<EntityRef>", "__tile": null, "defUid": 98, "realEditorValues": [{
"id": "V_String",
"params": ["ba7bf4c0-7820-11ed-b300-97eb43836a46"]
Expand Down Expand Up @@ -2504,7 +2504,7 @@
"entityIid": "478c88a0-7820-11ed-96e3-cb21df51f96c",
"layerIid": "aba76db0-66b0-11ec-adce-c7e369098433",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}, "__type": "EntityRef", "__tile": null, "defUid": 167, "realEditorValues": [{
"id": "V_String",
"params": ["478c88a0-7820-11ed-96e3-cb21df51f96c"]
Expand Down Expand Up @@ -2605,7 +2605,7 @@
"entityIid": "cec7c540-7820-11ed-a572-9d2143bfff9e",
"layerIid": "f80e99e0-66b0-11ec-b121-456135fb304a",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}, "__type": "EntityRef", "__tile": null, "defUid": 165, "realEditorValues": [{
"id": "V_String",
"params": ["cec7c540-7820-11ed-a572-9d2143bfff9e"]
Expand Down Expand Up @@ -2672,7 +2672,7 @@
"entityIid": "623b4880-7820-11ed-96e3-a559e7f13f25",
"layerIid": "f80e99e0-66b0-11ec-b121-456135fb304a",
"levelIid": "f80e4bc0-66b0-11ec-b121-b327a018109c",
"worldIid": "aa6ac7e0-7820-11ed-bcdb-0d3af16f141f"
"worldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}, "__type": "EntityRef", "__tile": null, "defUid": 165, "realEditorValues": [{
"id": "V_String",
"params": ["623b4880-7820-11ed-96e3-a559e7f13f25"]
Expand Down Expand Up @@ -5895,5 +5895,6 @@
"__neighbours": []
}
],
"worlds": []
"worlds": [],
"dummyWorldIid": "f310fef0-7820-11ed-9859-6530dfcbabd7"
}
2 changes: 1 addition & 1 deletion app/extraFiles/samples/Typical_2D_platformer_example.ldtk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"backupOnSave": false,
"backupLimit": 10,
"levelNamePattern": "%world_Level_%idx",
"tutorialDesc": "This sample demonstrates a typical 2D platformer with auto-rendered walls and various gameplay entities.\nPress [A] to toggle \"Single layer mode\", which helps understanding which layer contains what.\nPress [SHIFT+R] to toggle auto-rendered layers.",
"tutorialDesc": "This sample demonstrates a typical 2D platformer with auto-rendered walls and various gameplay entities.\nPress [Shift+A] to toggle \"Single layer mode\", which helps understanding which layer contains what.\nPress [SHIFT+R] to toggle auto-rendered layers.",
"customCommands": [],
"flags": ["UseMultilinesType"],
"defs": { "layers": [
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ldtk",
"version": "1.2.5",
"version": "1.2.6",
"main": "assets/main.js",
"productName": "LDtk",
"author": "Sebastien Benard",
Expand Down
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.2.6

- Fixed the size of Reset buttons in custom field forms
- Fixed the "World IID" values that changed randomly in the JSON, if the project isn't in Multi-Worlds mode.

# 1.2.5

- Added custom user documentation for Entities and Layers
Expand Down
3 changes: 2 additions & 1 deletion docs/JSON_DOC.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# LDtk Json structure (version 1.2.5)
# LDtk Json structure (version 1.2.6)


<a id="ldtk-ProjectJson" name="ldtk-ProjectJson"></a>
Expand Down Expand Up @@ -32,6 +32,7 @@ Value | Type | Description
`defaultLevelWidth`<br/><sup class="internal">*Only used by editor*</sup><br/> ![Generic badge](https://img.shields.io/badge/Changed_1.0.0-gray.svg) | Int&nbsp;*(can&nbsp;be&nbsp;`null`)* | **WARNING**: this field will move to the `worlds` array after the "multi-worlds" update. It will then be `null`. You can enable the Multi-worlds advanced project option to enable the change immediately.<br/><br/> Default new level width
`defaultPivotX`<br/><sup class="internal">*Only used by editor*</sup> | Float | Default X pivot (0 to 1) for new entities
`defaultPivotY`<br/><sup class="internal">*Only used by editor*</sup> | Float | Default Y pivot (0 to 1) for new entities
`dummyWorldIid`<br/><sup class="internal">*Only used by editor*</sup><br/> ![Generic badge](https://img.shields.io/badge/Added_1.2.6-green.svg) | String | If the project isn't in MultiWorlds mode, this is the IID of the internal "dummy" World.
`exportLevelBg`<br/><sup class="internal">*Only used by editor*</sup><br/> ![Generic badge](https://img.shields.io/badge/Added_1.2.0-green.svg) | Bool | If TRUE, the exported PNGs will include the level background (color or image).
`exportTiled`<br/><sup class="internal">*Only used by editor*</sup> | Bool | If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file (default is FALSE)
`flags`<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;Enum | An array containing various advanced flags (ie. options or other states).<br/> Possible values: `DiscardPreCsvIntGrid`, `ExportPreCsvIntGridFormat`, `IgnoreBackupSuggest`, `PrependIndexToLevelFileNames`, `MultiWorlds`, `UseMultilinesType`
Expand Down
11 changes: 9 additions & 2 deletions docs/JSON_SCHEMA.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"description": "This file is a JSON schema of files created by LDtk level editor (https://ldtk.io).",
"title": "LDtk 1.2.5 JSON schema",
"title": "LDtk 1.2.6 JSON schema",
"$schema": "https://json-schema.org/draft-07/schema#",
"$ref": "#/LdtkJsonRoot",
"version": "1.2.5",
"version": "1.2.6",
"LdtkJsonRoot": {
"description": "This is the root of any Project JSON file. It contains: - the project settings, - an array of levels, - a group of definitions (that can probably be safely ignored for most users).",
"title": "LDtk Json root",
Expand All @@ -24,6 +24,7 @@
"defaultLevelBgColor",
"defaultPivotX",
"defaultPivotY",
"dummyWorldIid",
"exportLevelBg",
"exportTiled",
"flags",
Expand Down Expand Up @@ -120,6 +121,12 @@
"number"
]
},
"dummyWorldIid": {
"description": "If the project isn't in MultiWorlds mode, this is the IID of the internal \"dummy\" World.",
"type": [
"string"
]
},
"customCommands": {
"description": "An array of command lines that can be ran manually by the user",
"items": {
Expand Down
4 changes: 2 additions & 2 deletions docs/MINIMAL_JSON_SCHEMA.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"description": "This file is a JSON schema of files created by LDtk level editor (https://ldtk.io).",
"title": "LDtk 1.2.5 JSON schema",
"title": "LDtk 1.2.6 JSON schema",
"$schema": "https://json-schema.org/draft-07/schema#",
"$ref": "#/LdtkJsonRoot",
"version": "1.2.5",
"version": "1.2.6",
"LdtkJsonRoot": {
"description": "This is the root of any Project JSON file. It contains: - the project settings, - an array of levels, - a group of definitions (that can probably be safely ignored for most users).",
"title": "LDtk Json root",
Expand Down
37 changes: 19 additions & 18 deletions docs/deploy/deployChecklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@
- [ ] Check code signing exp. date: 2025-02-21

## Testing

- [ ] Pack a local Setup and test it
- [ ] Add API unit tests for all new features
- [ ] Update LDtk sample maps
- [ ] Update Haxe API maps
- [ ] Run Haxe API tests
- [ ] Build Haxe API samples
- [ ] Verify GameBase compatibility
- [ ] Pack a local Setup and test it

## Preparation & checks
## Preparation
- [ ] Check the issues in the Pending milestone ([pendings](https://github.com/deepnight/ldtk/milestone/28))
- [ ] Verify planned deprecations
- [ ] Fill changelog
- [ ] Rebuild all LDtk sample maps
- [ ] Update Haxe API maps
- [ ] Check JSON doc (changed/added flags etc.)
- [ ] Run Haxe API tests
- [ ] Build Haxe API samples
- [ ] Build QuickType files

## Git
- [ ] Merge LDtk repo to `master`
Expand All @@ -34,29 +35,29 @@
- [ ] Attach Linux to GitHub Release

## Docs
- [ ] Build QuickType files
- [ ] Upload Changelog to FTP
- [ ] Upload Changelog images to FTP
- [ ] Upload JSON Doc to FTP
- [ ] Upload JSON Schema to FTP
- [ ] Upload *Changelog*, *Changelog images*, *JSON doc*, *JSON schema* to FTP
- [ ] Upload QuickType parsers
- [ ] Check "next" folder on FTP
- [ ] Check and update "next" folder on FTP

## Publish
## Publish Haxe API
- [ ] Submit to LDtk Haxe API HaxeLib ([check](https://lib.haxe.org/p/ldtk-haxe-api/))
- [ ] Add "x.x.x-rcX" tag to Haxe API repo

## Publish Itch
- [ ] Run `npm run publish-itchio`
- [ ] Upload macOS build to Itch.io ([link](https://itch.io/dashboard))
- [ ] Upload Linux build to Itch.io
- [ ] Publish GitHub release
- [ ] Add a devlog post on Itch.io
- [ ] *[Optional]* Update Itch.io page

## Release
- [ ] Publish GitHub release
- [ ] Publish the devlog post on Itch.io ([devLogs](https://itch.io/dashboard/game/740403/devlog))

## Community APIs
- [ ] Update API list ([issue](https://github.com/deepnight/ldtk/issues/273))
- [ ] Update website API list ([issue](https://github.com/deepnight/ldtk/issues/273))

## Communication
- [ ] Add a devlog post on Itch.io
- [ ] Publish the devlog post on Itch.io ([devLogs](https://itch.io/dashboard/game/740403/devlog))
- [ ] Announce on Twitter
- [ ] Announce on Discord
- [ ] Announce on Reddit (major releases only)
Expand Down
2 changes: 1 addition & 1 deletion docs/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.5
1.2.6
Loading