Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.10.0] LayerDef.intGridValues array order is no longer relevant! #553

Closed
deepnight opened this issue Jan 4, 2022 · 1 comment
Closed
Labels
for API devs This tag will indicate issues that contain important info for devs who work on LDtk importers.
Milestone

Comments

@deepnight
Copy link
Owner

deepnight commented Jan 4, 2022

Starting with 0.10.x, the integer values in IntGrid layers can be re-ordered freely by users.

In the following image, value "4" is before value "3".

image

A typical entry in intGridValues array (in a LayerDef JSON) looks like this:

"intGridValues": [
	{ "value": 1, "identifier": "a", "color": "#FF0000" },
	{ "value": 2, "identifier": "b", "color": "#53FF00" },
	{ "value": 4, "identifier": "d", "color": "#00FFEA" },
	{ "value": 3, "identifier": "c", "color": "#0029FF" },
	{ "value": 5, "identifier": "e", "color": "#FF00EA" }
]

Please make sure your importer uses the value property to get the actual IntGrid value, and not the array index!

@deepnight deepnight added the for API devs This tag will indicate issues that contain important info for devs who work on LDtk importers. label Jan 4, 2022
@deepnight deepnight added this to the 0.10.0 milestone Jan 4, 2022
@deepnight deepnight changed the title LayerDef.intGridValues array order is no longer relevant! [0.10.0] LayerDef.intGridValues array order is no longer relevant! Jan 4, 2022
@deepnight
Copy link
Owner Author

Moved to wiki: https://github.com/deepnight/ldtk/wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for API devs This tag will indicate issues that contain important info for devs who work on LDtk importers.
Projects
None yet
Development

No branches or pull requests

1 participant