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

add y sort property #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ used in the Godot TileMap).

Enable the Clip Uv (Filter Clip on Sprites) to avoid image bleeding on tiles.

### Y Sort (Map only)

**Default: `On`**

The map's tiles will be drawn in order of their Y coordinates. If this is not needed
it can be turned off to get better performance and more FPS when being drawn.

### Image Flags

**Default: `Mipmaps, Repeat, Filter`** (Note: this is set as `Texture.FLAGS_DEFAULT`)
Expand Down
4 changes: 4 additions & 0 deletions addons/vnen.tiled_importer/tiled_import_plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ func get_import_options(preset):
"name": "uv_clip",
"default_value": true
},
{
"name": "y_sort",
"default_value": true
},
{
"name": "image_flags",
"default_value": 0 if preset == PRESET_PIXEL_ART else Texture.FLAGS_DEFAULT,
Expand Down
2 changes: 1 addition & 1 deletion addons/vnen.tiled_importer/tiled_map_reader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func make_layer(layer, parent, root, data):
tilemap.cell_half_offset = map_offset
tilemap.format = 1
tilemap.cell_clip_uv = options.uv_clip
tilemap.cell_y_sort = true
tilemap.cell_y_sort = options.y_sort
tilemap.collision_layer = options.collision_layer
tilemap.z_index = z_index

Expand Down